:root {
    --ep-color-primary: #172e7f;
    --ep-color-primary-strong: #1f4b7a;
    --ep-color-secondary: #475480;
    --ep-color-accent: #67aac7;
    --ep-color-accent-soft: #74b5cc;
    --ep-color-mint: #96e0d9;
    --ep-color-mint-soft: #cef2ea;
    --ep-color-surface: #ffffff;
    --ep-color-surface-muted: #f5f7fa;
    --ep-color-surface-soft: #f8fafc;
    --ep-color-border: #e6eaf0;
    --ep-color-border-strong: #d7deea;
    --ep-color-text: #1b2740;
    --ep-color-text-strong: #16324f;
    --ep-color-text-muted: #66768c;
    --ep-color-danger: #a63a50;
    --ep-color-danger-soft: #fbe8ed;
    --ep-color-shadow: rgba(20, 33, 74, 0.08);

    --ep-sidebar-text: var(--ep-color-secondary);
    --ep-sidebar-text-muted: var(--ep-color-text-muted);
    --ep-sidebar-active-color: var(--ep-color-primary-strong);
    --ep-sidebar-active-bg: rgba(103, 170, 199, 0.16);
    --ep-sidebar-hover-bg: rgba(103, 170, 199, 0.08);
    --ep-sidebar-rail: rgba(103, 170, 199, 0.3);
    --ep-sidebar-label-color: #94a3b8;
    --ep-font-family-accent: "Manrope", var(--ep-font-family);

    --ep-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --ep-radius-sm: 10px;
    --ep-radius-md: 14px;
    --ep-radius-lg: 10px;
    --ep-shadow-sm: 0 10px 30px rgba(20, 33, 74, 0.05);
    --ep-shadow-md: 0 18px 40px rgba(20, 33, 74, 0.08);
    --ep-transition: 180ms ease;

    --bs-primary: var(--ep-color-primary);
    --bs-primary-rgb: 23, 46, 127;
    --bs-secondary: var(--ep-color-secondary);
    --bs-secondary-rgb: 71, 84, 128;
    --bs-success: var(--ep-color-accent);
    --bs-success-rgb: 103, 170, 199;
    --bs-info: var(--ep-color-accent-soft);
    --bs-info-rgb: 116, 181, 204;
    --bs-warning: var(--ep-color-secondary);
    --bs-warning-rgb: 71, 84, 128;
    --bs-danger: var(--ep-color-danger);
    --bs-danger-rgb: 166, 58, 80;
    --bs-light: #eef2f7;
    --bs-light-rgb: 238, 242, 247;
    --bs-dark: var(--ep-color-primary);
    --bs-dark-rgb: 23, 46, 127;
    --bs-body-font-family: var(--ep-font-family);
    --bs-font-sans-serif: var(--ep-font-family);
    --bs-body-font-size: 0.95rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.5;
    --bs-body-color: var(--ep-color-text);
    --bs-body-bg: var(--ep-color-surface-muted);
    --bs-heading-color: var(--ep-color-primary);
    --bs-link-color: var(--ep-color-primary);
    --bs-link-hover-color: var(--ep-color-primary-strong);
    --bs-border-color: var(--ep-color-border);
    --bs-border-radius: var(--ep-radius-sm);
    --bs-border-radius-sm: var(--ep-radius-sm);
    --bs-border-radius-lg: var(--ep-radius-md);
    --bs-box-shadow: var(--ep-shadow-sm);
    --bs-box-shadow-sm: 0 8px 24px rgba(20, 33, 74, 0.04);
    --bs-box-shadow-lg: var(--ep-shadow-md);
}

html,
body,
button,
input,
select,
textarea {
    font-family: var(--ep-font-family);
}

body {
    background: var(--ep-color-surface-muted);
    color: var(--ep-color-text);
    font-weight: 400;
}

.wrapper:before,
.content,
.main {
    background: var(--ep-color-surface-muted);
}

/* Theme ExactusPay.css sets:
   - .container-fluid { width: 95% } (insets cards while decorative bands stay full-bleed)
   - .main { width/min-width: 100vw } (main sits beside the sidebar, so 100vw overflows
     and .wrapper { overflow: hidden } clips the right edge — asymmetric gutters)
   - .wrapper:before { height: 264px } full-bleed band behind the page header
   Normalize the shell so page header + directory cards share one width. */
.wrapper:before {
    display: none !important;
    content: none !important;
    height: 0 !important;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
}

.wrapper {
    /* clip (not hidden) so horizontal bleed is contained without breaking sticky */
    overflow-x: clip;
    overflow-y: visible;
    min-height: 100vh;
    align-items: flex-start;
}

/* Long nav must not inflate page height past the footer. */
.sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.sidebar .sidebar-content {
    flex: 1 1 auto;
    min-height: 0 !important;
    height: auto !important;
    overflow-x: hidden;
    overflow-y: auto;
}

.main {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 100vh;
    /* clip (not hidden) so the sticky app header can pin while scrolling */
    overflow-x: clip !important;
    overflow-y: visible !important;
}

/* Tighten the global main canvas (below navbar, beside sidebar).
   Theme defaults: .content margin-top 3rem + side padding, plus .ep-shell.
   Page header is full-bleed; body content keeps side padding via .ep-shell. */
.content {
    flex: 1 1 auto;
    margin-top: 0;
    padding: 0;
}

