/**
 * ERS CRM app shell — canvas, cards, and gutters copied from AskField v50:
 *   PAGE_CANVAS_CLASS      bg-[#F8F9FC]
 *   DASHBOARD_CARD_CLASS   bg-white / #FFFFFF, rounded-2xl (16px),
 *                          border #E8ECF4, shadow 0 4px 20px rgba(15,23,42,0.04)
 *   Sidebar is a floating left rail with the logo at the top.
 *   Header is a separate floating bar to the right — canvas gap between them.
 *   APP_SHELL_PADDING      px-3 / sm:px-4 / lg:px-6  (12 / 16 / 24px)
 */
body.ers-app {
    font-family: "MTN", system-ui, sans-serif;
    --ers-page-bg: #F8F9FC;
    --ers-card: #FFFFFF;
    --ers-card-border: #E8ECF4;
    --ers-accent: #ff6b00;
    --ers-accent-hover: #e85f00;
    --ers-accent-soft: rgba(255, 107, 0, 0.12);
    --ers-accent-glow: rgba(255, 107, 0, 0.22);
    --ers-text: #1f2937;
    --ers-text-muted: #6b7280;
    --ers-border: #E8ECF4;
    --ers-radius: 12px;
    --ers-radius-lg: 16px;
    --ers-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    --ers-shadow-sm: 0 2px 12px rgba(15, 23, 42, 0.04);
    --ers-sidebar: #FFFFFF;
    --ers-nav: #475569;
    --ers-gutter-x: 16px;
    --ers-gutter-gap: 16px;
    --ers-gutter-top: 8px;
    --ers-gutter-bottom: 16px;
    --ers-header-h: 70px;
    --ers-sidebar-w: 248px;
}

html,
html body.ers-app,
html body.ers-app.loggedin,
html body.ers-app.loggedin .preloader,
body.ers-app #main-wrapper {
    background: #F8F9FC !important;
}

html body.ers-app .page-wrapper {
    background: #F8F9FC !important;
}

@media (min-width: 1024px) {
    html body.ers-app .page-wrapper {
        background: #FFFFFF !important;
    }
}

/* Inner page padding = v50 APP_SHELL_PADDING_CLASS */
body.ers-app .page-wrapper .container-fluid {
    padding: 12px 12px 16px !important;
}

@media (min-width: 640px) {
    body.ers-app .page-wrapper .container-fluid {
        padding: 16px 16px 16px !important;
    }
}

@media (min-width: 1024px) {
    body.ers-app .page-wrapper .container-fluid {
        padding: 16px 24px 24px !important;
    }
}

/* Logo lives in the sidebar, not the header */
body.ers-app .topbar .navbar-header {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
}

body.ers-app .ers-sidebar-brand {
    flex-shrink: 0;
    height: var(--ers-header-h);
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid var(--ers-card-border);
    background: #FFFFFF;
}

body.ers-app .ers-sidebar-brand .navbar-brand {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    min-height: 0;
}

body.ers-app .ers-sidebar-brand .logo-large {
    display: block;
    max-width: 200px;
    max-height: 44px;
    width: auto;
    height: auto;
    object-fit: contain;
}

body.ers-app .ers-sidebar-brand .logo-small {
    display: none;
    max-width: 40px;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
}

body.ers-app.mini-sidebar .ers-sidebar-brand {
    justify-content: center;
    padding: 0 8px;
}

body.ers-app.mini-sidebar .ers-sidebar-brand .logo-large {
    display: none;
}

body.ers-app.mini-sidebar .ers-sidebar-brand .logo-small {
    display: block;
}

body.ers-app .ers-settings-exit {
    padding: 4px 10px 10px;
}

body.ers-app .ers-settings-exit a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--ers-nav) !important;
    font-weight: 500;
}

body.ers-app .ers-settings-exit a:hover {
    background: color-mix(in srgb, var(--ers-accent) 8%, white);
    color: var(--ers-accent) !important;
}

body.ers-app.mini-sidebar .ers-settings-exit span {
    display: none;
}

/* Floating sidebar + header with canvas gap between them */
@media (min-width: 1024px) {
    html,
    html body.ers-app,
    html body.ers-app.loggedin {
        height: 100%;
        overflow: hidden !important;
    }

    body.ers-app #main-wrapper {
        height: 100vh;
        overflow: hidden;
    }

    body.ers-app.fix-sidebar .left-sidebar {
        top: 0 !important;
        bottom: var(--ers-gutter-bottom) !important;
        left: var(--ers-gutter-x) !important;
        height: auto !important;
        padding-top: 0 !important;
        width: var(--ers-sidebar-w) !important;
        border-radius: 0 0 var(--ers-radius-lg) var(--ers-radius-lg) !important;
        border: 1px solid var(--ers-card-border) !important;
        border-top: 0 !important;
        box-shadow: var(--ers-shadow);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        z-index: 51;
        background: #FFFFFF !important;
    }

    body.ers-app .left-sidebar .scroll-sidebar {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
    }

    body.ers-app.fix-header .topbar {
        top: 0;
        left: calc(var(--ers-gutter-x) + var(--ers-sidebar-w) + var(--ers-gutter-gap)) !important;
        right: var(--ers-gutter-x) !important;
        width: auto !important;
        margin-left: 0 !important;
        border-radius: 0 0 var(--ers-radius-lg) var(--ers-radius-lg);
        border: 1px solid var(--ers-card-border);
        border-top: 0;
        box-shadow: var(--ers-shadow);
        overflow: visible;
        background: #FFFFFF !important;
        z-index: 50;
    }

    /* Opaque canvas behind the header so scrolled content cannot show through */
    body.ers-app.fix-header .topbar::before {
        content: "";
        position: fixed;
        top: 0;
        left: calc(var(--ers-gutter-x) + var(--ers-sidebar-w) + var(--ers-gutter-gap));
        right: 0;
        height: calc(var(--ers-header-h) + var(--ers-gutter-top));
        background: var(--ers-page-bg);
        z-index: -1;
        pointer-events: none;
    }

    html body.ers-app .page-wrapper {
        position: fixed !important;
        top: calc(var(--ers-header-h) + var(--ers-gutter-top)) !important;
        left: calc(var(--ers-gutter-x) + var(--ers-sidebar-w) + var(--ers-gutter-gap)) !important;
        right: var(--ers-gutter-x) !important;
        bottom: var(--ers-gutter-bottom) !important;
        margin: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        width: auto !important;
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        background: #FFFFFF !important;
        border-radius: 12px;
        border: 1px solid #E8ECF4;
        box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
        overflow-x: hidden;
        overflow-y: auto;
    }

    body.ers-app .page-wrapper .container-fluid {
        min-height: 100%;
        box-sizing: border-box;
    }

    body.ers-app.mini-sidebar {
        --ers-sidebar-w: 70px;
    }

    body.ers-app.settings {
        --ers-sidebar-w: 248px;
    }
}