.container-fluid.ep-shell,
.ep-shell.container-fluid {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 992px) {
    .container-fluid.ep-shell,
    .ep-shell.container-fluid {
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6,
.header-title,
.page-context-country-name,
.company-context-name,
.card-title {
    color: var(--ep-color-primary);
    font-family: var(--ep-font-family);
    font-weight: 400;
    letter-spacing: -0.02em;
}

small,
.small,
.text-muted,
.breadcrumb-item,
.company-meta,
.kpi-title {
    color: var(--ep-color-text-muted) !important;
}

a {
    transition: color var(--ep-transition), opacity var(--ep-transition);
}

.sidebar,
.sidebar-content {
    background: #ffffff;
    border-right: 1px solid var(--ep-color-border);
}

.sidebar-brand {
    color: #0f172a;
    background: #fff;
    font-family: var(--ep-font-family-accent);
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
    /* padding: 0.85rem 1rem 0.35rem; */
}

/* ExactusPay wordmark — reusable across sidebar, auth pages, etc. */
.ep-logo-accent {
    font-weight: 800;
    color: var(--ep-color-primary-strong);
}

.ep-logo-dot {
    color: var(--ep-color-accent);
}

.ep-logo--on-dark,
.ep-logo--on-dark .ep-logo-accent {
    color: #ffffff;
}

.sidebar-user:empty {
    display: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav {
    padding: 0.4rem 0.4rem 1rem;
}

.sidebar-item {
    margin-bottom: 1px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    color: var(--ep-sidebar-text);
    border-radius: 10px;
    margin: 0.15rem 0.6rem;
    padding: 0.68rem 0.85rem;
    font-weight: 600;
    transition: background-color 160ms ease, color 160ms ease;
}

.sidebar-link i,
.sidebar-link .bi {
    color: inherit;
    width: 1.15rem;
    min-width: 1.15rem;
    text-align: center;
    font-size: 1rem;
    line-height: 1;
    font-weight: 400;
    opacity: 0.9;
    transform: none;
    transition: color 160ms ease, opacity 160ms ease;
}

.sidebar-link:hover i,
.sidebar-link:hover .bi,
.sidebar-link.active i,
.sidebar-link.active .bi,
.sidebar-item.active > .sidebar-link i,
.sidebar-item.active > .sidebar-link .bi,
.sidebar-link[aria-expanded="true"] i,
.sidebar-link[aria-expanded="true"] .bi {
    opacity: 1;
}

.sidebar-link[aria-expanded="true"]:not(.active) {
    color: var(--ep-sidebar-active-color);
}

.sidebar-link.active,
.sidebar-item.active > .sidebar-link {
    background: var(--ep-sidebar-active-bg);
    color: var(--ep-sidebar-active-color);
    font-weight: 450;
    text-decoration: none;
}

.sidebar-link:hover,
.sidebar-item:hover > .sidebar-link,
.sidebar-link:focus-visible {
    background: var(--ep-sidebar-hover-bg);
    color: var(--ep-sidebar-active-color);
    text-decoration: none;
}

.sidebar-link.active:hover,
.sidebar-item.active > .sidebar-link:hover {
    background: var(--ep-sidebar-active-bg);
}

.sidebar-link.disabled,
.sidebar-link.disabled:hover {
    background: transparent;
    color: var(--ep-sidebar-text);
}

.sidebar-dropdown {
    margin: 2px 0.6rem 6px 1.75rem;
    padding-left: 0.7rem;
    border-left: 2px solid var(--ep-sidebar-rail);
}

.sidebar-dropdown .sidebar-link {
    margin: 1px 0;
    padding: 0.5rem 0.65rem;
    font-weight: 500;
    font-size: 0.92em;
    color: var(--ep-sidebar-text-muted);
}

.sidebar-dropdown .sidebar-link.active,
.sidebar-dropdown .sidebar-item.active > .sidebar-link {
    color: var(--ep-sidebar-active-color);
    font-weight: 450;
}

.sidebar-dropdown .sidebar-link:hover,
.sidebar-dropdown .sidebar-item:hover > .sidebar-link {
    color: var(--ep-sidebar-active-color);
}

.sidebar-section-label {
    font-family: var(--ep-font-family-accent);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ep-sidebar-label-color);
    padding: 0.7rem 0.65rem 0.25rem;
}

.sidebar-divider {
    height: 1px;
    margin: 0.4rem 0.65rem;
    background: var(--ep-color-border);
}

.sidebar [data-bs-toggle="collapse"]:before {
    border-color: currentColor;
    opacity: 0.6;
}

.ep-sidebar-rail-tooltip {
    --bs-tooltip-bg: #1f2a44;
    --bs-tooltip-color: #ffffff;
    --bs-tooltip-opacity: 1;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Sidebar hamburger — Bootstrap Icons in place of theme CSS bars */
.sidebar-toggle {
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-left: 0.15rem;
    border-radius: 10px;
    color: var(--ep-color-primary-strong);
    text-decoration: none;
    transition: background-color 160ms ease, color 160ms ease;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
    background: var(--ep-sidebar-hover-bg);
    color: var(--ep-color-primary-strong);
    text-decoration: none;
}

.sidebar-toggle:focus-visible {
    outline: 2px solid var(--ep-color-accent);
    outline-offset: 2px;
}

.sidebar-toggle .ep-sidebar-toggle-icon {
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 400;
}

.sidebar-toggle .hamburger {
    display: none;
}

/*
 * Desktop icon-rail collapse (≥992px)
 * Theme hides the full 250px sidebar with .toggled { margin-left: -250px }.
 * Override that on desktop to keep a narrow icon-only rail with tooltips.
 * Mobile/tablet (≤991.98px) keep the theme's full off-canvas hide/show.
 */
@media (min-width: 992px) {
    .sidebar {
        transition:
            margin-left 0.3s ease-in-out,
            min-width 0.3s ease-in-out,
            max-width 0.3s ease-in-out;
    }

    .sidebar.toggled {
        margin-left: 0 !important;
        min-width: 72px !important;
        max-width: 72px !important;
        width: 72px !important;
        overflow: hidden;
    }

    .sidebar.toggled .sidebar-content,
    .sidebar.toggled .sidebar-nav {
        left: 0 !important;
        width: 72px !important;
        max-width: 72px !important;
        min-width: 0 !important;
        border-right: 0;
        box-sizing: border-box;
        scrollbar-width: none;
    }

    .sidebar.toggled .sidebar-content::-webkit-scrollbar {
        width: 0;
        height: 0;
        display: none;
    }

    .sidebar.toggled .sidebar-brand {
        position: relative;
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 72px !important;
        max-width: 72px !important;
        font-size: 0;
        line-height: 0;
        padding: 0.95rem 0 !important;
        margin: 0 auto;
        text-align: center;
        box-sizing: border-box;
    }

    .sidebar.toggled .sidebar-brand::before {
        content: "E";
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        height: 2rem;
        border-radius: 8px;
        background: rgba(103, 170, 199, 0.16);
        font-family: var(--ep-font-family-accent);
        font-size: 1.05rem;
        font-weight: 800;
        line-height: 1;
        color: var(--ep-color-primary-strong);
        letter-spacing: -0.02em;
    }

    .sidebar.toggled .sidebar-brand::after {
        content: "";
        position: absolute;
        left: calc(50% + 0.45rem);
        bottom: calc(50% - 0.95rem);
        width: 0.4rem;
        height: 0.4rem;
        border-radius: 1px;
        background: var(--ep-color-mint);
        pointer-events: none;
    }

    .sidebar.toggled .sidebar-nav {
        padding: 0.35rem 0 1rem !important;
        align-items: center;
    }

    .sidebar.toggled .sidebar-item {
        display: flex !important;
        justify-content: center !important;
        align-items: center;
        width: 100% !important;
        margin: 0 !important;
    }

    .sidebar.toggled .sidebar-link {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 2.75rem !important;
        max-width: 2.75rem !important;
        margin: 0.12rem auto !important;
        padding: 0.7rem 0 !important;
        font-size: 0 !important;
        line-height: 0 !important;
        box-sizing: border-box;
    }

    .sidebar.toggled .sidebar-link i,
    .sidebar.toggled .sidebar-link .bi,
    .sidebar.toggled .sidebar-link .me-2 {
        margin: 0 !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        width: 1.25rem !important;
        min-width: 1.25rem !important;
        font-size: 1.1rem !important;
        line-height: 1 !important;
    }

    .sidebar.toggled .sidebar-section-label,
    .sidebar.toggled .sidebar-divider,
    .sidebar.toggled .sidebar-dropdown,
    .sidebar.toggled [data-bs-toggle="collapse"]::before {
        display: none !important;
    }
}

.navbar-theme {
    position: sticky;
    top: 0;
    z-index: 1200;
    overflow: visible;
    height: 60px;
    min-height: 60px;
    padding: 0 1.25rem;
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--ep-color-border);
}

@media (min-width: 992px) {
    .navbar-theme {
        padding-left: 1.75rem;
        padding-right: 1.75rem;
    }
}

.navbar-theme .navbar-collapse,
.navbar-theme .navbar-nav,
.navbar-theme .nav-item.dropdown {
    position: relative;
    z-index: 1200;
    overflow: visible;
}

.ep-navbar-breadcrumb {
    min-width: 0;
}

.ep-navbar-breadcrumb .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 0.8rem;
    line-height: 1.2;
    color: #8592a6;
}

.breadcrumb {
    gap: 0.25rem;
}

.breadcrumb-item,
.breadcrumb-item + .breadcrumb-item::before {
    color: var(--ep-color-text-muted);
}

.breadcrumb-item a {
    color: var(--ep-color-secondary);
}

.card,
.dashboard-panel-card,
.ep-page-card {
    border: 1px solid rgba(195, 206, 222, 0.6);
    border-radius: var(--ep-radius-lg);
    box-shadow: var(--ep-shadow-sm);
    background: var(--ep-color-surface);
}

.card-header,
.panel-header {
    background: var(--ep-color-surface);
    border-bottom: 1px solid rgba(195, 206, 222, 0.55);
    padding: 1.25rem 1.5rem;
}

/* Keep header fill inside the card radius (otherwise top corners look square). */
.card > .card-header:first-child {
    border-top-left-radius: calc(var(--ep-radius-lg) - 1px);
    border-top-right-radius: calc(var(--ep-radius-lg) - 1px);
}

.card-footer {
    background: var(--ep-color-surface);
    border-top: 1px solid rgba(195, 206, 222, 0.55);
}

.card-hover-effect,
.kpi-card {
    border-radius: var(--ep-radius-lg);
    box-shadow: var(--ep-shadow-sm);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.card-hover-effect:hover,
.kpi-card:hover,
.dashboard-panel-card:hover {
    box-shadow: var(--ep-shadow-md);
}

.card-hover-effect:hover {
    transform: translateY(0) !important;
}

.kpi-card {
    border: 0;
}

.kpi-title {
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.kpi-value {
    color: var(--ep-color-primary);
    font-size: 1.9rem;
    font-weight: 400;
    letter-spacing: -0.03em;
}

.company-item {
    padding: 1rem 1.5rem;
    transition: background-color var(--ep-transition);
}

.company-item:hover {
    background: rgba(206, 242, 234, 0.22);
}

.company-name {
    color: var(--ep-color-primary);
    font-weight: 400;
}

.btn {
    --bs-btn-font-family: var(--ep-font-family);
    --bs-btn-font-weight: 400;
    border-radius: 12px;
    padding: 0.68rem 1rem;
    min-height: 44px;
    letter-spacing: 0.01em;
    transition: transform var(--ep-transition), box-shadow var(--ep-transition), background-color var(--ep-transition), border-color var(--ep-transition), color var(--ep-transition);
}

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

.btn-sm {
    min-height: 36px;
    padding: 0.45rem 0.8rem;
}

.btn-lg {
    min-height: 48px;
    padding: 0.8rem 1.2rem;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--ep-color-primary);
    --bs-btn-border-color: var(--ep-color-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--ep-color-primary-strong);
    --bs-btn-hover-border-color: var(--ep-color-primary-strong);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--ep-color-primary-strong);
    --bs-btn-active-border-color: var(--ep-color-primary-strong);
    --bs-btn-focus-shadow-rgb: 23, 46, 127;
    color: #fff;
    background-color: var(--ep-color-primary);
    border-color: var(--ep-color-primary);
    box-shadow: 0 12px 24px rgba(23, 46, 127, 0.16);
}

.btn-secondary,
.btn-light {
    --bs-btn-color: var(--ep-color-primary);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: var(--ep-color-border-strong);
    --bs-btn-hover-color: var(--ep-color-primary);
    --bs-btn-hover-bg: #f7f9fc;
    --bs-btn-hover-border-color: var(--ep-color-primary-strong);
    --bs-btn-active-color: var(--ep-color-primary);
    --bs-btn-active-bg: #eef3f9;
    --bs-btn-active-border-color: var(--ep-color-primary-strong);
    color: var(--ep-color-primary);
    background-color: #fff;
    border-color: var(--ep-color-border-strong);
}

.btn-success {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--ep-color-accent);
    --bs-btn-border-color: var(--ep-color-accent);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--ep-color-accent);
    --bs-btn-hover-border-color: var(--ep-color-accent);
    --bs-btn-active-bg: var(--ep-color-accent);
    --bs-btn-active-border-color: var(--ep-color-accent);
}

.btn-info {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--ep-color-accent-soft);
    --bs-btn-border-color: var(--ep-color-accent-soft);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--ep-color-accent-soft);
    --bs-btn-hover-border-color: var(--ep-color-accent-soft);
    --bs-btn-active-bg: var(--ep-color-accent-soft);
    --bs-btn-active-border-color: var(--ep-color-accent-soft);
}

.btn-warning {
    --bs-btn-color: var(--ep-color-primary-strong);
    --bs-btn-bg: var(--ep-color-mint);
    --bs-btn-border-color: var(--ep-color-mint);
    --bs-btn-hover-color: var(--ep-color-primary-strong);
    --bs-btn-hover-bg: var(--ep-color-mint);
    --bs-btn-hover-border-color: var(--ep-color-mint);
    --bs-btn-active-bg: var(--ep-color-mint);
    --bs-btn-active-border-color: var(--ep-color-mint);
}

.btn-outline-primary {
    --bs-btn-color: var(--ep-color-primary);
    --bs-btn-border-color: rgba(23, 46, 127, 0.22);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--ep-color-primary);
    --bs-btn-hover-border-color: var(--ep-color-primary);
    --bs-btn-active-bg: var(--ep-color-primary);
    --bs-btn-active-border-color: var(--ep-color-primary);
    color: var(--ep-color-primary);
    border-color: rgba(23, 46, 127, 0.22);
}

.btn-outline-secondary,
.btn-outline-dark {
    --bs-btn-color: var(--ep-color-primary);
    --bs-btn-border-color: var(--ep-color-border-strong);
    --bs-btn-hover-color: var(--ep-color-primary);
    --bs-btn-hover-bg: #f7f9fc;
    --bs-btn-hover-border-color: var(--ep-color-primary-strong);
    --bs-btn-active-color: var(--ep-color-primary);
    --bs-btn-active-bg: #eef3f9;
    --bs-btn-active-border-color: var(--ep-color-primary-strong);
    color: var(--ep-color-primary);
    background-color: #fff;
    border-color: var(--ep-color-border-strong);
}

.btn-outline-success {
    --bs-btn-color: var(--ep-color-accent);
    --bs-btn-border-color: rgba(103, 170, 199, 0.42);
    --bs-btn-hover-color: var(--ep-color-accent);
    --bs-btn-hover-bg: transparent;
    --bs-btn-hover-border-color: rgba(103, 170, 199, 0.42);
    --bs-btn-active-color: var(--ep-color-accent);
    --bs-btn-active-bg: transparent;
    --bs-btn-active-border-color: rgba(103, 170, 199, 0.42);
}