/* ── Cards = v50 DASHBOARD_CARD / OrganizationOverview CARD ─────────────── */
body.ers-app .card {
    background: #FFFFFF !important;
    border: 1px solid #E8ECF4 !important;
    border-radius: 16px !important;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04) !important;
    overflow: hidden;
}

body.ers-app .card:hover {
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06) !important;
}

body.ers-app .card-body {
    background: #FFFFFF;
}

body.ers-app .card-title,
body.ers-app .card-body > h5:first-child {
    color: var(--ers-text) !important;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-bottom: 0 !important;
    margin-bottom: 1rem;
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */
body.ers-app .left-sidebar,
body.ers-app .sidebar-nav {
    background: #FFFFFF !important;
}

body.ers-app .left-sidebar {
    border-right: none !important;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

body.ers-app .sidebar-nav {
    padding: 10px 8px 20px !important;
}

body.ers-app .sidebar-nav ul {
    padding: 0;
    margin: 0;
}

body.ers-app .sidebar-nav > ul > li {
    margin: 1px 0 !important;
}

body.ers-app .sidebar-nav > ul > li > a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 8px 28px 8px 16px !important;
    border-radius: 10px;
    color: var(--ers-nav) !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    line-height: 1.25;
    position: relative;
    border-left: 0 !important;
}

body.ers-app .sidebar-nav > ul > li > a i {
    width: 18px !important;
    min-width: 18px;
    height: 18px;
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 18px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    flex-shrink: 0;
}

body.ers-app .sidebar-nav > ul > li > a .hide-menu {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    font-size: inherit;
    font-weight: inherit;
}

body.ers-app .sidebar-nav ul li a:hover {
    color: var(--ers-accent) !important;
    background: color-mix(in srgb, var(--ers-accent) 8%, white);
}

body.ers-app .sidebar-nav ul li a:hover i {
    background: transparent !important;
}

body.ers-app .sidebar-nav > ul > li.active > a,
body.ers-app .sidebar-nav > ul > li.active > a:hover,
body.ers-app .sidebar-nav > ul > li > a.active {
    background: color-mix(in srgb, var(--ers-accent) 12%, white) !important;
    color: var(--ers-accent) !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    border-left: 0 !important;
    border-color: transparent !important;
}

body.ers-app .sidebar-nav > ul > li.active > a i,
body.ers-app .sidebar-nav > ul > li.active > a:hover i,
body.ers-app .sidebar-nav > ul > li > a.active i,
body.ers-app .sidebar-nav > ul > li.active > a i[class] {
    color: var(--ers-accent) !important;
    background: transparent !important;
}

body.ers-app .sidebar-nav > ul > li.active > a::before,
body.ers-app .sidebar-nav > ul > li > a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 10px 0 0 10px;
    background: var(--ers-accent);
}

body.ers-app .sidebar-nav .has-arrow::after {
    width: 6px;
    height: 6px;
    right: 12px;
    top: 50%;
    margin: 0;
    border-width: 1.5px 1.5px 0 0;
    border-style: solid;
    border-color: currentColor;
    transform: translateY(-50%) rotate(45deg);
    transform-origin: center;
    opacity: 0.7;
}

body.ers-app .sidebar-nav .active > .has-arrow::after,
body.ers-app .sidebar-nav li > .has-arrow.active::after,
body.ers-app .sidebar-nav .has-arrow[aria-expanded="true"]::after {
    top: 50%;
    width: 6px;
    height: 6px;
    transform: translateY(-50%) rotate(135deg);
}

body.ers-app .sidebar-nav ul li ul {
    padding: 2px 0 8px !important;
    margin: 0 !important;
}

body.ers-app .sidebar-nav ul li ul li {
    margin: 1px 0;
}

body.ers-app .sidebar-nav ul li ul li a {
    display: flex !important;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px 6px 40px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--ers-text-muted) !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 8px;
    position: relative;
    line-height: 1.25;
}

body.ers-app .sidebar-nav ul li ul li a::before {
    content: "";
    position: absolute;
    left: 26px;
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -2.5px;
    border-radius: 50%;
    background: #d0d5dd;
}

body.ers-app .sidebar-nav ul li ul li a:hover,
body.ers-app .sidebar-nav ul li ul li a.active {
    color: var(--ers-accent) !important;
    background: color-mix(in srgb, var(--ers-accent) 10%, white) !important;
    box-shadow: none !important;
    font-weight: 600 !important;
}

body.ers-app .sidebar-nav ul li ul li a.active::before,
body.ers-app .sidebar-nav ul li ul li a:hover::before {
    background: var(--ers-accent);
}

body.ers-app.mini-sidebar .sidebar-nav > ul > li > a {
    justify-content: center;
    padding: 10px 8px !important;
    gap: 0;
}

body.ers-app.mini-sidebar .sidebar-nav .has-arrow::after {
    display: none;
}

body.ers-app .ers-sidebar-help {
    margin: 18px 6px 8px;
    padding: 16px 14px;
    border-radius: var(--ers-radius);
    border: 1px solid var(--ers-border);
    background: color-mix(in srgb, var(--ers-accent) 6%, white);
}

body.ers-app .ers-sidebar-help h6 {
    font-size: 13px;
    font-weight: 600;
    color: var(--ers-text);
    margin: 0 0 4px;
}

body.ers-app .ers-sidebar-help p {
    font-size: 12px;
    color: var(--ers-text-muted);
    margin: 0 0 10px;
    line-height: 1.4;
}