.btn-outline-info {
    --bs-btn-color: var(--ep-color-accent-soft);
    --bs-btn-border-color: rgba(116, 181, 204, 0.45);
    --bs-btn-hover-color: var(--ep-color-accent-soft);
    --bs-btn-hover-bg: transparent;
    --bs-btn-hover-border-color: rgba(116, 181, 204, 0.45);
    --bs-btn-active-color: var(--ep-color-accent-soft);
    --bs-btn-active-bg: transparent;
    --bs-btn-active-border-color: rgba(116, 181, 204, 0.45);
}

.btn-outline-warning {
    --bs-btn-color: var(--ep-color-primary-strong);
    --bs-btn-border-color: rgba(150, 224, 217, 0.9);
    --bs-btn-hover-color: var(--ep-color-primary-strong);
    --bs-btn-hover-bg: transparent;
    --bs-btn-hover-border-color: rgba(150, 224, 217, 0.9);
    --bs-btn-active-color: var(--ep-color-primary-strong);
    --bs-btn-active-bg: transparent;
    --bs-btn-active-border-color: rgba(150, 224, 217, 0.9);
}

.btn-outline-danger {
    --bs-btn-color: var(--ep-color-danger);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: rgba(166, 58, 80, 0.34);
    --bs-btn-hover-color: var(--ep-color-danger);
    --bs-btn-hover-bg: #fff;
    --bs-btn-hover-border-color: rgba(166, 58, 80, 0.34);
    --bs-btn-active-color: var(--ep-color-danger);
    --bs-btn-active-bg: #fff;
    --bs-btn-active-border-color: rgba(166, 58, 80, 0.34);
    color: var(--ep-color-danger);
    background-color: #fff;
    border-color: rgba(166, 58, 80, 0.34);
}

.btn-danger {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--ep-color-danger);
    --bs-btn-border-color: var(--ep-color-danger);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--ep-color-danger);
    --bs-btn-hover-border-color: var(--ep-color-danger);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--ep-color-danger);
    --bs-btn-active-border-color: var(--ep-color-danger);
    color: #fff;
    background-color: var(--ep-color-danger);
    border-color: var(--ep-color-danger);
}

.btn-link {
    color: var(--ep-color-primary);
    font-weight: 400;
}

.btn-action,
.btn-save,
.btn-view-all {
    border-radius: 12px;
    min-height: 44px;
    padding: 0.68rem 1rem;
}

.form-control,
.form-select,
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    border-radius: 12px !important;
    border-color: var(--ep-color-border-strong);
    background-color: #fff;
    color: var(--ep-color-text);
    box-shadow: none;
}

.switch-card {
    border: 1px solid var(--ep-color-border-strong);
    border-radius: 12px;
    padding: 12px 16px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
}

.form-switch .form-check-input {
    width: 3em;
    height: 1.5em;
    cursor: pointer;
}

.field-error,
.field-errors {
    color: var(--ep-color-danger);
    font-size: 0.875rem;
    margin-top: 0.35rem;
}

.field-errors ul {
    margin: 0;
    padding-left: 1rem;
}

.form-control,
.form-select {
    min-height: 44px;
}

.form-control:focus,
.form-select:focus,
.select2-container--focus .select2-selection,
.select2-container--open .select2-selection {
    border-color: var(--ep-color-primary);
    box-shadow: 0 0 0 0.18rem rgba(23, 46, 127, 0.12) !important;
}

/* Theme file buttons use negative margins + square corners inside rounded inputs. */
input[type="file"].form-control {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 0.45rem 0.65rem;
    overflow: hidden;
    line-height: 1.4;
    cursor: pointer;
}

input[type="file"].form-control::file-selector-button,
input[type="file"].form-control::-webkit-file-upload-button {
    margin: 0 0.85rem 0 0;
    padding: 0.45rem 0.95rem;
    border: 1px solid rgba(71, 84, 128, 0.18);
    border-radius: 8px;
    background: rgba(231, 235, 244, 0.95);
    color: var(--ep-color-secondary, #475480);
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

input[type="file"].form-control:hover::file-selector-button,
input[type="file"].form-control:hover::-webkit-file-upload-button {
    background: rgba(116, 181, 204, 0.18);
    border-color: rgba(116, 181, 204, 0.45);
    color: var(--ep-color-primary, #2f5d70);
}

input[type="file"].form-control:focus {
    border-color: var(--ep-color-primary);
}

.form-label,
.form-floating > label {
    color: var(--ep-color-text-muted);
    font-weight: 400;
}

.nav-tabs {
    border-bottom: 1px solid rgba(195, 206, 222, 0.8);
}

.nav-tabs .nav-link {
    color: var(--ep-color-text-muted);
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    font-weight: 400 !important;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
    color: var(--ep-color-primary) !important;
}

.nav-tabs .nav-link.active {
    color: var(--ep-color-primary) !important;
    background: transparent;
    border-bottom-color: var(--ep-color-primary) !important;
}

h6.section-header {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--ep-color-text-muted);
    font-weight: 400 !important;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(244, 244, 244, 0.55);
    --bs-table-hover-bg: rgba(206, 242, 234, 0.16);
    border-color: rgba(195, 206, 222, 0.55);
}

.table > :not(caption) > * > * {
    padding: 0.9rem 0.8rem;
}

.table thead th,
.table-light th {
    color: var(--ep-color-secondary);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: #f8fafc;
}

.alert {
    /* Theme CSS sets display:flex;padding:0 which collapses heading + body. */
    display: block;
    padding: 1rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 14px;
    color: inherit;
}

.alert .alert-heading {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

.alert > :last-child {
    margin-bottom: 0;
}

.ep-toast-stack {
    display: grid;
    gap: 0.75rem;
}

.ep-toast {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0;
    padding: 0.85rem 1rem 0.85rem 1.1rem;
}

.ep-toast-message {
    flex: 1 1 auto;
    min-width: 0;
}

.ep-toast .btn-close {
    position: static;
    flex-shrink: 0;
    margin: 0;
    padding: 0.35rem;
    opacity: 0.65;
}

.ep-toast .btn-close:hover {
    opacity: 1;
}

.alert-info {
    background: rgba(116, 181, 204, 0.12);
    border-color: rgba(116, 181, 204, 0.22);
    color: var(--ep-color-primary);
}

.alert-success {
    background: rgba(206, 242, 234, 0.54);
    border-color: rgba(150, 224, 217, 0.65);
    color: var(--ep-color-primary-strong);
}

.alert-warning {
    background: rgba(231, 235, 244, 0.85);
    border-color: rgba(71, 84, 128, 0.22);
    color: var(--ep-color-secondary);
}

.ep-compliance-banner {
    padding: 1.25rem 1.5rem;
}

.ep-compliance-banner__icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
    background: rgba(71, 84, 128, 0.12);
    color: var(--ep-color-secondary);
    line-height: 1;
}

.ep-compliance-banner__body {
    min-width: 0;
    flex: 1 1 auto;
}

.alert-danger {
    background: rgba(251, 232, 237, 0.92);
    border-color: rgba(166, 58, 80, 0.22);
    color: var(--ep-color-danger);
}

.badge,
.status-badge {
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    padding: 0.4rem 0.7rem;
    text-transform: uppercase;
}

.bg-success,
.status-active {
    background: rgba(206, 242, 234, 0.88) !important;
    color: var(--ep-color-primary-strong) !important;
}

.bg-warning,
.status-warning {
    background: rgba(231, 235, 244, 0.95) !important;
    color: var(--ep-color-secondary) !important;
}

.bg-secondary {
    background: rgba(215, 222, 234, 0.92) !important;
    color: var(--ep-color-secondary) !important;
}

.bg-info {
    background: rgba(116, 181, 204, 0.2) !important;
    color: var(--ep-color-primary-strong) !important;
}

.bg-danger {
    background: rgba(251, 232, 237, 0.96) !important;
    color: var(--ep-color-danger) !important;
}

.bg-dark {
    background: var(--ep-color-primary) !important;
    color: #fff !important;
}

.bg-light {
    background: #f8fafc !important;
    color: var(--ep-color-secondary) !important;
}

.dropdown-menu {
    border: 1px solid rgba(195, 206, 222, 0.65);
    border-radius: 14px;
    box-shadow: var(--ep-shadow-md);
}

.ep-user-menu {
    --bs-dropdown-link-hover-bg: transparent;
    --bs-dropdown-link-active-bg: transparent;
    --bs-dropdown-link-active-color: var(--ep-color-text);
    min-width: 14rem;
    max-width: 16.5rem;
    margin-top: 0.4rem !important;
    padding: 0.4rem 0;
    overflow: hidden;
    border: 1px solid rgba(195, 206, 222, 0.7) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 28px rgba(20, 33, 74, 0.1);
    z-index: 2000 !important;
}

.ep-context-menu-item {
    position: relative;
    z-index: 2000;
    margin-right: 0 !important;
}

.ep-context-switcher {
    gap: 0.45rem;
    max-width: 16rem;
    padding: 0.4rem 0.75rem !important;
    border: 1px solid var(--ep-color-border);
    border-radius: 20px;
    color: var(--ep-color-text-strong) !important;
    transition: background-color 160ms ease;
}

.ep-context-switcher:hover,
.ep-context-switcher:focus,
.ep-context-switcher[aria-expanded="true"] {
    background: #f8fafc;
}

.ep-context-switcher::after {
    display: none;
}

.ep-context-switcher-icon {
    flex-shrink: 0;
    color: var(--ep-color-text-strong);
    font-size: 0.95rem;
    line-height: 1;
}

.ep-context-switcher-text {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    line-height: 1.2;
    font-size: 0.8125rem;
    font-weight: 700;
}

.ep-context-switcher-title {
    max-width: 8.5rem;
    color: var(--ep-color-text-strong);
    font-size: inherit;
    font-weight: 700;
}

.ep-context-switcher-sep {
    color: #94a3b8;
    font-weight: 500;
}

.ep-context-switcher-meta {
    max-width: 5.5rem;
    color: #94a3b8;
    font-size: inherit;
    font-weight: 500;
}

.ep-navbar-actions-divider {
    width: 1px;
    height: 24px;
    margin: 0 0.65rem;
    background: var(--ep-color-border);
    flex-shrink: 0;
}

.ep-context-menu {
    --bs-dropdown-link-hover-bg: transparent;
    --bs-dropdown-link-active-bg: transparent;
    min-width: 15rem;
    max-width: 18rem;
    max-height: min(70vh, 22rem);
    margin-top: 0.4rem !important;
    padding: 0.35rem 0;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(195, 206, 222, 0.7) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 28px rgba(20, 33, 74, 0.1);
    z-index: 2000 !important;
}

.ep-context-menu-header {
    padding: 0.45rem 0.85rem 0.35rem !important;
    margin-bottom: 0;
    color: var(--ep-color-text-muted) !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ep-context-menu .dropdown-divider {
    margin: 0.25rem 0;
}

.ep-context-menu .dropdown-item,
.ep-context-option {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    padding: 0.42rem 0.85rem !important;
    overflow: hidden;
    color: var(--ep-color-text) !important;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.25;
    white-space: nowrap;
    border-radius: 0 !important;
}

.ep-context-option-main {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.ep-context-option-main > i {
    flex-shrink: 0;
    width: 1rem;
    color: var(--ep-color-text-muted);
    font-size: 0.95rem;
    text-align: center;
}

.ep-context-option-label {
    flex: 0 1 auto;
    min-width: 0;
    color: var(--ep-color-text);
}

.ep-context-country-code {
    flex-shrink: 0;
    padding: 0.08rem 0.35rem;
    border-radius: 6px;
    background: rgba(103, 170, 199, 0.12);
    color: var(--ep-color-secondary);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-transform: uppercase;
}

.ep-context-role-badge {
    flex-shrink: 0;
    padding: 0.12rem 0.4rem;
    border: 1px solid rgba(195, 206, 222, 0.85);
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.95);
    color: var(--ep-color-text-muted);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}

.ep-context-menu .dropdown-item:hover,
.ep-context-menu .dropdown-item:focus,
.ep-context-menu .dropdown-item:active,
.ep-context-option:hover,
.ep-context-option:focus,
.ep-context-option:active {
    background: rgba(103, 170, 199, 0.1) !important;
    color: var(--ep-color-primary-strong) !important;
    box-shadow: none !important;
}

.ep-context-option:hover .ep-context-option-label,
.ep-context-option:focus .ep-context-option-label,
.ep-context-option:active .ep-context-option-label {
    color: var(--ep-color-primary-strong);
}

.ep-context-option:hover > .ep-context-option-main > i,
.ep-context-option:focus > .ep-context-option-main > i,
.ep-context-option:active > .ep-context-option-main > i {
    color: var(--ep-color-primary-strong);
}

.ep-context-empty {
    color: var(--ep-color-text-muted) !important;
    font-size: 0.8rem;
    font-style: italic;
    white-space: normal !important;
}

.ep-user-menu-item {
    position: relative;
    z-index: 2000;
}

.ep-user-trigger {
    gap: 0.6rem;
    max-width: 14rem;
    padding: 0.15rem 0.2rem !important;
    border-radius: 999px;
    color: var(--ep-color-text-strong) !important;
    transition: background-color 160ms ease;
}

.ep-user-trigger:hover,
.ep-user-trigger:focus,
.ep-user-trigger[aria-expanded="true"] {
    background: #f8fafc;
}

.ep-user-trigger::after {
    display: none;
}

.ep-user-avatar,
.ep-user-trigger .avatar-img {
    width: 32px !important;
    height: 32px !important;
    margin: 0 !important;
    object-fit: cover;
    flex-shrink: 0;
}

.ep-user-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #16324f;
    color: #fff;
    font-family: var(--ep-font-family-accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
    text-transform: uppercase;
    user-select: none;
}

.ep-is-hidden {
    display: none !important;
}

.ep-user-trigger-name {
    max-width: 9rem;
    color: var(--ep-color-text-strong);
    font-size: 0.84375rem;
    font-weight: 700;
    line-height: 1.2;
}

.ep-user-menu-header {
    padding: 0.55rem 0.85rem 0.45rem !important;
}

.ep-user-menu-name {
    color: var(--ep-color-primary-strong);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.25;
}

.ep-user-menu-meta {
    margin-top: 0.15rem;
    color: var(--ep-color-text-muted);
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.3;
}

.ep-user-menu .dropdown-divider {
    margin: 0.25rem 0;
}

.ep-user-menu-link,
.ep-user-menu .dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.85rem !important;
    color: var(--ep-color-text) !important;
    font-family: var(--ep-font-family);
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    border-radius: 0 !important;
}

.ep-user-menu-link i,
.ep-user-menu .dropdown-item i {
    width: 1rem;
    flex: 0 0 1rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--ep-color-text-muted) !important;
}

.ep-user-menu-link:hover,
.ep-user-menu-link:focus,
.ep-user-menu-link:active,
.ep-user-menu .dropdown-item:hover,
.ep-user-menu .dropdown-item:focus,
.ep-user-menu .dropdown-item:active {
    background: rgba(103, 170, 199, 0.1) !important;
    background-color: rgba(103, 170, 199, 0.1) !important;
    color: var(--ep-color-primary-strong) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.ep-user-menu-link:hover i,
.ep-user-menu-link:focus i,
.ep-user-menu-link:active i,
.ep-user-menu .dropdown-item:hover i,
.ep-user-menu .dropdown-item:focus i,
.ep-user-menu .dropdown-item:active i {
    color: var(--ep-color-primary-strong) !important;
}

.ep-user-menu-link.text-danger,
.ep-user-menu-link.text-danger:hover,
.ep-user-menu-link.text-danger:focus,
.ep-user-menu-link.text-danger:active,
.ep-user-menu .dropdown-item.text-danger,
.ep-user-menu .dropdown-item.text-danger:hover,
.ep-user-menu .dropdown-item.text-danger:focus,
.ep-user-menu .dropdown-item.text-danger:active {
    color: var(--ep-color-danger) !important;
}

.ep-user-menu-link.text-danger i,
.ep-user-menu-link.text-danger:hover i,
.ep-user-menu-link.text-danger:focus i,
.ep-user-menu-link.text-danger:active i,
.ep-user-menu .dropdown-item.text-danger i,
.ep-user-menu .dropdown-item.text-danger:hover i,
.ep-user-menu .dropdown-item.text-danger:focus i,
.ep-user-menu .dropdown-item.text-danger:active i {
    color: var(--ep-color-danger) !important;
}

.dropdown-item {
    border-radius: 10px;
    color: var(--ep-color-text);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(206, 242, 234, 0.18);
    color: var(--ep-color-primary);
}

.footer {
    /* Pin footer to the bottom of .main / viewport on short pages. */
    margin-top: auto;
    flex-shrink: 0;
    padding: 0.45rem 1rem !important;
    border-top: 1px solid var(--ep-color-border);
    background: #fff;
    font-size: 0.78rem;
    line-height: 1.3;
}

@media (min-width: 992px) {
    .footer {
        padding: 0.45rem 1.25rem !important;
    }
}

.footer .container-fluid {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.footer .row {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.25rem;
    margin: 0;
}

.footer .list-inline-item:not(:last-child) {
    margin-right: 0.85rem;
}

.footer a,
.footer p {
    color: var(--ep-color-text-muted);
    font-size: inherit;
}

.footer a:hover {
    color: var(--ep-color-primary-strong);
}

.ep-panel-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: rgba(231, 235, 244, 0.9);
    color: var(--ep-color-primary);
}

.ep-logo-tile {
    width: 96px;
    height: 96px;
    border-radius: 18px;
    object-fit: cover;
    background: #fff;
    border: 1px solid rgba(195, 206, 222, 0.7);
}

.ep-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
}

.ep-empty-state-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: rgba(231, 235, 244, 0.8);
    color: var(--ep-color-primary);
}

.ep-shell {
    /* Match bottom breathing room to the top of the content canvas. */
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Full-bleed page header — title, eyebrow pill, actions. */
.ep-page-header {
    position: relative;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 1.35rem 1.25rem 0.25rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

@media (min-width: 992px) {
    .ep-page-header {
        padding: 1.5rem 1.75rem 0.15rem;
    }
}

.ep-page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    flex-wrap: wrap;
    min-width: 0;
}

.ep-page-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
    min-width: 0;
}

.ep-page-title-row .page-context-country-name {
    margin: 0;
    color: var(--ep-color-text-strong);
    font-family: var(--ep-font-family);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.25;
    display: inline-flex;
    align-items: center;
}

.ep-page-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    margin: 0;
    padding: 0.25rem 0.65rem;
    color: #1F4B7A;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
    height: auto;
    border-radius: 20px;
    background: #eaf1fb;
    border: 0;
    white-space: nowrap;
    box-sizing: border-box;
}

.ep-page-subtitle {
    max-width: 48rem;
    margin: 0.4rem 0 0;
    color: var(--ep-color-text-muted);
    font-size: 0.875rem;
    line-height: 1.4;
}

.ep-page-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ep-page-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2rem;
    height: 2rem;
    padding: 0 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: none !important;
    transform: none !important;
}

.ep-page-actions .btn i,
.ep-page-actions .btn .fa,
.ep-page-actions .btn .fas,
.ep-page-actions .btn .far,
.ep-page-actions .btn .fab,
.ep-page-actions .btn .bi {
    margin: 0 !important;
    font-size: 0.85em;
    line-height: 1;
    width: 1em;
    text-align: center;
}

.ep-page-actions .btn-primary {
    background-color: var(--ep-color-primary);
    border-color: var(--ep-color-primary);
    color: #fff;
}

.ep-page-actions .btn-primary:hover,
.ep-page-actions .btn-primary:focus {
    background-color: var(--ep-color-primary-strong);
    border-color: var(--ep-color-primary-strong);
    color: #fff;
}

.ep-page-actions .btn-secondary,
.ep-page-actions .btn-outline-secondary,
.ep-page-actions .btn-light {
    background-color: #fff;
    border-color: var(--ep-color-border);
    color: var(--ep-color-secondary);
}

.ep-page-actions .btn-secondary:hover,
.ep-page-actions .btn-secondary:focus,
.ep-page-actions .btn-outline-secondary:hover,
.ep-page-actions .btn-outline-secondary:focus,
.ep-page-actions .btn-light:hover,
.ep-page-actions .btn-light:focus {
    background-color: rgba(103, 170, 199, 0.1);
    border-color: rgba(103, 170, 199, 0.4);
    color: var(--ep-color-primary-strong);
}

.ep-page-actions .ep-status {
    min-height: 2rem;
    height: 2rem;
    padding: 0 0.55rem;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
    border-radius: 999px;
    box-sizing: border-box;
}

.ep-flag-tile {
    width: 28px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 4px;
    border: 1px solid rgba(195, 206, 222, 0.85);
    object-fit: cover;
    box-shadow: none;
}

.company-context-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(103, 170, 199, 0.14);
    color: var(--ep-color-primary-strong);
    font-size: 0.85rem;
}