body.ers-app .ers-sidebar-help .btn {
    width: 100%;
    border-radius: 999px !important;
    border: 1.5px solid var(--ers-accent) !important;
    color: var(--ers-accent) !important;
    background: #fff !important;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
}

body.ers-app .ers-sidebar-help .btn:hover {
    background: var(--ers-accent) !important;
    color: #fff !important;
}

body.ers-app.mini-sidebar .ers-sidebar-help {
    display: none;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
body.ers-app .topbar {
    background: #FFFFFF !important;
    box-shadow: none;
}

body.ers-app.fix-header .topbar {
    margin-left: 0 !important;
}

body.ers-app.fix-sidebar .left-sidebar {
    padding-top: 0 !important;
}

body.ers-app .left-sidebar .scroll-sidebar {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    overflow-y: auto;
}

@media (max-width: 1023px) {
    body.ers-app.fix-header .topbar {
        left: 0 !important;
        width: 100% !important;
    }
}

body.ers-app .topbar .navbar-collapse {
    width: 100%;
    border-bottom: 0 !important;
    background: #FFFFFF;
    border-radius: inherit;
}

body.ers-app .topbar .top-navbar .navbar-nav > .nav-item:not(.u-pro):not(.my-timer-container) > .nav-link {
    color: #64748b !important;
    width: 38px;
    height: 38px;
    margin: 16px 4px 0;
    line-height: 38px !important;
    padding: 0 !important;
    text-align: center;
    border-radius: 10px;
}

body.ers-app .topbar .top-navbar .navbar-nav > .nav-item:not(.u-pro) > .nav-link:hover {
    background: var(--ers-page-bg);
    color: var(--ers-accent) !important;
}

body.ers-app .topbar .profile-pic {
    border-left: 1px solid var(--ers-border) !important;
}

body.ers-app .topbar .profile-pic img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
}

body.ers-app .topbar .profile-pic span,
body.ers-app .topbar .top-navbar .navbar-nav > .nav-item > span {
    color: var(--ers-text) !important;
    font-size: 13px;
    font-weight: 600;
}

body.ers-app .notify .heartbit,
body.ers-app .notify .point {
    background: var(--ers-accent) !important;
}

body.ers-app .top-search-bar {
    padding-top: 16px;
    flex: 1 1 auto;
    max-width: 420px;
}

body.ers-app .top-search-bar .top-search-container {
    max-width: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    background: var(--ers-page-bg);
    border: 1px solid var(--ers-border);
    border-radius: 999px;
    padding: 0 12px 0 14px;
    height: 40px;
}

body.ers-app .top-search-bar .top-search-container i {
    position: static;
    top: auto;
    left: auto;
    color: #94a3b8 !important;
    margin-right: 8px;
}

body.ers-app .top-search-bar .top-search-container input {
    border: 0 !important;
    background: transparent !important;
    height: 38px;
    min-height: 38px;
    padding-left: 0 !important;
    font-size: 13.5px;
    box-shadow: none !important;
    flex: 1;
}

body.ers-app .ers-search-kbd {
    font-size: 11px;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1px 6px;
    background: #fff;
    white-space: nowrap;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
body.ers-app .btn-danger,
body.ers-app .btn-info,
body.ers-app .btn-primary,
body.ers-app .btn-add-circle {
    background: var(--ers-accent) !important;
    border-color: var(--ers-accent) !important;
    color: #fff !important;
}

body.ers-app .btn-danger:hover,
body.ers-app .btn-info:hover,
body.ers-app .btn-primary:hover {
    background: var(--ers-accent-hover) !important;
    border-color: var(--ers-accent-hover) !important;
}

body.ers-app .btn {
    border-radius: 8px;
    font-weight: 600;
}

body.ers-app .btn-rounded,
body.ers-app .btn-rounded-x {
    border-radius: 999px !important;
}

body.ers-app .form-control:focus,
body.ers-app select.form-control:focus,
body.ers-app .select2-container--default .select2-selection--single:focus {
    border-color: var(--ers-accent) !important;
    box-shadow: 0 0 0 3px var(--ers-accent-soft) !important;
}

/* Select2 / Bootstrap dropdowns: replace native blue hover with ERS orange.
   The results list is often appended to <body>, so this cannot be scoped to the modal. */
body.ers-app .select2-container--default .select2-results__option--highlighted[aria-selected],
body.ers-app .select2-container--default .select2-results__option--highlighted,
body.ers-app .select2-container--bootstrap .select2-results__option--highlighted[aria-selected],
body.ers-app .select2-container--bootstrap .select2-results__option--highlighted,
body.ers-app .select2-results__option--highlighted[aria-selected],
body.ers-app .select2-results__option--highlighted,
body.ers-app .select2-results__option[aria-selected="true"]:hover {
    background-color: var(--ers-accent) !important;
    background: var(--ers-accent) !important;
    color: #fff !important;
}

body.ers-app .select2-container--default .select2-results__option[aria-selected="true"],
body.ers-app .select2-container--bootstrap .select2-results__option[aria-selected="true"] {
    background-color: #fff4e8 !important;
    color: #9a3412 !important;
}

body.ers-app .dropdown-item:hover,
body.ers-app .dropdown-item:focus,
body.ers-app .dropdown-item.active,
body.ers-app .dropdown-item:active,
body.ers-app .dropdown-menu > .active > a,
body.ers-app .dropdown-menu > li > a:hover,
body.ers-app .dropdown-menu > li > a:focus {
    background-color: var(--ers-accent) !important;
    color: #fff !important;
}

body.ers-app select option:checked,
body.ers-app select option:hover,
body.ers-app select option:focus {
    background: var(--ers-accent) linear-gradient(var(--ers-accent), var(--ers-accent)) !important;
    color: #fff !important;
}

/* ── Tables / lists ─────────────────────────────────────────────────────── */
body.ers-app .table thead th {
    background: var(--ers-page-bg) !important;
    color: var(--ers-text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--ers-border) !important;
}

body.ers-app .table tbody tr:hover {
    background: color-mix(in srgb, var(--ers-accent) 4%, white);
}

body.ers-app .label,
body.ers-app .badge {
    border-radius: 999px;
    font-weight: 600;
}

body.ers-app .progress {
    height: 6px;
    border-radius: 999px;
    background: #eef2f7;
    overflow: hidden;
}

body.ers-app .progress-bar {
    background: var(--ers-accent) !important;
    border-radius: 999px;
}

body.ers-app .page-titles h3,
body.ers-app .list-page-actions-container h3 {
    color: var(--ers-text);
    font-weight: 650;
}

/* ── KPI tiles ──────────────────────────────────────────────────────────── */
body.ers-app .ers-kpi-card {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

body.ers-app .ers-kpi-card:hover {
    transform: translateY(-2px);
}

body.ers-app .ers-kpi-card .card-body {
    padding: 18px 18px 8px !important;
}

body.ers-app .ers-kpi-card .ers-kpi-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

body.ers-app .ers-kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
}

body.ers-app .ers-kpi-icon.is-orange { background: #fff4e8; color: var(--ers-accent); }
body.ers-app .ers-kpi-icon.is-green { background: #ecfdf3; color: #12b76a; }
body.ers-app .ers-kpi-icon.is-amber { background: #fffaeb; color: #f79009; }
body.ers-app .ers-kpi-icon.is-red { background: #fef3f2; color: #f04438; }
body.ers-app .ers-kpi-icon.is-blue { background: #eff8ff; color: #1570ef; }

body.ers-app .ers-kpi-card h2 {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ers-text);
    margin: 0;
    line-height: 1.2;
}

body.ers-app .ers-kpi-card h6 {
    font-size: 12.5px;
    color: var(--ers-text-muted) !important;
    font-weight: 500;
    margin: 2px 0 0;
}

body.ers-app .ers-kpi-spark {
    display: block;
    width: 100%;
    height: 36px;
    margin-top: 8px;
}

body.ers-app .ers-kpi-card > .progress {
    display: none;
}

/* ── Dashboard charts ───────────────────────────────────────────────────── */
body.ers-app .incomeexpenses .ct-series-a .ct-area {
    fill: var(--ers-accent) !important;
    fill-opacity: 0.16;
}

body.ers-app .incomeexpenses .ct-series-a .ct-line,
body.ers-app .incomeexpenses .ct-series-a .ct-point {
    stroke: var(--ers-accent) !important;
}

body.ers-app .incomeexpenses .ct-series-b .ct-area {
    fill: #94a3b8 !important;
    fill-opacity: 0.12;
}

body.ers-app .incomeexpenses .ct-series-b .ct-line,
body.ers-app .incomeexpenses .ct-series-b .ct-point {
    stroke: #94a3b8 !important;
}

body.ers-app .ers-chart-legend .label-success,
body.ers-app .ers-chart-legend .label-info {
    background: transparent !important;
    color: var(--ers-text-muted) !important;
    font-weight: 600;
}

body.ers-app .ers-chart-legend .label-success i { color: var(--ers-accent); }
body.ers-app .ers-chart-legend .label-info i { color: #94a3b8; }

body.ers-app .ers-stat-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

body.ers-app .ers-stat-pill {
    flex: 1;
    min-width: 120px;
    background: #F8F9FC;
    border: 1px solid #EEF2F7;
    border-radius: 12px;
    padding: 12px 14px;
    text-align: left;
}

body.ers-app .ers-stat-pill h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 2px;
    color: var(--ers-text);
}

body.ers-app .ers-stat-pill small {
    color: var(--ers-text-muted);
    font-size: 12px;
}

/* ── Projects overview ──────────────────────────────────────────────────── */
body.ers-app .ers-project-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #eef2f7;
    text-decoration: none !important;
    color: inherit;
}

body.ers-app .ers-project-row:last-child {
    border-bottom: 0;
}

body.ers-app .ers-project-row:hover {
    opacity: 0.88;
}

body.ers-app .ers-project-row h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--ers-text);
    margin: 0 0 4px;
}

body.ers-app .ers-project-meta {
    font-size: 12px;
    color: var(--ers-text-muted);
}

body.ers-app .ers-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    margin-left: auto;
    white-space: nowrap;
}

body.ers-app .ers-status.is-progress { background: #ecfdf3; color: #027a48; }
body.ers-app .ers-status.is-planning { background: #eff8ff; color: #175cd3; }
body.ers-app .ers-status.is-hold { background: #fffaeb; color: #b54708; }
body.ers-app .ers-status.is-done { background: #f2f4f7; color: #344054; }
body.ers-app .ers-status.is-new { background: #fff4e8; color: var(--ers-accent); }

body.ers-app .ers-mini-bar {
    height: 6px;
    border-radius: 999px;
    background: #eef2f7;
    margin-top: 8px;
    overflow: hidden;
}

body.ers-app .ers-mini-bar > span {
    display: block;
    height: 100%;
    background: var(--ers-accent);
    border-radius: 999px;
}

/* ── Activity ───────────────────────────────────────────────────────────── */
body.ers-app .dashboard-events.profiletimeline {
    padding-left: 8px;
}

body.ers-app .modal-backdrop {
    background: #0f172a;
}
body.ers-app .modal-backdrop.show {
    opacity: 0.48;
}

body.ers-app .modal-content,
body.ers-app .ers-modal {
    background: #FFFFFF !important;
    border-radius: 20px !important;
    border: 1px solid #E8ECF4 !important;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18) !important;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    display: flex !important;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100vh - 3rem);
}

body.ers-app .modal .modal-dialog {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

body.ers-app #commonModal .modal-dialog,
body.ers-app #plainModal .modal-dialog,
body.ers-app #actionsModal .modal-dialog,
body.ers-app #commonModal #commonModalContainer {
    width: calc(100% - 32px);
    max-width: 640px;
    margin: 1.5rem auto !important;
    max-height: calc(100vh - 3rem);
    display: flex;
    flex-direction: column;
}

body.ers-app #commonModal .modal-dialog > form,
body.ers-app #plainModal .modal-dialog > form,
body.ers-app #actionsModal .modal-dialog > form,
body.ers-app #commonModalForm {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: calc(100vh - 3rem);
    flex: 1 1 auto;
    width: 100%;
}

body.ers-app #commonModal.show #commonModalContainer.modal-lg,
body.ers-app #commonModal.show #commonModalContainer.modal-xl,
body.ers-app #commonModal.show #commonModalContainer.modal-lg .modal-content,
body.ers-app #commonModal.show #commonModalContainer.modal-xl .modal-content {
    max-height: calc(100vh - 3rem) !important;
    overflow: hidden;
}

body.ers-app #commonModal .modal-dialog.modal-lg,
body.ers-app #plainModal .modal-dialog.modal-lg,
body.ers-app #commonModal #commonModalContainer.modal-lg {
    max-width: 760px;
}

body.ers-app #commonModal .modal-dialog.modal-sm,
body.ers-app #plainModal .modal-dialog.modal-sm,
body.ers-app #actionsModal .modal-dialog.modal-sm {
    max-width: 420px;
}

body.ers-app #commonModalHeader,
body.ers-app #plainModal .modal-header,
body.ers-app #actionsModal .modal-header {
    background: #fff !important;
    border-bottom: 1px solid #E8ECF4 !important;
    min-height: 56px;
    padding: 14px 20px !important;
    padding-right: 56px !important;
    flex: 0 0 auto;
}

body.ers-app #commonModalFooter,
body.ers-app #actionsModalFooter {
    flex: 0 0 auto;
}