.ep-stat-card {
    position: relative;
    height: 100%;
    padding: 1.4rem;
    border: 1px solid rgba(195, 206, 222, 0.56);
    border-radius: var(--ep-radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.94));
    box-shadow: var(--ep-shadow-sm);
}

.ep-stat-card--primary {
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--ep-color-border);
    border-radius: var(--ep-radius-lg);
    background: #fff;
    box-shadow: none;
    transition: box-shadow 160ms ease;
}

.ep-stat-card--primary:hover {
    box-shadow: 0 4px 16px rgba(22, 50, 79, 0.06);
}

.ep-stat-card--primary::after {
    display: none;
}

.ep-stat-card--primary .ep-stat-head {
    margin-bottom: 0;
    align-items: flex-start;
}

.ep-stat-card--primary .ep-stat-label {
    color: #8592a6;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.ep-stat-card--primary .ep-stat-value {
    margin: 0.875rem 0 0.125rem;
    color: var(--ep-color-text-strong);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.ep-stat-card--primary .ep-stat-icon {
    width: 2.125rem;
    height: 2.125rem;
    border-radius: 9px;
    background: #eaf1fb;
    color: #1F4B7A;
    font-size: 1.05rem;
}

.ep-stat-card--primary .ep-stat-meta {
    margin-top: 0;
    color: #8592a6;
    font-size: 0.78125rem;
}

.ep-stat-card--compact {
    padding: 1rem 1.1rem;
    border-radius: var(--ep-radius-lg);
}

.ep-stat-card--compact .ep-stat-head {
    margin-bottom: 0.65rem;
    align-items: center;
}

.ep-stat-card--compact .ep-stat-value {
    font-size: clamp(1.35rem, 2.4vw, 1.7rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.ep-stat-card--compact .ep-stat-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 10px;
    font-size: 0.95rem;
}

.ep-stat-card--compact .ep-stat-meta {
    font-size: 0.78rem;
}

.ep-metric-strip {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    padding: 0.35rem 0;
    border: 1px solid var(--ep-color-border);
    border-radius: var(--ep-radius-lg);
    background: #fff;
}

.ep-metric-strip-item {
    flex: 1 1 10rem;
    min-width: 0;
    padding: 1rem 1.5rem;
}

.ep-metric-strip-item + .ep-metric-strip-item {
    border-left: 1px solid #eef1f5;
}

.ep-metric-strip-label {
    display: block;
    color: #8592a6;
    font-size: 0.65625rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ep-metric-strip-value {
    margin: 0.35rem 0 0.125rem;
    color: var(--ep-color-text-strong);
    font-size: 1.3125rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.ep-metric-strip-meta {
    margin: 0;
    color: #8592a6;
    font-size: 0.75rem;
    line-height: 1.3;
}

@media (max-width: 991.98px) {
    .ep-metric-strip-item {
        flex: 1 1 45%;
        border-left: 0 !important;
        border-top: 1px solid #eef1f5;
    }

    .ep-metric-strip-item:nth-child(-n+2) {
        border-top: 0;
    }

    .ep-metric-strip-item:nth-child(even) {
        border-left: 1px solid #eef1f5 !important;
    }
}

.ep-rank-list {
    display: grid;
    gap: 0.8rem;
}

.ep-rank-row-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.3rem;
}

.ep-rank-name {
    color: var(--ep-color-text-strong);
    font-size: 0.8125rem;
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ep-rank-count {
    color: var(--ep-color-text-strong);
    font-size: 0.8125rem;
    font-weight: 700;
    flex-shrink: 0;
}

.ep-rank-track {
    height: 6px;
    border-radius: 4px;
    background: #eef1f5;
    overflow: hidden;
}

.ep-rank-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #1F4B7A;
}

.ep-rank-row:nth-child(n+3) .ep-rank-fill {
    background: #2f6fed;
}

.ep-rank-row:nth-child(n+5) .ep-rank-fill {
    background: #7fb3e8;
}

.ep-rank-row:nth-child(n+8) .ep-rank-fill {
    background: #a9c9ef;
}

.ep-stat-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(103, 170, 199, 0.07), transparent 55%);
    pointer-events: none;
}

.ep-stat-card > * {
    position: relative;
    z-index: 1;
}

.ep-stat-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ep-stat-label {
    display: block;
    margin: 0 0 0.35rem;
    color: var(--ep-color-text-muted);
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ep-stat-value {
    margin: 0;
    color: var(--ep-color-primary);
    font-size: clamp(2rem, 4vw, 2.4rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: -0.05em;
}

.ep-stat-meta {
    margin: 0;
    color: var(--ep-color-text-muted);
    font-size: 0.88rem;
}

.ep-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(23, 46, 127, 0.08);
    color: var(--ep-color-primary);
    font-size: 1.15rem;
}

.ep-panel,
.ep-form-card,
.ep-table-card,
.ep-confirm-card,
.ep-module-card {
    border: 1px solid rgba(195, 206, 222, 0.6);
    border-radius: var(--ep-radius-lg);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--ep-shadow-sm);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* Clip children so DataTables toolbars cannot square off the card corners. */
    overflow: hidden !important;
    isolation: isolate;
    clip-path: inset(0 round var(--ep-radius-lg));
}

.ep-table-card > .ep-table-header:first-child {
    border-top-left-radius: var(--ep-radius-lg);
    border-top-right-radius: var(--ep-radius-lg);
    background: rgba(255, 255, 255, 0.98);
}

.ep-panel-header,
.ep-form-header,
.ep-table-header,
.ep-confirm-header {
    padding: 1.5rem 1.5rem 1rem;
}

.ep-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.15rem 1.25rem 0.75rem;
}

.ep-panel-header-trailing {
    display: flex;
    align-items: center;
    align-self: center;
    flex-shrink: 0;
}

.ep-panel-title,
.ep-form-title,
.ep-table-title,
.ep-confirm-title {
    margin: 0;
    color: var(--ep-color-text-strong);
    font-size: 0.96875rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.ep-panel-copy,
.ep-form-copy,
.ep-table-copy,
.ep-confirm-copy {
    margin: 0.2rem 0 0;
    color: #8592a6;
    font-size: 0.75rem;
}

.ep-panel {
    border: 1px solid var(--ep-color-border);
    border-radius: var(--ep-radius-lg);
    background: #fff;
    box-shadow: none;
    clip-path: inset(0 round var(--ep-radius-lg));
}

.ep-panel-body,
.ep-form-body,
.ep-table-body,
.ep-confirm-body {
    padding: 0 1.5rem 1.5rem;
}

.ep-chart-frame {
    min-height: 360px;
}

.ep-chart-frame--map {
    min-height: 220px;
    max-height: 260px;
    border-radius: 10px;
    overflow: hidden;
}

.ep-panel--map .ep-panel-header {
    padding-bottom: 0.55rem;
}

.ep-panel--map .ep-panel-body {
    padding-top: 0.35rem;
}

.ep-map-caption {
    margin: 0.65rem 0 0;
    color: #94a3b8;
    font-size: 0.71875rem;
    line-height: 1.35;
}

.ep-chart-frame--bar {
    min-height: 320px;
}

.ep-panel--attention {
    display: flex;
    flex-direction: column;
}

.ep-panel--attention .ep-panel-header {
    padding-bottom: 0.5rem;
}

.ep-attention-list {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.ep-attention-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.25rem;
    border-top: 1px solid #f0f2f6;
    color: inherit;
    text-decoration: none;
    transition: background-color 140ms ease;
}

.ep-attention-row:last-child {
    border-bottom: 1px solid #f0f2f6;
}

.ep-attention-row:hover {
    background: #f8fafc;
    color: inherit;
    text-decoration: none;
}

.ep-attention-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.125rem;
    height: 2.125rem;
    flex-shrink: 0;
    border-radius: 9px;
    background: #eaf1fb;
    color: #1F4B7A;
    font-size: 0.85rem;
}

.ep-attention-row.is-alert .ep-attention-icon {
    background: #fdecec;
    color: #c0392b;
}

.ep-attention-row.is-warn .ep-attention-icon {
    background: #fdf3e2;
    color: #b7791f;
}

.ep-attention-row.is-ok .ep-attention-icon {
    background: #e9f7ef;
    color: #1e8449;
}

.ep-attention-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.ep-attention-label {
    display: block;
    color: var(--ep-color-text-strong);
    font-size: 0.84375rem;
    font-weight: 700;
    line-height: 1.25;
}

.ep-attention-meta {
    display: block;
    color: #8592a6;
    font-size: 0.71875rem;
    line-height: 1.3;
}

.ep-attention-value {
    flex-shrink: 0;
    color: var(--ep-color-text-strong);
    font-size: 1.1875rem;
    font-weight: 800;
    line-height: 1;
}

.ep-attention-row.is-alert .ep-attention-value {
    color: #c0392b;
}

.ep-attention-row.is-warn .ep-attention-value {
    color: #b7791f;
}

.ep-attention-row.is-ok .ep-attention-value {
    color: #1e8449;
}

.ep-panel--portfolio .ep-panel-header {
    padding: 1.15rem 1.25rem 0.5rem;
}

.ep-panel--portfolio .ep-panel-body {
    padding: 0 1.25rem 0.75rem;
}

.ep-portfolio-list {
    display: flex;
    flex-direction: column;
}

.ep-portfolio-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-top: 1px solid #f0f2f6;
    color: inherit;
    text-decoration: none;
}

.ep-portfolio-row:last-child {
    border-bottom: 1px solid #f0f2f6;
}

.ep-portfolio-row:hover {
    background: #f8fafc;
    color: inherit;
    text-decoration: none;
}

.ep-portfolio-name {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--ep-color-text-strong);
    font-size: 0.84375rem;
    font-weight: 700;
    line-height: 1.25;
}

.ep-portfolio-trailing {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    min-width: 0;
}

.ep-portfolio-meta {
    color: #8592a6;
    font-size: 0.78125rem;
    line-height: 1.25;
    flex-shrink: 1;
    max-width: 8rem;
}

.ep-portfolio-status {
    flex-shrink: 0;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    font-size: 0.65625rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.2;
    white-space: nowrap;
}

.ep-portfolio-status.is-active {
    background: #e9f7ef;
    color: #1e8449;
}

.ep-portfolio-status.is-warn {
    background: #fdf3e2;
    color: #b7791f;
}

@media (max-width: 575.98px) {
    .ep-portfolio-row {
        flex-wrap: wrap;
        gap: 0.35rem 0.65rem;
    }

    .ep-portfolio-name {
        flex: 1 1 100%;
    }
}

.ep-chart-frame-sm {
    min-height: 300px;
}

.ep-stack {
    display: grid;
    gap: 1rem;
}

.ep-list {
    display: grid;
    gap: 0.75rem;
}

.ep-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(215, 222, 234, 0.88);
    border-radius: 20px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color var(--ep-transition), box-shadow var(--ep-transition), transform var(--ep-transition);
}

.ep-list-row:hover {
    color: inherit;
    text-decoration: none;
    border-color: rgba(23, 46, 127, 0.2);
    box-shadow: 0 16px 28px rgba(20, 33, 74, 0.08);
    transform: translateY(-1px);
}

.ep-list-main {
    min-width: 0;
}

.ep-list-title {
    margin: 0;
    color: var(--ep-color-primary);
    font-size: 1rem;
    font-weight: 400;
}

.ep-list-meta {
    margin: 0.25rem 0 0;
    color: var(--ep-color-text-muted);
    font-size: 0.87rem;
}

.ep-list-trailing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.ep-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.78rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ep-status-active {
    background: rgba(206, 242, 234, 0.85);
    color: var(--ep-color-primary-strong);
}

.ep-status-success-soft {
    background: rgba(186, 230, 198, 0.58);
    color: #2f6b44;
}

.ep-status-success-strong {
    background: #2f6b44;
    color: #ffffff;
}

.ep-status-due-today {
    background: rgba(248, 240, 185, 0.72);
    color: #7b6810;
}

.ep-status-risk {
    background: rgba(245, 179, 66, 0.24);
    color: #9b5f00;
}

.ep-status-warning {
    background: rgba(231, 235, 244, 0.95);
    color: var(--ep-color-secondary);
}

.ep-status-danger {
    background: rgba(251, 232, 237, 0.92);
    color: var(--ep-color-danger);
}

.ep-status-neutral {
    background: #eaf1fb;
    color: #1F4B7A;
    font-weight: 800;
    border-radius: 20px;
    padding: 0.3rem 0.7rem;
}

.ep-status-saas {
    background: rgba(196, 181, 253, 0.42);
    color: #5b21b6;
    font-weight: 800;
    border-radius: 20px;
    padding: 0.3rem 0.7rem;
}

.ep-status-cs {
    background: rgba(150, 224, 217, 0.55);
    color: #0f766e;
    font-weight: 800;
    border-radius: 20px;
    padding: 0.3rem 0.7rem;
}

/* CS workspace status — light pastel pills, distinct hue per status */
.ep-cs-status--draft,
.ep-cs-status--in-review,
.ep-cs-status--ready,
.ep-cs-status--submitted,
.ep-cs-status--processing,
.ep-cs-status--results,
.ep-cs-status--reopened,
.ep-cs-status--approved,
.ep-cs-status--preparing,
.ep-cs-status--finalised,
.ep-cs-status--closed,
.ep-cs-status--failed {
    font-weight: 800;
    border-radius: 20px;
    padding: 0.3rem 0.75rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.ep-cs-status--draft {
    background: #f1f5f9;
    color: #64748b;
}

.ep-cs-status--in-review {
    background: #eaf1fb;
    color: #1f4b7a;
}

.ep-cs-status--ready {
    background: #fef9c3;
    color: #854d0e;
}

.ep-cs-status--submitted {
    background: #ede9fe;
    color: #5b21b6;
}

.ep-cs-status--processing {
    background: #e0f2fe;
    color: #075985;
}

.ep-cs-status--results {
    background: #ccfbf1;
    color: #0f766e;
}

.ep-cs-status--reopened {
    background: #ffedd5;
    color: #9a3412;
}

.ep-cs-status--approved {
    background: #dcfce7;
    color: #166534;
}

.ep-cs-status--preparing {
    background: #f3e8ff;
    color: #6b21a8;
}

.ep-cs-status--finalised {
    background: #d1fae5;
    color: #047857;
}

.ep-cs-status--closed {
    background: #f1f5f9;
    color: #475569;
}

.ep-cs-status--failed {
    background: #fee2e2;
    color: #b91c1c;
}

.ep-cs-milestone--done {
    background: rgba(186, 230, 198, 0.7);
    color: #2f6b44;
    font-weight: 800;
    border-radius: 20px;
    padding: 0.3rem 0.7rem;
}

.ep-cs-milestone--late {
    background: rgba(251, 232, 237, 0.95);
    color: var(--ep-color-danger);
    font-weight: 800;
    border-radius: 20px;
    padding: 0.3rem 0.7rem;
}

.ep-cs-milestone--pending,
.ep-cs-milestone--skipped {
    background: #eef2f7;
    color: #5b6b7c;
    font-weight: 800;
    border-radius: 20px;
    padding: 0.3rem 0.7rem;
}

.ep-cs-milestone--current {
    background: rgba(248, 240, 185, 0.85);
    color: #7b6810;
    font-weight: 800;
    border-radius: 20px;
    padding: 0.3rem 0.7rem;
}

.ep-table-shell .table.ep-cs-period-table {
    width: auto !important;
    max-width: 100%;
    table-layout: auto;
}

.ep-table-shell .ep-cs-period-table th,
.ep-table-shell .ep-cs-period-table td {
    white-space: nowrap;
    width: 1%;
    padding-right: 2.25rem;
}

.ep-table-shell .ep-cs-period-table th:last-child,
.ep-table-shell .ep-cs-period-table td:last-child {
    padding-right: 0.95rem;
}

.ep-cs-period-row {
    cursor: pointer;
}

.ep-cs-period-row:hover > * {
    background: rgba(31, 75, 122, 0.04) !important;
}

.ep-cs-status-col {
    text-align: center !important;
    vertical-align: middle !important;
    width: 1%;
    min-width: 0;
}

.ep-cs-status-col .ep-status {
    margin: 0 auto;
}

.ep-metric-strip-value--status {
    font-size: 1rem;
    line-height: 1.2;
}

.ep-metric-strip-value--text {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    word-break: break-word;
}

.ep-cs-milestone-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid rgba(215, 222, 234, 0.72);
}

.ep-cs-milestone-grid .ep-cs-milestone-row {
    margin: 0;
    border-bottom: 1px solid rgba(215, 222, 234, 0.72);
    border-right: 1px solid rgba(215, 222, 234, 0.72);
}

.ep-cs-milestone-grid .ep-cs-milestone-row:nth-child(3n) {
    border-right: 0;
}

.ep-cs-milestone-row.is-done .ep-attention-icon {
    background: rgba(186, 230, 198, 0.55);
    color: #2f6b44;
}

.ep-cs-milestone-row.is-late .ep-attention-icon {
    background: rgba(251, 232, 237, 0.95);
    color: var(--ep-color-danger);
}

.ep-cs-milestone-row.is-current .ep-attention-icon {
    background: rgba(248, 240, 185, 0.85);
    color: #7b6810;
}

.ep-cs-milestone-row.is-pending .ep-attention-icon,
.ep-cs-milestone-row.is-skipped .ep-attention-icon {
    background: #eef2f7;
    color: #5b6b7c;
}

@media (max-width: 991.98px) {
    .ep-cs-milestone-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ep-cs-milestone-grid .ep-cs-milestone-row:nth-child(3n) {
        border-right: 1px solid rgba(215, 222, 234, 0.72);
    }

    .ep-cs-milestone-grid .ep-cs-milestone-row:nth-child(2n) {
        border-right: 0;
    }
}

@media (max-width: 575.98px) {
    .ep-cs-milestone-grid {
        grid-template-columns: 1fr;
    }

    .ep-cs-milestone-grid .ep-cs-milestone-row,
    .ep-cs-milestone-grid .ep-cs-milestone-row:nth-child(2n),
    .ep-cs-milestone-grid .ep-cs-milestone-row:nth-child(3n) {
        border-right: 0;
    }
}

.ep-module-card {
    height: 100%;
    padding: 1.4rem;
}

.ep-module-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
    background: rgba(23, 46, 127, 0.08);
    color: var(--ep-color-primary);
    font-size: 1.15rem;
}

.ep-module-card p {
    color: var(--ep-color-text-muted);
}

/* Company workspace: profile + management modules */
.ep-company-overview {
    display: grid;
    gap: 18px;
}

.ep-company-overview__grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 18px;
    align-items: start;
}

.ep-company-card {
    background: var(--ep-color-surface);
    border: 1px solid var(--ep-color-border);
    border-radius: var(--ep-radius-md);
    padding: 20px 24px;
}

.ep-company-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ep-company-card__icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #eaf1fb;
    color: var(--ep-color-primary-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.ep-company-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--ep-color-text-strong);
    font-family: var(--ep-font-family-accent);
}

.ep-company-identity {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f2f6;
}

.ep-company-identity__logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--ep-color-border);
    background: #fff;
}

.ep-company-identity__fallback {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #eaf1fb;
    color: var(--ep-color-primary-strong);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.ep-company-identity__legal-field {
    min-width: 0;
}

.ep-company-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}

.ep-company-tax-card {
    padding-bottom: 18px;
}

.ep-company-tax-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

.ep-company-tax-strip .ep-company-field {
    padding: 0 20px;
    border-right: 1px solid #f0f2f6;
}

.ep-company-tax-strip .ep-company-field:first-child {
    padding-left: 0;
}

.ep-company-tax-strip .ep-company-field:last-child {
    padding-right: 0;
    border-right: 0;
}

.ep-company-field__label {
    display: block;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #8592a6;
    margin-bottom: 4px;
}

.ep-company-field__value {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--ep-color-text-strong);
    word-break: break-word;
}

.ep-company-field__value--muted {
    color: #c3ccd8;
}

.ep-company-contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ep-company-contact-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f2f6;
}

.ep-company-contact-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.ep-company-contact-row__label {
    font-size: 12px;
    font-weight: 700;
    color: #8592a6;
    flex-shrink: 0;
}

.ep-company-contact-row__value {
    font-size: 14px;
    font-weight: 700;
    color: var(--ep-color-text-strong);
    text-align: right;
    word-break: break-word;
}

.ep-company-contact-row__value--link {
    color: var(--ep-color-primary-strong);
    text-decoration: none;
}

.ep-company-contact-row__value--link:hover {
    color: var(--ep-color-text-strong);
}

.ep-module-list {
    background: var(--ep-color-surface);
    border: 1px solid var(--ep-color-border);
    border-radius: var(--ep-radius-md);
    padding: 20px 0 8px;
}