body.ers-app #commonModalTitle,
body.ers-app #plainModalTitle,
body.ers-app #actionsModalTitle,
body.ers-app .modal .modal-dialog .modal-header .modal-title,
body.ers-app #commonModalHeader .modal-title {
    color: var(--ers-accent) !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em;
    line-height: 1.3;
}

body.ers-app #commonModalCloseIcon,
body.ers-app #plainModal .modal-header button.close,
body.ers-app #actionsModal .modal-header button.close {
    width: 36px;
    height: 36px;
    right: 16px !important;
    border-radius: 10px;
    background: #F8F9FC;
    opacity: 1 !important;
    font-size: 22px !important;
    line-height: 36px !important;
    color: #667085;
    padding: 0 !important;
}
body.ers-app #commonModalCloseIcon:hover,
body.ers-app #plainModal .modal-header button.close:hover,
body.ers-app #actionsModal .modal-header button.close:hover {
    background: #eef2f7;
    color: #111827;
    opacity: 1 !important;
}

body.ers-app #commonModalBody,
body.ers-app #plainModalBody,
body.ers-app #actionsModalBody,
body.ers-app #commonModal #commonModalBody.min-h-200,
body.ers-app #commonModal.show #commonModalContainer.modal-lg #commonModalBody,
body.ers-app #commonModal.show #commonModalContainer.modal-xl #commonModalBody {
    padding: 16px 20px 12px !important;
    background: #fff;
    flex: 1 1 auto;
    min-height: 0 !important;
    max-height: none;
    max-width: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

body.ers-app #commonModal form,
body.ers-app #actionsModal form,
body.ers-app #commonModal .modal-body > .row,
body.ers-app #commonModal .modal-body .col-lg-12 {
    max-width: 100%;
    min-width: 0;
}

body.ers-app #commonModal .row,
body.ers-app #plainModal .row,
body.ers-app #actionsModal .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
}

body.ers-app #commonModal [class*="col-"],
body.ers-app #plainModal [class*="col-"],
body.ers-app #actionsModal [class*="col-"] {
    min-width: 0;
}

body.ers-app #commonModal .select2-container,
body.ers-app #actionsModal .select2-container {
    width: 100% !important;
    max-width: 100% !important;
}

body.ers-app #commonModal .form-control,
body.ers-app #commonModal input,
body.ers-app #commonModal select,
body.ers-app #commonModal textarea,
body.ers-app #actionsModal .form-control {
    max-width: 100%;
    box-sizing: border-box;
}

body.ers-app #commonModalFooter,
body.ers-app #actionsModalFooter {
    background: #F8F9FC !important;
    border-top: 1px solid #E8ECF4 !important;
    padding: 12px 20px !important;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

body.ers-app #commonModalCloseButton,
body.ers-app #actionsModalFooter .btn-secondary,
body.ers-app #commonModalFooter .btn-secondary {
    min-height: 42px;
    padding: 9px 18px !important;
    border-radius: 10px !important;
    border: 1px solid #E8ECF4 !important;
    background: #fff !important;
    color: #344054 !important;
    font-weight: 600;
    box-shadow: none !important;
}

body.ers-app #commonModalSubmitButton,
body.ers-app #actionsModalButton,
body.ers-app #commonModalFooter .btn-danger,
body.ers-app #actionsModalFooter .btn-danger {
    min-height: 42px;
    padding: 9px 20px !important;
    border-radius: 10px !important;
    background: var(--ers-accent) !important;
    border-color: var(--ers-accent) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(255, 107, 0, 0.22) !important;
}

body.ers-app #commonModal .form-horizontal .form-group,
body.ers-app #actionsModal .form-horizontal .form-group,
body.ers-app .ers-modal-form .form-group {
    margin-bottom: 12px;
}

body.ers-app #commonModal .form-group.row,
body.ers-app #actionsModal .form-group.row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
}

body.ers-app #commonModal .hidden,
body.ers-app #plainModal .hidden,
body.ers-app #actionsModal .hidden,
body.ers-app #commonModal .form-group.row.hidden,
body.ers-app #actionsModal .form-group.row.hidden,
body.ers-app #commonModal small.hidden {
    display: none !important;
}

body.ers-app #commonModal .form-group.row > label[class*="col-"],
body.ers-app #actionsModal .form-group.row > label[class*="col-"] {
    flex: 0 0 30%;
    max-width: 30%;
    width: 30%;
    padding-right: 12px;
    padding-left: 0;
    margin-bottom: 0;
}

body.ers-app #commonModal .form-group.row > [class*="col-"]:not(label),
body.ers-app #actionsModal .form-group.row > [class*="col-"]:not(label) {
    flex: 1 1 70%;
    max-width: 70%;
    width: 70%;
    padding-left: 0;
    padding-right: 0;
}

body.ers-app #commonModal .control-label,
body.ers-app #commonModal .col-form-label,
body.ers-app #actionsModal .control-label,
body.ers-app #actionsModal .col-form-label,
body.ers-app .ers-modal-form label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #344054 !important;
    margin-bottom: 0;
    padding-top: 11px !important;
    text-align: left !important;
}

body.ers-app .ers-modal-field {
    display: grid;
    grid-template-columns: 30% 1fr;
    gap: 4px 12px;
    align-items: start;
    margin-bottom: 12px;
}

body.ers-app .ers-modal-field > label {
    padding-top: 11px;
    margin-bottom: 0;
}

body.ers-app .ers-modal-field > :not(label) {
    grid-column: 2;
    min-width: 0;
    max-width: 100%;
}

body.ers-app .ers-modal-grid {
    display: block;
    margin-bottom: 0;
}

body.ers-app #commonModal .form-control,
body.ers-app #commonModal textarea,
body.ers-app #actionsModal .form-control,
body.ers-app #actionsModal textarea,
body.ers-app .ers-modal-form .form-control,
body.ers-app .ers-modal-form textarea {
    min-height: 42px;
    height: 42px;
    border: 1px solid #E8ECF4 !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    font-size: 14px;
    color: #1f2937;
    background: #fff !important;
    box-shadow: none !important;
}
body.ers-app #commonModal textarea,
body.ers-app .ers-modal-form textarea {
    height: auto;
    min-height: 96px;
    resize: vertical;
}

body.ers-app #commonModal .form-control:focus,
body.ers-app #commonModal textarea:focus,
body.ers-app .ers-modal-form .form-control:focus,
body.ers-app .ers-modal-form textarea:focus {
    border-color: #ffc48a !important;
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.12) !important;
}

body.ers-app #commonModal .input-group-addon,
body.ers-app .ers-modal-form .input-group-addon,
body.ers-app .ers-modal-form .input-group-text {
    background: #F8F9FC !important;
    border: 1px solid #E8ECF4 !important;
    border-right: 0 !important;
    border-radius: 10px 0 0 10px !important;
    color: #667085;
    font-weight: 700;
    min-width: 42px;
}
body.ers-app #commonModal .input-group .form-control,
body.ers-app .ers-modal-form .input-group .form-control {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

body.ers-app #commonModal .select2-container .select2-selection--single,
body.ers-app .ers-modal .select2-container .select2-selection--single {
    height: 42px !important;
    border: 1px solid #E8ECF4 !important;
    border-radius: 10px !important;
    background: #fff !important;
}
body.ers-app #commonModal .select2-container .select2-selection--single .select2-selection__rendered,
body.ers-app .ers-modal .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 40px !important;
    padding-left: 12px !important;
    color: #1f2937;
    font-size: 14px;
}
body.ers-app #commonModal .select2-container .select2-selection--single .select2-selection__arrow,
body.ers-app .ers-modal .select2-container .select2-selection--single .select2-selection__arrow {
    height: 40px !important;
}
body.ers-app #commonModal .select2-container .select2-selection--multiple,
body.ers-app .ers-modal .select2-container .select2-selection--multiple {
    min-height: 42px !important;
    border: 1px solid #E8ECF4 !important;
    border-radius: 10px !important;
    padding: 4px 8px;
}

body.ers-app #commonModal small,
body.ers-app .ers-field-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #98a2b3 !important;
    line-height: 1.4;
}

body.ers-app #commonModal .line,
body.ers-app .ers-modal-form .line {
    display: none;
}

body.ers-app .ers-modal-form {
    display: block;
}

body.ers-app .ers-check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #E8ECF4;
    border-radius: 12px;
    background: #F8F9FC;
    margin-bottom: 16px;
}
body.ers-app .ers-check-row .filled-in + label {
    margin: 0;
    padding-left: 28px;
    padding-top: 0 !important;
    height: 22px;
}
body.ers-app .ers-check-row strong {
    display: block;
    font-size: 13px;
    color: #1f2937;
}
body.ers-app .ers-check-row small {
    margin: 2px 0 0;
}

body.ers-app .ers-modal-card {
    border: 1px solid #E8ECF4;
    border-radius: 12px;
    background: #fff;
    padding: 14px 16px;
    margin-bottom: 16px;
}
body.ers-app .ers-modal-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
body.ers-app .ers-modal-card-head .title {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
}

body.ers-app #commonModal .dropzone {
    border: 1.5px dashed #d0d5dd !important;
    border-radius: 12px !important;
    background: #F8F9FC !important;
    min-height: 118px;
    margin-top: 12px;
}
body.ers-app #commonModal .dropzone .dz-message {
    margin: 18px 0;
    color: #667085;
}

body.ers-app .ers-modal-req {
    margin: 4px 0 8px;
    font-size: 12px;
    color: #98a2b3;
}

body.ers-app .ers-detail-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    margin-bottom: 16px;
    border-radius: 14px;
    background: #fff7ed;
    border: 1px solid #ffead0;
}
body.ers-app .ers-detail-hero small {
    color: #9a3412 !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
    margin: 0;
}
body.ers-app .ers-detail-hero strong {
    display: block;
    font-size: 1.55rem;
    letter-spacing: -0.03em;
    color: #9a3412;
    line-height: 1.1;
    margin-top: 4px;
}

body.ers-app .ers-detail-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    margin: 0;
}
body.ers-app .ers-detail-list > div {
    padding: 10px 12px;
    background: #F8F9FC;
    border-radius: 10px;
}
body.ers-app .ers-detail-list dt {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #98a2b3;
    margin: 0 0 4px;
}
body.ers-app .ers-detail-list dd {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}
body.ers-app .ers-detail-list .is-wide {
    grid-column: 1 / -1;
}

body.ers-app .ers-modal-alert {
    border: 0;
    border-radius: 12px;
    background: #eff8ff;
    color: #175cd3;
    padding: 12px 14px;
    font-size: 13px;
}