.ep-module-list__header {
    padding: 0 24px 14px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.ep-module-list__title {
    margin: 0;
    font-size: 15.5px;
    font-weight: 800;
    color: var(--ep-color-text-strong);
    font-family: var(--ep-font-family-accent);
}

.ep-module-list__copy {
    margin: 0;
    font-size: 12px;
    color: #8592a6;
}

.ep-module-list__section {
    padding: 14px 24px 6px;
    border-top: 1px solid #f0f2f6;
}

.ep-module-list__section-label {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8592a6;
}

.ep-module-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 13px 24px;
    text-decoration: none;
    color: inherit;
    transition: background-color var(--ep-transition);
}

.ep-module-row--primary {
    padding: 16px 24px;
    border-top: 1px solid #f0f2f6;
}

.ep-module-row--secondary {
    border-top: 0;
}

.ep-module-row:hover {
    background: var(--ep-color-surface-soft);
    color: inherit;
}

.ep-module-row__icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #f4f6f9;
    color: #4a5a72;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.ep-module-row--primary .ep-module-row__icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #eaf1fb;
    color: var(--ep-color-primary-strong);
    font-size: 1rem;
}

.ep-module-row__body {
    flex: 1;
    min-width: 0;
}

.ep-module-row__title {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ep-color-text-strong);
}

.ep-module-row--primary .ep-module-row__title {
    font-size: 15px;
    font-weight: 800;
}

.ep-module-row__desc {
    display: block;
    font-size: 12px;
    color: #8592a6;
    margin-top: 2px;
}

.ep-module-row--primary .ep-module-row__desc {
    font-size: 12.5px;
}

.ep-module-row__cta {
    font-size: 12.5px;
    font-weight: 700;
    color: #8592a6;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.ep-module-row--primary .ep-module-row__cta {
    font-size: 13px;
    color: var(--ep-color-primary-strong);
}

.ep-module-row--primary .ep-module-row__cta i {
    font-size: 0.7rem;
}

.ep-module-row--last {
    padding-bottom: 4px;
}

@media (max-width: 991.98px) {
    .ep-company-overview__grid {
        grid-template-columns: 1fr;
    }

    .ep-company-tax-strip {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .ep-company-tax-strip .ep-company-field {
        padding: 0 0 14px;
        border-right: 0;
        border-bottom: 1px solid #f0f2f6;
    }

    .ep-company-tax-strip .ep-company-field:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }
}

@media (max-width: 575.98px) {
    .ep-company-profile-grid {
        grid-template-columns: 1fr;
    }

    .ep-module-list__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ep-module-row__desc {
        display: none;
    }
}

.ep-data-frame {
    padding: 1rem;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(215, 222, 234, 0.75);
}

.ep-kv {
    display: grid;
    gap: 1rem;
}

.ep-kv-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(215, 222, 234, 0.75);
}

.ep-kv-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.ep-kv-label {
    margin: 0;
    color: var(--ep-color-text-muted);
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ep-kv-value {
    margin: 0;
    color: var(--ep-color-primary);
    text-align: right;
    font-size: 0.95rem;
}

.ep-table-shell table.dataTable,
.ep-table-shell .table {
    margin-bottom: 0 !important;
    width: 100% !important;
}

/* DataTables already manages responsive columns; Bootstrap's
   .table-responsive overflow-x:auto creates a phantom scrollbar. */
.ep-table-shell .table-responsive,
.ep-table-card .table-responsive {
    overflow-x: visible;
}

/* DataTables Bootstrap row gutters use negative margins that spill past the
   card edge and hide the top border-radius; keep controls inside the card. */
.ep-table-card .dataTables_wrapper > .row,
.ep-table-shell .dataTables_wrapper > .row {
    --bs-gutter-x: 0;
    margin-left: 0;
    margin-right: 0;
}

.ep-table-card .dataTables_wrapper > .row > [class*="col-"],
.ep-table-shell .dataTables_wrapper > .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}

.ep-table-shell .table > :not(caption) > * > * {
    padding: 1rem 0.95rem;
}

.ep-table-shell tbody tr {
    border-color: rgba(215, 222, 234, 0.72);
}

.ep-table-shell tbody tr:hover > * {
    background: rgba(206, 242, 234, 0.14) !important;
}

.ep-cs-card .ep-panel-body {
    padding-top: 0.25rem;
}

.ep-cs-country-list {
    display: grid;
    gap: 0;
}

.ep-cs-country-panel {
    overflow: hidden;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(195, 206, 222, 0.9);
    box-shadow: none;
}

.ep-cs-country-toggle {
    width: 100%;
    min-height: 60px;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0 0.75rem 1.5rem;
    text-align: left;
    box-shadow: none;
    border-radius: 0;
}

.ep-cs-country-toggle-copy {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 1 1 auto;
}

.ep-cs-country-main {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.ep-cs-country-flag {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    min-width: 30px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

.ep-cs-country-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: var(--ep-color-primary);
    font-size: 1.4rem;
    font-weight: 400;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 30px;
}

.ep-cs-country-toggle .ep-panel-title,
.ep-cs-country-toggle .ep-panel-copy {
    margin: 0;
}

.ep-cs-country-toggle .ep-panel-copy {
    color: var(--ep-color-text-muted);
    white-space: nowrap;
    margin-left: 20px;
}

.ep-cs-country-toggle[aria-expanded="true"] .ep-cs-country-toggle-icon {
    transform: rotate(45deg);
}

.ep-cs-country-table {
    margin-bottom: 0;
}

.ep-cs-country-table > :not(caption) > * > * {
    vertical-align: top;
}

.ep-cs-period-list {
    gap: 0.45rem;
}

.ep-cs-period-list li {
    padding-bottom: 0.45rem;
}

.ep-cs-mini-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.ep-cs-mini-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(215, 222, 234, 0.72);
}

.ep-cs-mini-list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

/* Audit history: latest | earlier with a vertical pipe divider */
.ep-cs-audit-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: start;
    column-gap: 1.5rem;
}

.ep-cs-audit-split--single {
    grid-template-columns: minmax(0, 1fr);
}

.ep-cs-audit-divider {
    width: 1px;
    align-self: stretch;
    min-height: 100%;
    background: rgba(195, 206, 222, 0.95);
}

.ep-cs-audit-pane-label {
    margin: 0 0 0.75rem;
    color: #8592a6;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ep-cs-audit-pane .ep-cs-mini-list li {
    align-items: baseline;
    gap: 0.75rem;
}

.ep-cs-audit-pane .ep-cs-mini-list-copy {
    min-width: 0;
    flex: 1 1 auto;
    line-height: 1.35;
}

.ep-cs-audit-pane .ep-cs-mini-list-meta {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.82rem;
}

@media (max-width: 991.98px) {
    .ep-cs-audit-split {
        grid-template-columns: 1fr;
        row-gap: 1.25rem;
    }

    .ep-cs-audit-divider {
        width: 100%;
        height: 1px;
        min-height: 0;
    }
}

/* CS payroll review tables are wider than the card; scroll here so sticky
   ID/Employee columns keep working. Do not use overflow:hidden — it clips
   the table with no scrollbar. Also re-enable .table-responsive scroll that
   .ep-table-card disables globally for DataTables pages. */