@media (max-width: 767px) {
    body.ers-app .ers-modal-grid,
    body.ers-app .ers-detail-list,
    body.ers-app .ers-modal-field {
        grid-template-columns: 1fr;
    }
    body.ers-app .ers-modal-field > :not(label) {
        grid-column: 1;
    }
    body.ers-app #commonModal .form-group.row,
    body.ers-app #actionsModal .form-group.row {
        flex-wrap: wrap;
    }
    body.ers-app #commonModal .form-group.row > label[class*="col-"],
    body.ers-app #actionsModal .form-group.row > label[class*="col-"],
    body.ers-app #commonModal .form-group.row > [class*="col-"]:not(label),
    body.ers-app #actionsModal .form-group.row > [class*="col-"]:not(label) {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        padding-right: 0;
    }
    body.ers-app #commonModal .modal-dialog,
    body.ers-app #plainModal .modal-dialog,
    body.ers-app #actionsModal .modal-dialog,
    body.ers-app #commonModal #commonModalContainer {
        width: calc(100% - 24px);
        max-width: calc(100% - 24px);
        margin: 12px auto !important;
        max-height: calc(100vh - 24px);
    }
    body.ers-app .modal-content,
    body.ers-app .ers-modal,
    body.ers-app #commonModalForm,
    body.ers-app #commonModal .modal-dialog > form {
        max-height: calc(100vh - 24px);
        border-radius: 16px !important;
    }
    body.ers-app #commonModalFooter,
    body.ers-app #actionsModalFooter {
        flex-direction: column-reverse;
    }
    body.ers-app #commonModalFooter .btn,
    body.ers-app #actionsModalFooter .btn {
        width: 100%;
        margin: 0 !important;
    }
}

@media (max-width: 1023px) {
    body.ers-app .ers-sidebar-help {
        display: none;
    }
}

/* ── Expenses dashboard ─────────────────────────────────────────────────── */
body.ers-app .ers-expenses-header.row.page-titles {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.ers-app .ers-expenses-header > #breadcrumbs {
    flex: 0 1 auto;
    width: auto !important;
    max-width: 100% !important;
    padding: 0 !important;
}

body.ers-app .ers-expenses-header > #list-page-actions-container {
    flex: 1 0 auto;
    width: auto !important;
    max-width: 100% !important;
    min-width: 0;
    padding: 0 !important;
    text-align: right;
}

body.ers-app .ers-expenses-page .page-titles h3 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 2px;
}

body.ers-app .ers-expenses-page .breadcrumb {
    font-size: 12px;
    background: transparent;
    padding: 0;
    margin: 0;
}

body.ers-app .ers-expenses-page .breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #98a2b3;
}

body.ers-app .ers-expenses-page .breadcrumb-item.active {
    color: var(--ers-accent);
    font-weight: 600;
}

body.ers-app .ers-expenses-kpis {
    margin: 0 0 18px;
}

body.ers-app .ers-expenses-kpis > [class*="col-"] {
    padding: 0 8px;
    margin-bottom: 16px;
}

body.ers-app .ers-kpi-period {
    font-size: 11px;
    color: var(--ers-text-muted);
    margin-top: -4px;
    margin-bottom: 6px;
}

body.ers-app .ers-expenses-toolbar {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap !important;
    gap: 8px;
    width: 100%;
}

body.ers-app .ers-toolbar-search.header-search {
    position: relative;
    margin: 0;
    flex: 1 1 160px;
    width: auto;
    min-width: 140px;
    max-width: 200px;
    display: block;
}

body.ers-app .ers-toolbar-search.header-search input {
    height: 38px;
    border: 1px solid #e8ecf4;
    border-radius: 10px;
    background: #f8f9fc;
    padding-left: 34px;
    font-size: 13px;
    width: 100%;
}

body.ers-app .ers-toolbar-search.header-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #98a2b3 !important;
    display: inline-block !important;
    font-size: 16px !important;
    line-height: 1 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

body.ers-app .ers-toolbar-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 6px;
    height: 38px;
    padding: 0 14px;
    border-radius: 10px !important;
    font-size: 13px !important;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    overflow: visible;
}

body.ers-app .ers-toolbar-btn i,
body.ers-app .ers-toolbar-btn i:before {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 16px !important;
    line-height: 1 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    vertical-align: middle;
}

body.ers-app .ers-toolbar-btn .ers-caret,
body.ers-app .ers-toolbar-btn .ers-caret:before {
    font-size: 11px !important;
    opacity: 0.85;
}

body.ers-app .ers-toolbar-btn-outline {
    background: #fff !important;
    color: var(--ers-accent) !important;
    border-color: var(--ers-accent) !important;
}

body.ers-app #list-page-actions .ers-toolbar-btn-outline.list-actions-button,
body.ers-app #list-page-actions .ers-toolbar-btn-outline.list-actions-button:hover,
body.ers-app #list-page-actions .ers-toolbar-btn-outline.list-actions-button.active {
    background: #fff !important;
    color: var(--ers-accent) !important;
    border: 1px solid var(--ers-accent) !important;
}

body.ers-app #list-page-actions .ers-toolbar-btn-outline.list-actions-button i,
body.ers-app #list-page-actions .ers-toolbar-btn-outline.list-actions-button i:before {
    color: var(--ers-accent) !important;
}

body.ers-app .ers-toolbar-btn-solid i,
body.ers-app .ers-toolbar-btn-solid i:before {
    color: #fff !important;
}

body.ers-app .ers-toolbar-btn-outline:hover,
body.ers-app #list-page-actions .ers-toolbar-btn-outline.list-actions-button:hover {
    background: var(--ers-accent-soft) !important;
}

body.ers-app .ers-toolbar-btn-outline.active,
body.ers-app .ers-toolbar-btn-outline.filter,
body.ers-app #list-page-actions .ers-toolbar-btn-outline.list-actions-button.active {
    background: var(--ers-accent-soft) !important;
}

body.ers-app .ers-toolbar-btn-solid {
    background: var(--ers-accent) !important;
    border-color: var(--ers-accent) !important;
    color: #fff !important;
}

body.ers-app .ers-toolbar-btn-solid:hover {
    background: var(--ers-accent-hover) !important;
}

body.ers-app .ers-toolbar-icon {
    width: 38px;
    min-width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #e8ecf4;
    background: #fff;
    color: #667085;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    overflow: visible;
    font-size: 16px !important;
}