.ep-cs-table-shell {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.ep-table-card .ep-cs-table-shell.table-responsive,
.ep-table-card .ep-cs-table-shell .table-responsive,
.ep-cs-table-shell .table-responsive {
    overflow-x: auto;
}

.ep-cs-review-table--input {
    --ep-cs-sticky-id-width: 92px;
    --ep-cs-sticky-employee-width: 260px;
}

.ep-cs-review-table {
    min-width: 1200px;
    border-collapse: separate;
    border-spacing: 0;
}

.ep-cs-review-table > :not(caption) > * > * {
    white-space: nowrap;
    vertical-align: middle;
    border-bottom: 1px solid rgba(195, 206, 222, 0.85);
    padding-top: 1.05rem;
    padding-bottom: 1.05rem;
}

.ep-cs-review-table thead th {
    text-align: center;
    font-weight: 400;
    background: #fff;
}

.ep-cs-review-table tbody td,
.ep-cs-review-table tfoot th {
    text-align: center;
    background: #fff;
}

/* Totals row uses <th>; keep number styling aligned with body cells. */
.ep-cs-review-table tfoot th {
    font-size: inherit;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
    color: inherit;
}

.ep-cs-review-table--input tfoot .ep-cs-sticky-id,
.ep-cs-review-table--input tfoot .ep-cs-sticky-employee {
    z-index: 5;
    background: #fff !important;
}

.ep-cs-review-table tfoot .ep-cs-sticky-id {
    text-align: left;
}

.ep-cs-row-link {
    color: var(--ep-color-primary);
    font-weight: 500;
    text-decoration: none;
}

.ep-cs-row-link:hover,
.ep-cs-row-link:focus {
    color: var(--ep-color-primary);
    text-decoration: none;
}

.ep-cs-sticky {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff !important;
}

.ep-cs-sticky-second {
    left: 92px;
    z-index: 2;
    background: #fff !important;
}

.ep-cs-review-table thead .ep-cs-sticky,
.ep-cs-review-table thead .ep-cs-sticky-second {
    z-index: 3;
}

.ep-cs-review-table--input .ep-cs-sticky-id {
    left: 0;
    width: var(--ep-cs-sticky-id-width);
    min-width: var(--ep-cs-sticky-id-width);
    max-width: var(--ep-cs-sticky-id-width);
    box-sizing: border-box;
    z-index: 5;
    background: #fff !important;
}

.ep-cs-review-table--input .ep-cs-sticky-employee {
    left: var(--ep-cs-sticky-id-width);
    width: var(--ep-cs-sticky-employee-width);
    min-width: var(--ep-cs-sticky-employee-width);
    max-width: var(--ep-cs-sticky-employee-width);
    box-sizing: border-box;
    z-index: 4;
    background: #fff !important;
    box-shadow: inset -1px 0 0 rgba(195, 206, 222, 0.95), 12px 0 14px -14px rgba(20, 33, 74, 0.28);
    text-align: left !important;
}

.ep-cs-review-table--input thead .ep-cs-sticky-id {
    z-index: 7;
}

.ep-cs-review-table--input thead .ep-cs-sticky-employee {
    z-index: 6;
}

.ep-cs-review-table--input th.ep-cs-sticky-id,
.ep-cs-review-table--input td.ep-cs-sticky-id,
.ep-cs-review-table--input th.ep-cs-sticky-employee,
.ep-cs-review-table--input td.ep-cs-sticky-employee {
    background: #fff !important;
    box-sizing: border-box;
}

.ep-cs-review-table--input th.ep-cs-sticky-employee,
.ep-cs-review-table--input td.ep-cs-sticky-employee {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 1.1rem;
}

.ep-cs-review-table--input .ep-cs-row-link-employee {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ep-cs-header-label {
    display: block;
    color: var(--ep-color-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ep-cs-header-code {
    display: block;
    margin-top: 0.15rem;
    color: var(--ep-color-text-muted);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.ep-cs-value-col {
    min-width: 132px;
}

.ep-cs-value-strong {
    font-weight: 700;
    color: #111827;
}

.ep-cs-value-negative {
    color: #ff4b42;
}

.ep-cs-cell-note {
    display: block;
    margin-top: 0.25rem;
    color: var(--ep-color-text-muted);
    font-size: 0.78rem;
}

.ep-cs-change-cell {
    background: #fff7c9 !important;
}

.ep-cs-review-table tbody tr:hover > * {
    background: inherit !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_filter input.form-control,
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_length select.form-select {
    min-height: 32px !important;
    height: 32px !important;
    padding: 0.15rem 1.75rem 0.15rem 0.5rem !important;
    border-radius: 8px !important;
    border: 1px solid var(--ep-color-border-strong) !important;
    background-color: #fff !important;
    font-size: 0.8125rem !important;
    line-height: 1.2 !important;
}

.dataTables_wrapper .dataTables_filter input.form-control {
    padding-right: 0.65rem !important;
    min-width: 12rem;
}

.dataTables_wrapper .dataTables_length select.form-select {
    width: auto !important;
    min-width: 3.75rem;
    padding-right: 1.75rem !important;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ep-color-text-muted);
    line-height: 1.2;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding-top: 0.75rem !important;
    color: var(--ep-color-text-muted);
    font-size: 0.8125rem;
}

.dataTables_wrapper .dataTables_paginate .pagination {
    gap: 0.25rem;
    margin: 0;
}

.dataTables_wrapper .pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 32px;
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    margin: 0;
    border: 1px solid var(--ep-color-border-strong);
    background: #fff;
    color: var(--ep-color-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
}

.dataTables_wrapper .pagination .page-item.active .page-link {
    background: var(--ep-color-primary);
    border-color: var(--ep-color-primary);
    color: #fff;
}

.dataTables_wrapper .pagination .page-item:not(.active):not(.disabled) .page-link:hover,
.dataTables_wrapper .pagination .page-item:not(.active):not(.disabled) .page-link:focus {
    background: rgba(103, 170, 199, 0.12);
    border-color: var(--ep-color-accent);
    color: var(--ep-color-primary-strong);
}

.dataTables_wrapper .pagination .page-item.disabled .page-link {
    background: var(--ep-color-surface-soft);
    border-color: var(--ep-color-border);
    color: var(--ep-color-text-muted);
    opacity: 0.7;
    cursor: not-allowed;
}

/* Previous / Next as chevron icons (keep text in DOM for screen readers). */
.dataTables_wrapper .pagination .page-item.previous .page-link,
.dataTables_wrapper .pagination .page-item.next .page-link {
    font-size: 0;
    min-width: 2rem;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
}

.dataTables_wrapper .pagination .page-item.previous .page-link::before,
.dataTables_wrapper .pagination .page-item.next .page-link::before {
    font-family: "bootstrap-icons" !important;
    font-size: 0.95rem;
    font-weight: normal;
    line-height: 1;
    speak: never;
}

.dataTables_wrapper .pagination .page-item.previous .page-link::before {
    content: "\f284"; /* bi-chevron-left */
}

.dataTables_wrapper .pagination .page-item.next .page-link::before {
    content: "\f285"; /* bi-chevron-right */
}

.ep-form-tabs.nav-tabs {
    gap: 0.5rem;
    padding-bottom: 0.25rem;
}

.ep-form-tabs.nav-tabs .nav-link {
    padding: 0.85rem 1rem;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
}

.ep-form-tabs.nav-tabs .nav-link.active {
    border-color: rgba(23, 46, 127, 0.1);
    background: rgba(23, 46, 127, 0.06);
}

.ep-form-section {
    padding: 1.1rem;
    border: 1px solid rgba(215, 222, 234, 0.8);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.76), rgba(255, 255, 255, 0.98));
}

.ep-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(215, 222, 234, 0.8);
}

.ep-danger-banner {
    padding: 1rem 1.1rem;
    border: 1px solid rgba(166, 58, 80, 0.22);
    border-radius: var(--ep-radius-lg);
    background: rgba(251, 232, 237, 0.94);
    color: var(--ep-color-danger);
}

.ep-note-card {
    padding: 1rem 1.1rem;
    border: 1px solid rgba(215, 222, 234, 0.8);
    border-radius: var(--ep-radius-lg);
    background: rgba(248, 250, 252, 0.84);
}

/* Global no-hover policy */
a:hover {
    text-decoration: none !important;
}

.dropdown-item,
.btn,
.company-item,
.ep-list-row,
.nav-tabs .nav-link,
.card-hover-effect,
.kpi-card,
.dashboard-panel-card,
.kpi-summary,
.table-hover tbody tr > *,
.ep-table-shell tbody tr > * {
    transition: none !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: transparent !important;
    color: var(--ep-color-text) !important;
    box-shadow: none !important;
}

.btn:hover,
.btn:focus:hover {
    transform: none !important;
    color: var(--bs-btn-color) !important;
    background-color: var(--bs-btn-bg) !important;
    border-color: var(--bs-btn-border-color) !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.card-hover-effect:hover,
.kpi-card:hover,
.dashboard-panel-card:hover,
.kpi-summary:hover {
    transform: none !important;
    box-shadow: var(--ep-shadow-sm) !important;
}

.company-item:hover,
.ep-list-row:hover,
.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
    background: inherit !important;
    border-color: inherit !important;
    color: inherit !important;
    text-decoration: none !important;
    transform: none !important;
    box-shadow: none !important;
}

.table-hover tbody tr:hover > *,
.dataTables_wrapper table.dataTable.hover > tbody > tr:hover > *,
.dataTables_wrapper table.dataTable.display > tbody > tr:hover > *,
.dataTables_wrapper table.dataTable.stripe > tbody > tr:hover > *,
.ep-table-shell tbody tr:hover > * {
    background: transparent !important;
    box-shadow: none !important;
}

/* ── Card body: consistent padding matching panel-header ── */
.ep-page-card .card-body {
    padding: 1.5rem;
}

/* ── Tom Select: match ExactusPay design system ── */
.ts-wrapper.form-select {
    position: relative;
    background-image: none !important;
    padding: 0 !important;
    border: 0 !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.ts-wrapper .ts-control {
    position: relative;
    width: 100%;
    border-radius: 12px !important;
    border: 1px solid var(--ep-color-border-strong) !important;
    background: #fff !important;
    min-height: 44px !important;
    padding: 0.45rem 2.1rem 0.45rem 0.75rem !important;
    box-shadow: none !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    cursor: text;
}

.ts-wrapper .ts-caret-toggle {
    position: absolute;
    top: 0;
    right: 0;
    width: 2.1rem;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E") right 0.7rem center / 16px 12px no-repeat;
    cursor: pointer;
    z-index: 2;
    transition: transform 0.15s ease-in-out;
}

.ts-wrapper.dropdown-active .ts-caret-toggle {
    transform: rotate(180deg);
}

.ts-wrapper .ts-caret-toggle:focus-visible {
    outline: 2px solid rgba(23, 46, 127, 0.35);
    outline-offset: -2px;
}

.ts-wrapper.focus .ts-control {
    border-color: var(--ep-color-primary) !important;
    box-shadow: 0 0 0 0.18rem rgba(23, 46, 127, 0.12) !important;
    outline: none !important;
}

.ts-wrapper .ts-control input {
    font-family: var(--ep-font-family) !important;
    font-size: 0.95rem !important;
    color: var(--ep-color-text) !important;
    min-width: 6rem;
    flex: 1;
    cursor: text;
}

.ts-wrapper.multi .ts-control .item {
    background: rgba(23, 46, 127, 0.09) !important;
    border: 1px solid rgba(23, 46, 127, 0.14) !important;
    border-radius: 8px !important;
    color: var(--ep-color-primary) !important;
    font-size: 0.84rem !important;
    padding: 0.18rem 0.5rem 0.18rem 0.6rem !important;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ts-wrapper.multi .ts-control .item .remove {
    color: var(--ep-color-text-muted) !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    padding: 0 0 0 0.25rem !important;
    border-left: 1px solid rgba(23, 46, 127, 0.14) !important;
    margin-left: 0.25rem !important;
    cursor: pointer;
}

.ts-dropdown {
    border-radius: 14px !important;
    border: 1px solid var(--ep-color-border-strong) !important;
    box-shadow: var(--ep-shadow-md) !important;
    margin-top: 4px !important;
    overflow: hidden;
    font-family: var(--ep-font-family) !important;
}

.ts-dropdown .ts-dropdown-content {
    max-height: 260px;
    overflow-y: auto;
}

.ts-dropdown .option {
    padding: 0.6rem 1rem !important;
    font-size: 0.93rem !important;
    color: var(--ep-color-text) !important;
    border-radius: 0;
    transition: background 100ms;
}

.ts-dropdown .option.active {
    background: rgba(23, 46, 127, 0.07) !important;
    color: var(--ep-color-primary) !important;
}

.ts-dropdown .option.selected {
    background: rgba(23, 46, 127, 0.06) !important;
    color: var(--ep-color-primary) !important;
    font-weight: 400;
}

.ts-dropdown .option.selected.active {
    background: rgba(23, 46, 127, 0.12) !important;
}

.ts-dropdown [data-selectable].option:before {
    display: none;
}

.ts-wrapper .ts-dropdown-input-full input {
    border-bottom: 1px solid var(--ep-color-border) !important;
    padding: 0.6rem 1rem !important;
}

@media (max-width: 767.98px) {
    .ep-shell {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .ep-page-header {
        padding: 1rem 0.85rem 0.15rem;
    }

    .ep-page-title-row .page-context-country-name {
        font-size: 1.125rem;
    }

    .ep-page-header-row {
        align-items: flex-start;
    }

    .ep-page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .ep-page-actions .btn {
        width: auto;
        flex: 0 1 auto;
    }

    .ep-panel-header,
    .ep-panel-body,
    .ep-form-header,
    .ep-form-body,
    .ep-table-header,
    .ep-table-body,
    .ep-confirm-header,
    .ep-confirm-body {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .ep-form-footer,
    .ep-list-row,
    .ep-kv-row {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    .header-actions.ep-page-actions {
        width: 100%;
    }

    .header-actions.ep-page-actions > * {
        width: auto;
    }

    .header-actions .btn + .btn,
    .d-flex.gap-2 .btn + .btn {
        margin-top: 0;
    }

    .d-flex.gap-2 .btn + .btn {
        margin-top: 0.75rem;
    }
}