body.ers-app .ers-toolbar-icon i,
body.ers-app .ers-toolbar-icon i:before {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 16px !important;
    line-height: 1 !important;
    color: inherit !important;
}

body.ers-app #list-page-actions .ers-toolbar-icon.list-actions-button {
    background: #fff !important;
    border: 1px solid #e8ecf4 !important;
    color: #667085 !important;
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
}

body.ers-app .ers-expenses-workspace {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
}

body.ers-app .ers-expenses-aside {
    float: right !important;
    width: 340px !important;
    max-width: 340px !important;
    margin: 0 0 16px 16px !important;
}

body.ers-app .ers-expenses-main {
    display: block !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

body.ers-app .ers-expenses-page .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.ers-app .ers-expenses-table-card {
    margin-bottom: 16px;
    max-width: 100%;
    overflow: hidden;
}

body.ers-app .ers-expenses-table-card .table-responsive,
body.ers-app .ers-expenses-table-card .list-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

body.ers-app .ers-expenses-table-card .card-body {
    padding: 0 !important;
}

body.ers-app .ers-expenses-table {
    margin: 0;
}

body.ers-app .ers-expenses-table thead th {
    white-space: nowrap;
    padding: 12px 14px;
}

body.ers-app .ers-expenses-table tbody td {
    padding: 12px 14px;
    vertical-align: middle;
    color: #344054;
    border-top: 1px solid #f2f4f7;
}

body.ers-app .ers-expense-desc {
    display: inline-block;
    max-width: 260px;
    white-space: normal;
    line-height: 1.35;
    color: #1f2937;
}

body.ers-app .ers-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    white-space: nowrap;
}

body.ers-app .ers-pill.is-orange {
    background: #fff4e8;
    color: var(--ers-accent);
}

body.ers-app .ers-pill.is-muted {
    background: #f2f4f7;
    color: #475467;
}

body.ers-app .ers-pill.is-paid {
    background: #ecfdf3;
    color: #027a48;
}

body.ers-app .ers-pill.is-billable {
    background: #fffaeb;
    color: #b54708;
}

body.ers-app .ers-user-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

body.ers-app .ers-user-cell .ers-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

body.ers-app .ers-amount {
    font-weight: 700;
    color: #101828;
    white-space: nowrap;
}

body.ers-app .ers-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

body.ers-app .ers-dots-btn,
body.ers-app .ers-pin-btn {
    width: 32px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #98a2b3;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.ers-app .ers-dots-btn:hover,
body.ers-app .ers-pin-btn:hover {
    background: #f2f4f7;
    color: #344054;
}

body.ers-app .ers-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px 16px;
    border-top: 1px solid #eef2f7;
}

body.ers-app .ers-table-footer-meta {
    font-size: 12px;
    color: var(--ers-text-muted);
}

body.ers-app .ers-per-page {
    margin-left: 10px;
    padding: 4px 8px;
    border: 1px solid #e8ecf4;
    border-radius: 8px;
    background: #fff;
}

body.ers-app .ers-pager {
    display: flex;
    align-items: center;
    gap: 4px;
}

body.ers-app .ers-page {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #475467 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
}

body.ers-app .ers-page.is-active {
    background: var(--ers-accent);
    color: #fff !important;
}

body.ers-app .ers-page.is-disabled,
body.ers-app .ers-page.is-gap {
    pointer-events: none;
    opacity: 0.45;
}

body.ers-app .ers-table-footer .loadmore-button-container {
    display: none !important;
}

body.ers-app .ers-expenses-widget {
    margin-bottom: 16px;
}

body.ers-app .ers-expenses-widget .card-body {
    padding: 18px !important;
}

body.ers-app .ers-expenses-widget .card-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

body.ers-app .ers-widget-empty {
    font-size: 13px;
    color: var(--ers-text-muted);
    margin: 8px 0 0;
}

body.ers-app .ers-donut-wrap {
    display: flex;
    justify-content: center;
    margin: 4px 0 16px;
}

body.ers-app .ers-donut {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    position: relative;
}

body.ers-app .ers-donut::after {
    content: "";
    position: absolute;
    inset: 32px;
    background: #fff;
    border-radius: 50%;
}

body.ers-app .ers-donut-legend {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.ers-app .ers-donut-legend li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 5px 0;
}

body.ers-app .ers-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

body.ers-app .ers-legend-name {
    flex: 1;
    color: #344054;
    font-weight: 600;
}

body.ers-app .ers-legend-meta {
    color: var(--ers-text-muted);
    white-space: nowrap;
}

body.ers-app .ers-project-bar {
    display: block;
    padding: 8px 0;
    text-decoration: none !important;
    color: inherit;
}

body.ers-app .ers-bar-name {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

body.ers-app .ers-bar-total {
    font-size: 12px;
    font-weight: 700;
    color: #344054;
}

body.ers-app .ers-activity-feed {
    list-style: none;
    margin: 0;
    padding: 0;
}

body.ers-app .ers-activity-feed li {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f2f4f7;
}

body.ers-app .ers-activity-feed li:last-child {
    border-bottom: 0;
}

body.ers-app .ers-activity-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
}

body.ers-app .ers-activity-icon.is-green { background: #ecfdf3; color: #12b76a; }
body.ers-app .ers-activity-icon.is-amber { background: #fffaeb; color: #f79009; }

body.ers-app .ers-activity-feed strong {
    display: block;
    font-size: 13px;
    color: #1f2937;
}

body.ers-app .ers-activity-feed em {
    display: block;
    font-style: normal;
    font-size: 12px;
    color: #475467;
}

body.ers-app .ers-activity-feed small {
    display: block;
    font-size: 11px;
    color: #98a2b3;
    margin-top: 2px;
}

@media (max-width: 1199px) {
    body.ers-app .ers-toolbar-search.header-search {
        max-width: 160px;
        min-width: 120px;
    }

    body.ers-app .ers-expenses-aside {
        width: 280px !important;
        max-width: 280px !important;
    }
}

@media (max-width: 767px) {
    body.ers-app .ers-expenses-toolbar {
        justify-content: flex-start;
    }

    body.ers-app .ers-expenses-aside {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 16px 0 0 0 !important;
    }
}
