/* =====================================================
   EvidentProof — Sidebar Theme
   Loaded after site.css to override old slim layout
===================================================== */

/* --- Body / font rules live in _Layout.cshtml inline <style> block ---
   ep-theme.css only owns layout structure, sidebar, topbar, components. */
body {
    background: #f0f2f5 !important;
    padding-top: 0 !important;
    margin: 0;
}

/* =====================================================
   SIDEBAR
===================================================== */
.ep-sidebar {
    width: 260px;
    height: 100vh;
    background: #1e293b;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    color: #94a3b8;
    overflow: hidden;
}

.ep-sidebar-brand {
    height: 62px;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    text-decoration: none;
}

.ep-brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 10px;
    display: none; /* shown only when collapsed (icon-only rail) — the full logo is the default */
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(37,99,235,.4);
    flex-shrink: 0;
}

.ep-brand-logo {
    /*height: 26px;*/
    width: auto;
    display: block;
}

.ep-sidebar-nav {
    flex: 1;
    padding: 8px 1px 8px 10px;
    overflow-y: auto;
    scrollbar-gutter: stable; /* reserves scrollbar space always — prevents text shift */
}

.ep-nav-section {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #cbd5e1;
    padding: 18px 12px 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
    transition: background .15s, color .15s;
    border-left: 3px solid transparent;
    cursor: pointer;
    background: none;
    border-top: none;
    border-right: none;
    border-bottom: none;
    width: 100%;
    text-align: left;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background: rgba(255,255,255,.05);
    color: #e2e8f0;
    text-decoration: none;
    outline: none;
}

.sidebar-link.active {
    background: rgba(59,130,246,.15);
    color: #60a5fa;
    font-weight: 600;
    border-left-color: #3b82f6;
}

.sidebar-link > i:first-child {
    font-size: 17px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link .ms-auto { margin-left: auto !important; }

 /*
.sidebar-link .badge,
#hot-wallet-alert .badge,
#draft-proof-certificate .badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 20px;
    line-height: 1.2;
    flex-shrink: 0;
}*/

/* When the badge span has ms-auto and is followed by a chevron,
   keep chevron after it with a small gap */
#draft-proof-certificate {
    display: inline-flex;
    align-items: center;
}

.sidebar-link .si-chevron {
    font-size: 12px;
    transition: transform .2s;
    flex-shrink: 0;
    /* Only auto-push when no badge sibling already took the auto margin */
    margin-left: auto;
}

/* When a notification badge precedes the chevron, remove double auto-margin */
.sidebar-link .ms-auto + .si-chevron {
    margin-left: 6px;
}

.sidebar-link[aria-expanded="true"] .si-chevron {
    transform: rotate(180deg);
}

.ep-submenu {
    padding: 0;
    list-style: none;
    margin: 0 0 2px 0;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    padding: 8px 12px 8px 44px;
    color: #6b7f96;
    text-decoration: none;
    font-size: 12.5px;
    border-radius: 6px;
    margin-bottom: 1px;
    transition: background .15s, color .15s;
}

.sidebar-sublink:hover {
    background: rgba(255,255,255,.04);
    color: #cbd5e1;
    text-decoration: none;
}

.sidebar-sublink.active {
    color: #60a5fa;
    font-weight: 600;
}

.ep-sidebar-footer {
    padding: 0 12px;
    height: 60px;
    border-top: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.ep-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background .15s;
    cursor: pointer;
    position: relative;
    width: 100%;
}

.ep-user-card:hover {
    background: rgba(255,255,255,.05);
}

.ep-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.ep-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.ep-sidebar-nav::-webkit-scrollbar {
    width: 5px;
}
.ep-sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255,255,255,.03);
    border-radius: 4px;
    margin: 6px 0;
}
.ep-sidebar-nav::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #3b82f6 0%, #6366f1 100%);
    border-radius: 4px;
    transition: background .2s;
}
.ep-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #2563eb 0%, #4f46e5 100%);
}
.ep-sidebar-nav::-webkit-scrollbar-thumb:active {
    background: #3b82f6;
}
/* Firefox */
.ep-sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: #3B82D8 transparent;
}

/* =====================================================
   MAIN CONTENT AREA
===================================================== */
.ep-main {
    margin-left: 260px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 62px;      /* offset for fixed topbar */
    overflow: hidden;       /* ep-main itself never scrolls */
}

/* Scrollable zone — starts where the fixed topbar ends */
.ep-scroll-area {
    flex: 1;
    min-height: 0;          /* required for flex child to shrink */
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Custom slim scrollbar for the content area */
.ep-scroll-area::-webkit-scrollbar        { width: 6px; }
.ep-scroll-area::-webkit-scrollbar-track  { background: transparent; }
.ep-scroll-area::-webkit-scrollbar-thumb  {
    background: #cbd5e1;
    border-radius: 99px;
}
.ep-scroll-area::-webkit-scrollbar-thumb:hover  { background: #94a3b8; }
.ep-scroll-area { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }

/* =====================================================
   TOPBAR
===================================================== */
.ep-topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 24px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;        /* fixed so scrollbar spans full viewport */
    top: 0;
    left: 260px;            /* align with sidebar width */
    right: 0;
    z-index: 1025;
    box-shadow: 0 1px 0 #e2e8f0, 0 2px 8px rgba(0,0,0,.04);
}

.ep-page-title-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(37,99,235,.1);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.ep-topbar-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.3px;
    margin: 0;
    color: #0f172a;
    line-height: 1.2;
}

.ep-topbar-sub {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 0px;
}

.ep-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ep-btn-icon {
    width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: background .15s;
    position: relative;
    text-decoration: none;
}

.tx-black {
    font-weight: 600 !important;
}
.ep-btn-icon:hover {
    background: #f1f5f9;
    color: #1e293b;
    text-decoration: none;
}
.badge {
    font-size: 71% !important;
    font-weight: 500 !important;
}
/* Topbar action buttons — match Bootstrap 5 / 5.html appearance */
.ep-topbar-right .btn {
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.4;
}
.ep-topbar-right .btn-sm {
    padding: 5px 12px !important;
}
.ep-topbar-right .btn-primary {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}
.ep-topbar-right .btn-primary:hover {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}
.ep-topbar-right .btn-outline-secondary {
    color: #475569 !important;
    border-color: #cbd5e1 !important;
    background: #fff !important;
}
.ep-topbar-right .btn-outline-secondary:hover {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    border-color: #94a3b8 !important;
}
.ep-topbar-right .btn-light {
    background-color: #f1f5f9 !important;
    border-color: #f1f5f9 !important;
    color: #64748b !important;
    padding: 5px 8px !important;
}
.ep-topbar-right .btn-light:hover {
    background-color: #e2e8f0 !important;
    border-color: #e2e8f0 !important;
    color: #334155 !important;
}
.ep-topbar-right .vr {
    opacity: 1;
    background-color: #e2e8f0;
    width: 1px;
    height: 22px !important;
    min-height: unset;
    align-self: center !important;
}

/* Topbar search box */
.ep-topbar-search {
    width: 200px;
    flex-shrink: 0;
}
.ep-topbar-search .input-group-text {
    border-color: #e2e8f0;
    border-right: none;
}
.ep-topbar-search .form-control {
    border-color: #e2e8f0;
    border-left: none;
    font-size: 13px !important;
}
.ep-topbar-search .form-control:focus {
    border-color: #0d6efd;
    box-shadow: none;
}
.ep-topbar-search .form-control:focus + .input-group-text,
.ep-topbar-search .input-group:focus-within .input-group-text {
    border-color: #0d6efd;
}

/* Sidebar user dropdown menu — pops upward */
.ep-sidebar-user-menu {
    bottom: 100%;
    top: auto !important;
    transform: none !important;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 -4px 24px rgba(0,0,0,.12);
    overflow: hidden;
    padding: 4px 0 !important;
}
.ep-sidebar-user-menu .ep-menu-header {
    padding: 10px 14px 8px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}
.ep-sidebar-user-menu .ep-menu-header .ep-menu-email {
    font-size: 11.5px !important;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.ep-sidebar-user-menu .ep-menu-header .badge {
    font-size: 10px !important;
    padding: 2px 7px !important;
    border-radius: 20px !important;
}
.ep-sidebar-user-menu .dropdown-item {
    font-size: 12.5px !important;
    color: #374151 !important;
    padding: 7px 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    border-radius: 0;
}
.ep-sidebar-user-menu .dropdown-item i {
    font-size: 13px !important;
    width: 16px;
    text-align: center;
}
.ep-sidebar-user-menu .dropdown-item:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}
.ep-sidebar-user-menu .dropdown-item.text-danger {
    color: #dc2626 !important;
}
.ep-sidebar-user-menu .dropdown-item.text-danger:hover {
    background: #fef2f2 !important;
    color: #b91c1c !important;
}
.ep-sidebar-user-menu .dropdown-divider {
    margin: 3px 0 !important;
    border-color: #f1f5f9 !important;
}

/* User card hover now that it's clickable again */
.ep-user-card a:hover { text-decoration: none; }
#sidebarUserDropdown .ep-user-avatar { pointer-events: none; }

/* =====================================================
   CHART TOOLTIP — weekly usage reports
===================================================== */
[id^="chartjs-tooltip-"] {
    opacity: 0;
    position: absolute;
    min-width: 160px;
    padding: 0;
    transition: opacity 0.1s ease;
    pointer-events: none;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,.13);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    z-index: 100;
    background: #fff;
}
[id^="chartjs-tooltip-"] table {
    width: 100%;
    border-collapse: collapse;
}
[id^="chartjs-tooltip-"] table thead tr th {
    background: #1e293b;
    color: #94a3b8 !important;
    font-size: 10px;
    font-weight: 600;
    padding: 6px 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
[id^="chartjs-tooltip-"] table td {
    background: #fff !important;
    color: #1e293b !important;
    padding: 7px 10px !important;
    font-size: 13px;
    border-top: 1px solid #f1f5f9;
}
[id^="chartjs-tooltip-"] .dotdot {
    white-space: nowrap;
    max-width: 200px;
    width: auto;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =====================================================
   BODY AREA
===================================================== */
.ep-body {
    flex: 1;
    padding: 24px;
}

/* =====================================================
   FOOTER
===================================================== */
.ep-footer {
    padding: 0 24px;
    height: 60px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.ep-footer a {
    color: #64748b;
    text-decoration: none;
}

.ep-footer a:hover {
    color: #3b82f6;
    text-decoration: underline;
}

/* =====================================================
   GLOBAL CARDS — rounded corners everywhere
===================================================== */
.card {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden;
}
.card-header {
    border-radius: 12px 12px 0 0 !important;
}
.card-footer {
    border-radius: 0 0 12px 12px !important;
}
/* Card-only (no header/footer): keep all corners */
.card:not(:has(.card-header)) .card-body:first-child {
    border-radius: 12px !important;
}

/* =====================================================
   STAT CARDS
===================================================== */
.ep-stat-card, .stat-card {
    transition: box-shadow .2s, transform .2s;
    border: 1px solid #e2e8f0 !important;
    background: #fff;
    border-radius: 12px !important;
    overflow: hidden;
}
.main-ep-card {
    padding-right: 0 !important;
}
.ep-stat-card:hover, .stat-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,.09) !important;
    transform: translateY(-3px);
}

/* Card body spacing matches 5.html */
.ep-stat-card .card-body,
.stat-card .card-body {
    padding: 1.05rem !important;
}

/* =====================================================
   HOT WALLET PAGE
===================================================== */

/* Gradient balance card */
.ep-wallet-balance-card {
    background: linear-gradient(135deg, #1e3a5f, #2563eb, #3b82f6) !important;
    color: #fff !important;
    border-radius: 12px !important;
    position: relative;
    overflow: hidden;
}
.ep-wallet-balance-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -8%;
    width: 220px;
    height: 220px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
    pointer-events: none;
}
.ep-wallet-balance-card .small,
.ep-wallet-balance-card p,
.ep-wallet-balance-card div {
    color: inherit !important;
}
.ep-wallet-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* Transaction table */
.ep-tx-table thead th {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #94a3b8 !important;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 10px 12px !important;
}
.ep-tx-table tbody tr:last-child td {
    border-bottom: none !important;
}
.ep-tx-table tbody td {
    vertical-align: middle;
    border-color: #f1f5f9 !important;
}

/* Transaction direction dot */
.ep-tx-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.ep-tx-debit  { background: rgba(239,68,68,.1);  color: #dc2626; }
.ep-tx-credit { background: rgba(34,197,94,.1);  color: #16a34a; }

/* Transaction type badge */
.ep-badge-debit,
.ep-badge-credit {
    font-size: 11px !important;
    font-weight: 500 !important;
    padding: 3px 8px !important;
    border-radius: 20px !important;
    white-space: nowrap;
}
.ep-badge-debit  { background: rgba(239,68,68,.1)  !important; color: #dc2626 !important; }
.ep-badge-credit { background: rgba(34,197,94,.1)  !important; color: #16a34a !important; }

/* Transaction amount */
.ep-amount-debit  { color: #dc2626 !important; font-size: 14px; }
.ep-amount-credit { color: #16a34a !important; font-size: 14px; }

/* Mini progress bar for 30-Day Activity card */
.ep-mini-progress {
    height: 5px !important;
    border-radius: 3px !important;
    background-color: #f1f5f9 !important;
    overflow: hidden;
}
.ep-mini-progress .progress-bar {
    border-radius: 3px !important;
    transition: width .6s ease;
}

/* Big number — should be near-black like 5.html */
.ep-stat-card .card-body h3,
.stat-card .card-body h3 {
    color: #0f172a;
    letter-spacing: -.5px;
}

/* Label above number */
.ep-stat-card .card-body .text-muted.text-uppercase,
.stat-card .card-body .text-muted.text-uppercase {
    font-size: 11px !important;
    letter-spacing: .5px;
    color: #94a3b8 !important;
}

/* Sub-stats row */
.ep-stat-card .card-body .d-flex small,
.stat-card .card-body .d-flex small {
    font-size: 12px;
    color: #94a3b8;
}

.ep-stat-card .card-body .d-flex small strong,
.stat-card .card-body .d-flex small strong {
    font-weight: 600;
}

/* View All link */
.ep-stat-card .card-body a.fw-semibold,
.stat-card .card-body a.fw-semibold {
    font-size: 12.5px;
    transition: gap .15s;
}

.ep-stat-icon, .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

/* =====================================================
   WALLET HERO
===================================================== */
.ep-wallet-hero, .wallet-hero {
    background: linear-gradient(135deg, #1e3a5f, #2563eb, #3b82f6);
    border-radius: 12px;
    padding: 28px 32px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.ep-wallet-hero::before, .wallet-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
    pointer-events: none;
}

.ep-wallet-hero::after, .wallet-hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: 30%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
    pointer-events: none;
}

.ep-wallet-hero .row, .wallet-hero .row { position: relative; z-index: 1; }

/* =====================================================
   MISC OVERRIDES
===================================================== */

/* Loading overlay */
.lmask { z-index: 9999 !important; }

/* Copy toast */
.copy-modal {
    position: fixed;
    /*bottom: 24px;*/
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    display: none;
    z-index: 9999;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}

/* System message bar sits just below topbar */
.system-message, .alert-system {
    margin: 0;
    border-radius: 0;
}

/* =====================================================
   BOOTSTRAP 5 UTILITIES POLYFILL FOR BOOTSTRAP 4
===================================================== */

/* Gap */
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }

/* Bootstrap 5 row gutter (g-*) polyfill for BS4.
   BS4 .row default is margin: 0 -15px which bleeds past containers.
   These classes reset to a tighter gutter and override that default. */
.g-0 { --bs-gutter-x: 0;       --bs-gutter-y: 0; }
.g-1 { --bs-gutter-x: .25rem;  --bs-gutter-y: .25rem; }
.g-2 { --bs-gutter-x: .5rem;   --bs-gutter-y: .5rem; }
.g-3 { --bs-gutter-x: 1rem;    --bs-gutter-y: 1rem; }
.g-4 { --bs-gutter-x: 1.5rem;  --bs-gutter-y: 1.5rem; }
.g-5 { --bs-gutter-x: 3rem;    --bs-gutter-y: 3rem; }

.row.g-0, .row.g-1, .row.g-2, .row.g-3, .row.g-4, .row.g-5 {
    margin-right: calc(var(--bs-gutter-x) * -.5) !important;
    margin-left:  calc(var(--bs-gutter-x) * -.5) !important;
    row-gap: var(--bs-gutter-y) !important;
}
.row.g-0 > *, .row.g-1 > *, .row.g-2 > *,
.row.g-3 > *, .row.g-4 > *, .row.g-5 > * {
    padding-right: calc(var(--bs-gutter-x) * .5) !important;
    padding-left:  calc(var(--bs-gutter-x) * .5) !important;
}

/* Vertical rule */
.vr {
    display: inline-block;
    align-self: stretch;
    width: 1px;
    min-height: 1em;
    background-color: #dee2e6;
    opacity: .25;
}

/* Font weight */
.fw-bold     { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-medium   { font-weight: 500 !important; }
.fw-normal   { font-weight: 400 !important; }
.fw-light    { font-weight: 300 !important; }

/* Opacity */
.opacity-100 { opacity: 1    !important; }
.opacity-75  { opacity: 0.75 !important; }
.opacity-50  { opacity: 0.50 !important; }
.opacity-25  { opacity: 0.25 !important; }
.opacity-10  { opacity: 0.10 !important; }

/* Border start (left) */
.border-start { border-left: 1px solid !important; }
.border-end   { border-right: 1px solid !important; }

/* Border colour + opacity helpers for white borders inside coloured containers */
.border-white          { border-color: #fff !important; }
.border-opacity-25     { border-color: rgba(255,255,255,.25) !important; }
.border-opacity-50     { border-color: rgba(255,255,255,.50) !important; }

/* Combined: border-start border-white border-opacity-25 → single left border */
.border-start.border-white.border-opacity-25 {
    border-left: 1px solid rgba(255,255,255,.25) !important;
}

/* Background opacity for white badges inside coloured containers */
.bg-white.bg-opacity-25 { background-color: rgba(255,255,255,.25) !important; }
.bg-white.bg-opacity-20 { background-color: rgba(255,255,255,.20) !important; }
.bg-white.bg-opacity-10 { background-color: rgba(255,255,255,.10) !important; }

/* Text */
.text-white-75 { color: rgba(255,255,255,.75) !important; }
.text-white-50 { color: rgba(255,255,255,.50) !important; }

/* Subtle background utilities */
.bg-primary-subtle   { background-color: rgba(59,130,246,.12) !important; }
.bg-success-subtle   { background-color: rgba(25,135,84,.12)  !important; }
.bg-warning-subtle   { background-color: rgba(255,193,7,.12)  !important; }
.bg-danger-subtle    { background-color: rgba(220,53,69,.12)   !important; }
.bg-info-subtle      { background-color: rgba(13,202,240,.12)  !important; }
.bg-secondary-subtle { background-color: rgba(108,117,125,.12) !important; }

/* me-1 / me-2 (margin-end / margin-start — BS5 RTL-aware aliases) */
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem  !important; }
.me-3 { margin-right: 1rem    !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem  !important; }
.ms-3 { margin-left: 1rem    !important; }
.ms-auto { margin-left: auto  !important; }

/* Coloured bg-opacity-10 — Bootstrap 5 exact palette */
.bg-primary.bg-opacity-10 { background-color: rgba(13,110,253,.10)  !important; }
.bg-success.bg-opacity-10 { background-color: rgba(25,135,84,.10)   !important; }
.bg-warning.bg-opacity-10 { background-color: rgba(255,193,7,.10)   !important; }
.bg-danger.bg-opacity-10  { background-color: rgba(220,53,69,.10)   !important; }
.bg-info.bg-opacity-10    { background-color: rgba(13,202,240,.10)  !important; }

/* Colour tokens are defined in _Layout.cshtml inline <style> block.
   Only sidebar-specific overrides live here. */
.sidebar-link.active { color: #60a5fa !important; }

/* form-select — BS5 alias for BS4 form-control on <select> */
select.form-select {
    display: block;
    width: 100%;
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.5;
    color: #374151;
    background-color: #fff;
    background-image: 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");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    background-size: 12px 9px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .15s, box-shadow .15s;
}
select.form-select:focus {
    border-color: #3b82f6;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
select.form-select-sm {
    padding: 0.25rem 1.8rem 0.25rem 0.6rem;
    font-size: .8125rem;
    border-radius: 6px;
}

/* =====================================================
   GLOBAL FORM FIELDS
   Rounds inputs/selects to match card styling.
===================================================== */

/* Base input / select / textarea */
.form-control,
input.form-control,
select.form-control,
textarea.form-control {
    border-color: #e2e8f0 !important;
    border-radius: 8px !important;
    color: #374151 !important;
    background-color: #fff !important;
    transition: border-color .15s ease, box-shadow .15s ease !important;
    font-size: 13.5px !important;
    padding: 7px 12px !important;
}

.form-control:focus,
input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12) !important;
    outline: 0 !important;
}

.form-control::placeholder { color: #9ca3af !important; }

/* Selects — force same height as text inputs via padding (browser adds extra height otherwise) */
select.form-control {
    height: auto !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 12px !important;
    padding-right: 30px !important;
    cursor: pointer !important;
}
select.form-control-sm {
    height: auto !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

/* Small variant */
.form-control-sm,
input.form-control-sm,
select.form-control-sm,
textarea.form-control-sm {
    border-radius: 6px !important;
    font-size: 13px !important;
    padding: 5px 10px !important;
}

/* Date inputs — calendar icon via background-image (targets placeholder pattern & common id/class names) */
input[placeholder="dd-MMM-yyyy"],
input[placeholder="dd-MMM-YYYY"],
input.date-range-start,
input.date-range-end,
input[id="fromDate"],
input[id="toDate"] {
    padding-right: 36px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' fill='%23111827' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 13px !important;
    cursor: default !important;
}
input[placeholder="dd-MMM-yyyy"]:focus,
input[placeholder="dd-MMM-YYYY"]:focus,
input.date-range-start:focus,
input.date-range-end:focus,
input[id="fromDate"]:focus,
input[id="toDate"]:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' fill='%23111827' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z'/%3E%3C/svg%3E") !important;
}

/* Input groups — fix radius so only outer edges are rounded */
.input-group > .form-control:not(:last-child),
.input-group > .form-control-sm:not(:last-child) {
    border-radius: 8px 0 0 8px !important;
}
.input-group > .form-control:not(:first-child),
.input-group > .form-control-sm:not(:first-child) {
    border-radius: 0 8px 8px 0 !important;
}
.input-group > .input-group-text:first-child,
.input-group > .input-group-prepend > .input-group-text {
    border-radius: 8px 0 0 8px !important;
    border-color: #e2e8f0 !important;
    background: #f8fafc !important;
    color: #64748b !important;
}
.input-group > .input-group-text:last-child,
.input-group > .input-group-append > .input-group-text {
    border-radius: 0 8px 8px 0 !important;
    border-color: #e2e8f0 !important;
    background: #f8fafc !important;
    color: #64748b !important;
}
.input-group-sm > .form-control,
.input-group-sm > .input-group-text,
.input-group-sm > .input-group-prepend > .input-group-text,
.input-group-sm > .input-group-append > .input-group-text {
    border-radius: 6px !important;
}
.input-group-sm > .form-control:not(:last-child) {
    border-radius: 6px 0 0 6px !important;
}
.input-group-sm > .form-control:not(:first-child) {
    border-radius: 0 6px 6px 0 !important;
}

/* =====================================================
   SELECT2 — complete restyle (flex-based pills, no float)
===================================================== */

/* Base selection box — fixed height always, never grows */
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #fff !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 !important;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Focus / open glow — no height change */
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--multiple {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,.12) !important;
    height: 38px !important;
    max-height: 38px !important;
    overflow: hidden !important;
}

/* Single selection */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #374151 !important;
    line-height: 36px !important;
    padding-left: 12px !important;
    font-size: 14px !important;
}
/* ── Single select: chevron arrow ── */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    width: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: none !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow::after {
    content: "\f282";
    font-family: "bootstrap-icons" !important;
    font-style: normal !important;
    font-size: 13px !important;
    color: #94a3b8 !important;
    display: block !important;
    line-height: 1 !important;
    transition: transform .2s ease, color .15s !important;
}
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow::after {
    transform: rotate(180deg) !important;
    color: #2563eb !important;
}

/* ── Multiple select: chevron arrow via ::after ── */
.select2-container--default .select2-selection--multiple::after {
    content: "\f282";
    font-family: "bootstrap-icons" !important;
    font-style: normal !important;
    font-size: 13px !important;
    color: #94a3b8 !important;
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
    line-height: 1 !important;
    display: block !important;
    transition: transform .2s ease, color .15s !important;
}
.select2-container--default.select2-container--open .select2-selection--multiple::after {
    transform: translateY(-50%) rotate(180deg) !important;
    color: #2563eb !important;
}

/* ── "Clear all" × button (allowClear) — absolutely positioned, never in flow ── */
.select2-container--default .select2-selection--multiple .select2-selection__clear,
.select2-container--default .select2-selection--single  .select2-selection__clear {
    position: absolute !important;
    right: 28px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    float: none !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    z-index: 2 !important;
    margin: 0 !important;
    padding: 2px 4px !important;
    transition: color .12s !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__clear:hover,
.select2-container--default .select2-selection--single  .select2-selection__clear:hover {
    color: #dc2626 !important;
}

/* ── MULTI-SELECT: rendered pill list — wraps + vertical scroll inside fixed outer ── */
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 3px 4px !important;
    padding: 3px 28px 3px 8px !important; /* right: 28px leaves room for chevron */
    overflow-x: hidden !important;
    overflow-y: auto !important;
    list-style: none !important;
    margin: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    box-sizing: border-box !important;
    /* slim scrollbar */
    scrollbar-width: thin !important;
    scrollbar-color: #bfdbfe transparent !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar {
    width: 3px !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar-track {
    background: transparent !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar-thumb {
    background: #bfdbfe !important;
    border-radius: 99px !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar-thumb:hover {
    background: #93c5fd !important;
}

/* ── Each tag pill — flex row so × and label sit on one line ── */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    display: flex !important;
    align-items: center !important;
    float: none !important;
    background: #eff6ff !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 20px !important;
    color: #1d4ed8 !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    padding: 2px 9px 2px 5px !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: unset !important;
}

/* × remove — flex item, always to the left of label text */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    width: 15px !important;
    height: 15px !important;
    background: rgba(37,99,235,.18) !important;
    color: #2563eb !important;
    border-radius: 50% !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    margin-right: 5px !important;
    padding: 0 !important;
    cursor: pointer !important;
    transition: background .12s, color .12s !important;
    position: static !important;
    transform: none !important;
    float: none !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    background: rgba(37,99,235,.32) !important;
    color: #1e40af !important;
}

/* ── Inline search input item ── */
.select2-container--default .select2-selection--multiple .select2-search--inline {
    display: flex !important;
    align-items: center !important;
    float: none !important;
    flex: 1 1 60px !important;
}
.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    margin: 0 !important;
    padding: 0 4px !important;
    height: 24px !important;
    min-width: 60px !important;
    width: 100% !important;
    font-size: 13px !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* ── sm (form-control-sm) variant — always 32px, never grows ── */
select.form-control-sm + .select2-container .select2-selection--multiple,
select.form-control-sm + .select2-container .select2-selection--single {
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}
select.form-control-sm + .select2-container .select2-selection--multiple .select2-selection__rendered {
    height: 100% !important;
    max-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 2px 5px 2px 6px !important;
    gap: 2px 3px !important;
    flex-wrap: wrap !important;
}
select.form-control-sm + .select2-container .select2-selection--multiple .select2-selection__choice {
    font-size: 11px !important;
    padding: 1px 7px 1px 4px !important;
}
select.form-control-sm + .select2-container .select2-selection--multiple .select2-selection__choice__remove {
    width: 13px !important;
    height: 13px !important;
    font-size: 10px !important;
    margin-right: 4px !important;
}
select.form-control-sm + .select2-container .select2-selection--multiple .select2-search--inline .select2-search__field {
    height: 20px !important;
    font-size: 12px !important;
}
select.form-control-sm + .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 30px !important;
    font-size: 13px !important;
    padding-left: 10px !important;
}

/* ── Dropdown panel ── */
.select2-dropdown {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.10) !important;
    overflow: hidden !important;
}
.select2-results__option {
    font-size: 13px !important;
    padding: 7px 12px !important;
    color: #374151 !important;
}
.select2-container--default .select2-results__option--highlighted {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
}
.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #f8fafc !important;
    color: #64748b !important;
}
.select2-search--dropdown .select2-search__field {
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    padding: 5px 10px !important;
    font-size: 13px !important;
}

/* Global buttons — rounded to match cards */
.btn {
    border-radius: 7px !important;
    font-weight: 500 !important;
    font-size: 13.5px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
    transition: all .15s ease !important;
}
.btn-sm {
    border-radius: 6px !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    font-size: 12.5px !important;
}
.btn-lg { border-radius: 9px !important; }

/* Primary */
.btn-primary {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 4px 12px rgba(37,99,235,.3) !important;
}

/* Outline primary */
.btn-outline-primary {
    color: #2563eb !important;
    border-color: #2563eb !important;
    background-color: transparent !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37,99,235,.3) !important;
}
.btn-outline-primary:active {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

/* Ghost icon button — three-dots action trigger (border-0 overrides outline-secondary fill) */
.btn-outline-secondary.border-0 {
    background-color: transparent !important;
    border-color: transparent !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}
.btn-outline-secondary.border-0:hover {
    background-color: #f1f5f9 !important;
    border-color: transparent !important;
    color: #475569 !important;
    box-shadow: none !important;
}
.btn-outline-secondary.border-0:active,
.btn-outline-secondary.border-0:focus {
    background-color: #e2e8f0 !important;
    border-color: transparent !important;
    color: #1e293b !important;
    box-shadow: none !important;
}

/* Outline danger */
.btn-outline-danger {
    border-color: #fca5a5 !important;
    color: #dc2626 !important;
}
.btn-outline-danger:hover {
    background-color: #fef2f2 !important;
    border-color: #f87171 !important;
    color: #b91c1c !important;
}

/* Form labels */
.form-label,
label.form-label {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 5px !important;
}

/* =====================================================
   SIDEBAR COLLAPSE — desktop icon-only mode
===================================================== */

/* Smooth transitions for collapse animation */
.ep-sidebar          { transition: width .25s cubic-bezier(.4,0,.2,1); }
.ep-main             { transition: margin-left .25s cubic-bezier(.4,0,.2,1); }
.ep-topbar           { transition: left .25s cubic-bezier(.4,0,.2,1); }
.ep-brand-logo,
.sidebar-link > span,
.sidebar-link .si-chevron,
.ep-nav-section      { transition: opacity .15s, width .2s, padding .2s; }

/* Collapsed sidebar — 64px icon-only rail */
.ep-sidebar.ep-collapsed {
    width: 64px !important;
    overflow: visible !important; /* lets tooltips escape the rail */
}
.ep-sidebar.ep-collapsed .ep-sidebar-nav {
    overflow: visible !important; /* same */
    padding: 8px 4px !important;
    scrollbar-gutter: auto !important;
}

/* Collapsed brand — just the EP icon centred */
.ep-sidebar.ep-collapsed .ep-sidebar-brand {
    justify-content: center !important;
    padding: 0 !important;
    gap: 0 !important;
}
.ep-sidebar.ep-collapsed .ep-brand-icon { display: flex !important; }
.ep-sidebar.ep-collapsed .ep-brand-logo { display: none !important; }

/* Hide text elements */
.ep-sidebar.ep-collapsed .ep-nav-section     { display: none !important; }
.ep-sidebar.ep-collapsed .sidebar-link > span { display: none !important; }
.ep-sidebar.ep-collapsed .sidebar-link .si-chevron { display: none !important; }
.ep-sidebar.ep-collapsed .ep-submenu         { display: none !important; }

/* Centre icons in the rail */
.ep-sidebar.ep-collapsed .sidebar-link {
    justify-content: center !important;
    padding: 10px 0 !important;
    border-left-color: transparent !important;
    position: relative;
}
.ep-sidebar.ep-collapsed .sidebar-link.active {
    border-left-color: transparent !important;
    background: rgba(59,130,246,.18) !important;
    border-radius: 8px !important;
}
.ep-sidebar.ep-collapsed .sidebar-link > i:first-child {
    width: auto !important;
    font-size: 19px !important;
    margin: 0 !important;
}

/* Tooltip — appears to the right of the icon rail on hover */
.ep-sidebar.ep-collapsed .sidebar-link::after {
    content: attr(data-label);
    position: fixed;              /* fixed so it escapes overflow:hidden ancestors */
    left: 72px;
    transform: translateY(-50%);
    background: #1e293b;
    color: #f1f5f9;
    font-size: 12.5px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    padding: 5px 12px;
    border-radius: 7px;
    white-space: nowrap;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    pointer-events: none;
    opacity: 0;
    transition: opacity .12s;
}
.ep-sidebar.ep-collapsed .sidebar-link:hover::after {
    opacity: 1;
}

/* Footer — shrink to avatar only */
.ep-sidebar.ep-collapsed .ep-sidebar-footer {
    padding: 0 !important;
    justify-content: center !important;
}
.ep-sidebar.ep-collapsed .ep-user-card {
    justify-content: center !important;
    padding: 6px 0 !important;
    gap: 0 !important;
}
/* Keep the trigger <a> but centre it */
.ep-sidebar.ep-collapsed .ep-user-card > a {
    justify-content: center !important;
    padding: 0 !important;
    width: auto !important;
    gap: 0 !important;
}
/* Hide text + chevron inside the <a>, leave only the avatar div */
.ep-sidebar.ep-collapsed .ep-user-card > a > div:not(.ep-user-avatar) { display: none !important; }
.ep-sidebar.ep-collapsed .ep-user-card > a > i                        { display: none !important; }

/* =====================================================
   SIDEBAR HOVER EXPAND
   Overlays content when hovering a collapsed sidebar.
   To revert: delete from this comment to END HOVER EXPAND
===================================================== */

/* Expand sidebar as overlay — main/topbar margins do NOT shift */
.ep-sidebar.ep-collapsed.ep-hover-expanded {
    width: 260px !important;
    overflow: hidden !important;
    box-shadow: 6px 0 32px rgba(0,0,0,.22) !important;
}

/* Restore brand */
.ep-sidebar.ep-collapsed.ep-hover-expanded .ep-sidebar-brand {
    justify-content: flex-start !important;
    padding: 0 20px !important;
    gap: 10px !important;
}
.ep-sidebar.ep-collapsed.ep-hover-expanded .ep-brand-logo {
    display: block !important;
}
.ep-sidebar.ep-collapsed.ep-hover-expanded .ep-brand-icon {
    display: none !important;
}

/* Restore nav section labels */
.ep-sidebar.ep-collapsed.ep-hover-expanded .ep-nav-section {
    display: block !important;
}

/* Restore nav scroll area */
.ep-sidebar.ep-collapsed.ep-hover-expanded .ep-sidebar-nav {
    padding: 8px 1px 8px 10px !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable !important;
}

/* Restore sidebar links */
.ep-sidebar.ep-collapsed.ep-hover-expanded .sidebar-link {
    justify-content: flex-start !important;
    padding: 10px 12px !important;
    border-left: 3px solid transparent !important;
}
.ep-sidebar.ep-collapsed.ep-hover-expanded .sidebar-link.active {
    border-left-color: #3b82f6 !important;
    background: rgba(59,130,246,.15) !important;
    border-radius: 8px !important;
}
.ep-sidebar.ep-collapsed.ep-hover-expanded .sidebar-link > i:first-child {
    font-size: 17px !important;
    width: 22px !important;
}
.ep-sidebar.ep-collapsed.ep-hover-expanded .sidebar-link > span {
    display: inline !important;
}
.ep-sidebar.ep-collapsed.ep-hover-expanded .sidebar-link .si-chevron {
    display: inline-flex !important;
}

/* Allow Bootstrap collapse .show to work when hover-expanded */
.ep-sidebar.ep-collapsed.ep-hover-expanded .ep-submenu.show {
    display: block !important;
}
/* Speed up Bootstrap collapse animation in hover-expanded mode */
.ep-sidebar.ep-collapsed.ep-hover-expanded .ep-submenu.collapsing {
    transition-duration: 0.12s !important;
}

/* Re-show the active submenu when hover-expanded */
.ep-sidebar.ep-collapsed.ep-hover-expanded .ep-submenu.show {
    display: block !important;
}

/* Hide tooltip — text is visible now */
.ep-sidebar.ep-collapsed.ep-hover-expanded .sidebar-link::after {
    display: none !important;
    opacity: 0 !important;
}

/* Restore footer */
.ep-sidebar.ep-collapsed.ep-hover-expanded .ep-sidebar-footer {
    padding: 0 12px !important;
    justify-content: flex-start !important;
}
.ep-sidebar.ep-collapsed.ep-hover-expanded .ep-user-card {
    justify-content: flex-start !important;
    padding: 6px 8px !important;
    gap: 10px !important;
}
.ep-sidebar.ep-collapsed.ep-hover-expanded .ep-user-card > a {
    justify-content: flex-start !important;
    padding: 0 !important;
    width: 100% !important;
    gap: 10px !important;
}
.ep-sidebar.ep-collapsed.ep-hover-expanded .ep-user-card > a > div:not(.ep-user-avatar) {
    display: block !important;
}
.ep-sidebar.ep-collapsed.ep-hover-expanded .ep-user-card > a > i {
    display: block !important;
}

/* END HOVER EXPAND */

/* =====================================================
   EVIDENCE DETAIL CARD  (rendered via AJAX into .media-content)
===================================================== */
.ep-evidence-card {
    background: #fff;
    border: 1px solid #e2ebf6;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}
.ep-evidence-card:last-child { margin-bottom: 0; }

.ep-evidence-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: #eff6ff;
    border-bottom: 1px solid rgba(37,99,235,.15);
}
.ep-evidence-id {
    font-size: 12.5px;
    font-weight: 600;
    color: #0f172a;
    word-break: break-all;
    display: flex;
    align-items: center;
}
.ep-evidence-status-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 11px;
    border-radius: 20px;
    background: rgba(34,197,94,.12);
    color: #16a34a;
    border: 1px solid rgba(34,197,94,.2);
    white-space: nowrap;
    flex-shrink: 0;
}

.ep-evidence-body { padding: 6px 14px 10px; }

.ep-evidence-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 6px 0;
    border-bottom: 1px solid #f8fafc;
    font-size: 12.5px;
}
.ep-evidence-row:last-child { border-bottom: none; }

.ep-evidence-label {
    font-weight: 600;
    color: #64748b;
    flex-shrink: 0;
    width: 80px;
    padding-top: 1px;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.ep-evidence-value {
    color: #1e293b;
    word-break: break-all;
    font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.6;
}

/* =====================================================
   EP LIST ITEMS  — reusable across Dispatch, Certificates, API Calls, etc.
===================================================== */

/* Container */
.ep-list-group {
    display: flex;
    flex-direction: column;
}

/* Row */
.ep-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    border-left: 3px solid transparent;
    transition: background .15s, border-left-color .15s;
    position: relative;
}
.ep-list-item:last-of-type {
    border-bottom: none;
}
.ep-list-item:hover {
    background: #f8fafc;
}
.ep-list-item.active {
    background: #f0f7ff;
    border-left-color: #3b82f6;
}

/* Expand toggle area */
.ep-list-item-expand {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    transition: background .15s, color .15s;
    margin-top: 2px;
}
.ep-list-item-expand:hover {
    background: rgba(59,130,246,.09);
    color: #3b82f6;
}
.ep-list-item-expand i {
    font-size: 12px;
    transition: transform .2s ease;
    pointer-events: none;
}
.ep-list-item.active .ep-list-item-expand i {
    transform: rotate(90deg);
    color: #3b82f6;
}

/* Main body — fills remaining width */
.ep-list-item-body {
    flex: 1;
    min-width: 0;
}
.ep-list-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    word-break: break-all;
    line-height: 1.4;
}
.ep-list-item-sub {
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
    line-height: 1.4;
}

/* Right-side meta column (date/time etc.) */
.ep-list-item-meta {
    flex-shrink: 0;
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    padding-top: 4px;
    text-align: right;
    min-width: 170px;
}

/* Status column */
.ep-list-item-status {
    flex-shrink: 0;
    padding-top: 3px;
}

/* Expandable detail panel */
.ep-list-item-detail {
    background: #f8fafc;
    border-top: 1px solid #e9f0fb;
    border-bottom: 1px solid #e9f0fb;
    border-left: 3px solid #3b82f6;
    padding: 16px 20px 16px 58px;
}

/* ─── Inline icon-action button (copy, open, etc.) ─── */
.ep-icon-action {
    background: none;
    border: none;
    outline: none;
    padding: 2px 5px;
    border-radius: 5px;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}
.ep-icon-action:hover {
    background: rgba(59,130,246,.09);
    color: #3b82f6;
}

/* ─── Tag / label pill ─── */
.ep-tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    line-height: 1.6;
}

/* ─── Status pill ─── */
.ep-status-pill {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    background: rgba(59,130,246,.1);
    color: #1d4ed8;
    line-height: 1.6;
}

/* ─── Compact expand toggle (table rows) ─── */
.ep-expand {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #94a3b8;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.ep-expand:hover {
    background: rgba(59,130,246,.09);
    color: #3b82f6;
}
.ep-expand i {
    font-size: 12px;
    transition: transform .2s ease;
    pointer-events: none;
}

/* ─── Generic data table (Dispatch, Certificates, API Calls, etc.) ─── */
.ep-data-table {
    table-layout: auto;
}
.ep-data-table thead th {
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #94a3b8 !important;
    background: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-top: none !important;
    padding: 9px 14px !important;
    white-space: nowrap;
}
.ep-data-table tbody td {
    padding: 10px 14px !important;
    vertical-align: middle !important;
    border-color: #f1f5f9 !important;
}
.ep-data-table tbody tr:last-child td {
    border-bottom: none !important;
}
/* ── Override site.css .file-item inside our table ──
   site.css sets display:flex / border / padding / margin / active-blue on .file-item.
   ep-theme.css loads last so !important here wins. */
.ep-data-table .file-item {
    display: table-row !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    min-height: unset !important;
    box-shadow: none !important;
    align-items: unset !important;
    justify-content: unset !important;
    background: #fff !important;
    transition: background .15s !important;
}
.ep-data-table .file-item + .file-item {
    margin-top: 0 !important;
}
.ep-data-table .file-item:hover {
    background: #f8fafc !important;
}
/* Override the bright-blue active state from site.css */
.ep-data-table .file-item.active {
    background: #f0f7ff !important;
    margin-bottom: 0 !important;
}
.ep-data-table .file-item.active td:first-child {
    box-shadow: inset 3px 0 0 #3b82f6;
}
/* Undo site.css .file-item.active * { color: white !important } */
.ep-data-table .file-item.active td,
.ep-data-table .file-item.active td * {
    color: inherit !important;
}
/* Rotate chevron when row is open */
.ep-data-table .file-item.active .ep-expand {
    color: #3b82f6;
}
.ep-data-table .file-item.active .ep-expand i {
    transform: rotate(90deg);
}
/* Detail row */
.ep-data-table .ep-detail-row {
    display: table-row !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    box-shadow: none !important;
}
.ep-data-table .ep-detail-row:hover {
    background: none !important;
}
.ep-data-table .ep-detail-row td {
    padding: 0 !important;
    border-top: none !important;
    border-bottom: 1px solid #e9f0fb !important;
}

/* ─── Empty / no-results state ─── */
.ep-empty-state {
    text-align: center;
    padding: 52px 24px;
}
.ep-empty-state .ep-empty-icon {
    font-size: 52px;
    color: #cbd5e1;
    display: block;
    margin-bottom: 14px;
    line-height: 1;
}
.ep-empty-state p {
    color: #64748b;
    font-weight: 500;
    margin: 0;
    font-size: 15px;
}
.ep-empty-state small {
    color: #94a3b8;
    display: block;
    margin-top: 5px;
    font-size: 13px;
}
/* Dropdown menu: Bootstrap .show class handles visibility — do NOT force-hide here */

/* Main content & topbar shift */
.ep-main.ep-collapsed  { margin-left: 64px !important; }
.ep-topbar.ep-collapsed { left: 64px !important; }

/* =====================================================
   SIDEBAR COLLAPSE BUTTON — floating edge chevron (Option 1)
   To revert: delete from this comment to END COLLAPSE BTN
===================================================== */
.ep-collapse-rail {
    position: fixed !important;
    left: 246px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1040;
    width: 26px !important;
    height: 26px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #2563eb !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 2px 8px rgba(37,99,235,.35) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    outline: none !important;
    transition: left .25s cubic-bezier(.4,0,.2,1),
                background .18s, box-shadow .18s !important;
}
.ep-collapse-rail:hover {
    background: #1d4ed8 !important;
    box-shadow: 0 4px 12px rgba(37,99,235,.45) !important;
}
.ep-collapse-rail:focus { outline: none !important; }
.ep-collapse-rail i {
    font-size: 11px !important;
    color: #ffffff !important;
    transition: color .18s !important;
    pointer-events: none;
}
.ep-collapse-rail span { display: none !important; }

/* Collapsed: shift to 64px rail edge */
.ep-sidebar.ep-collapsed .ep-collapse-rail {
    left: 50px !important;
}

/* Hover-expanded: follow the full expanded edge */
.ep-sidebar.ep-collapsed.ep-hover-expanded .ep-collapse-rail {
    left: 246px !important;
}

/* END COLLAPSE BTN */

/* =====================================================
   TOPBAR HAMBURGER — mobile only (desktop uses collapse rail)
===================================================== */
.ep-menu-btn {
    background: none;
    border: none;
    padding: 7px 9px;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}
.ep-menu-btn:hover { background: #f1f5f9; color: #1e293b; }
.ep-menu-btn i              { font-size: 20px !important; transition: none !important; }
.ep-menu-btn i.bi-x-lg     { font-size: 18px !important; }

.ep-sidebar-toggle { display: none !important; }

/* Mobile overlay */
.ep-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1029;
}
.ep-sidebar-overlay.active { display: block; }

/* =====================================================
   DISPATCH — Proof Seals page
   To revert: delete from this comment to END DISPATCH
===================================================== */

.file-group.table-certificates {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 0;
}
.file-group.table-certificates .file-item + .file-item {
    margin-top: 0 !important;
}
.file-group.table-certificates .file-item.custom-sub-card {
    height: auto !important;
    min-height: 0 !important;
    padding: 12px 16px !important;
    border: 1px solid #e9eef5 !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(0,0,0,.05) !important;
    margin-bottom: 8px !important;
    transition: box-shadow .18s, border-color .18s, background .12s !important;
    cursor: default !important;
}
.file-group.table-certificates .file-item.custom-sub-card:hover {
    box-shadow: 0 4px 16px rgba(37,99,235,.1) !important;
    border-color: rgba(37,99,235,.25) !important;
    background: #fafcff !important;
}
.file-group.table-certificates .file-item.custom-sub-card.active {
    border-color: #2563eb !important;
    background: #eff6ff !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,.09) !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    margin-bottom: 0 !important;
}
.file-group.table-certificates .file-item.custom-sub-card.active,
.file-group.table-certificates .file-item.custom-sub-card.active * {
    color: inherit !important;
}
.file-group.table-certificates .evidence-receipt.material-icons,
.file-group.table-certificates .key-list-detail.material-icons {
    font-size: 22px !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: color .15s, transform .22s ease !important;
    user-select: none;
}
.file-group.table-certificates .file-item.custom-sub-card:hover .evidence-receipt,
.file-group.table-certificates .file-item.custom-sub-card:hover .key-list-detail {
    color: #2563eb !important;
}
.file-group.table-certificates .file-item.custom-sub-card.active .evidence-receipt,
.file-group.table-certificates .file-item.custom-sub-card.active .key-list-detail {
    color: #2563eb !important;
    transform: rotate(90deg) !important;
}
.file-group.table-certificates .file-item p.tx-black {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    margin-bottom: 2px !important;
    line-height: 1.4 !important;
}
.file-group.table-certificates .copy-icon {
    font-size: 14px !important;
    color: #dde3ec !important;
    cursor: pointer !important;
    transition: color .15s !important;
    vertical-align: middle !important;
}
.file-group.table-certificates .file-item:hover .copy-icon { color: #94a3b8 !important; }
.file-group.table-certificates .copy-icon:hover             { color: #2563eb !important; }
.file-group.table-certificates .file-item p.small {
    font-size: 11.5px !important;
    color: #64748b !important;
    line-height: 1.5 !important;
}
.file-group.table-certificates .col-md-3.tx-left {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
}
.file-group.table-certificates .col-md-2.tx-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
.file-group.table-certificates .col-md-2.tx-right .search-by {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(37,99,235,.1);
    color: #2563eb;
    border: 1px solid rgba(37,99,235,.15);
    white-space: nowrap;
}
.file-group.table-certificates .pill-tag {
    font-size: 10.5px !important;
    padding: 2px 9px !important;
    border-radius: 20px !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    margin-right: 3px !important;
}
.file-group.table-certificates .media {
    border-radius: 0 0 10px 10px !important;
    border: 1px solid rgba(37,99,235,.2) !important;
    border-top: none !important;
    background: linear-gradient(to right, #eff6ff, #f8fafc) !important;
    padding: 16px 20px !important;
    margin-bottom: 8px !important;
    box-shadow: 0 4px 14px rgba(37,99,235,.06) !important;
}
.dp-empty {
    text-align: center;
    padding: 56px 24px;
}
.dp-empty i     { font-size: 52px; color: #e2e8f0; display: block; margin-bottom: 14px; }
.dp-empty p     { font-size: 15px; font-weight: 500; color: #64748b; margin: 0; }
.dp-empty small { font-size: 13px; color: #94a3b8; display: block; margin-top: 5px; }

/* END DISPATCH */


/* =====================================================
   PROOF MODULE KEY ROWS
===================================================== */
.ep-key-card {
    border: 1px solid #dbeafe !important;
    border-radius: 10px !important;
    background: #fff !important;
    overflow: visible !important;
    box-shadow: 0 2px 8px rgba(37,99,235,.07) !important;
    position: relative;
    z-index: 0;
}
.ep-key-card-header {
    background: linear-gradient(90deg, #eff6ff 0%, #f8faff 100%);
    border-bottom: 1px solid #dbeafe;
    border-radius: 9px 9px 0 0;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.ep-key-num {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #2563eb;
    background: #dbeafe;
    border-radius: 5px;
    padding: 2px 9px;
    white-space: nowrap;
}
.ep-drag-handle {
    cursor: grab;
    color: #94a3b8;
    font-size: 1.15rem;
    line-height: 1;
    flex-shrink: 0;
}
.ep-drag-handle:active { cursor: grabbing; }
.ep-key-card .card-body {
    padding: 1.1rem 1.25rem 1rem !important;
}
/* Allow dropdowns to escape card overflow */
.ep-overflow-card,
.ep-overflow-card .card-body,
.ep-overflow-card .file-group,
.ep-overflow-card .table-responsive,
.ep-overflow-card .media,
.ep-overflow-card .media-content {
    overflow: visible !important;
}
.ep-switch {
    width: 2.4em !important;
    height: 1.3em !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}
.ep-switch:checked {
    background-color: #2563eb !important;
    border-color: #2563eb !important;
}

/* =====================================================
   AUDIT SCHEDULE
===================================================== */
.ep-cron-input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.ep-cron-input-group > div {
    flex: 1 1 150px;
}

/* =====================================================
   BLOCKCHAIN PREFERENCES
===================================================== */
.ep-word-break { word-break: break-word; }

.badge-status {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.25em 0.5em;
    font-size: 0.75rem;
    font-weight: 500;
    color: #fff;
    background-color: #28a745;
    border-radius: 0.25rem;
    vertical-align: middle;
}

.ep-status-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.ep-status-dot.active  { background-color: #28a745; }
.ep-status-dot.inactive { background-color: #dc3545; }


/* =====================================================
   RESPONSIVE
===================================================== */

/* Tablet and below — sidebar slides off-screen */
@media (max-width: 991.98px) {

    /* ── Sidebar: always full-width on mobile regardless of ep-collapsed ──
       ep-collapsed is a desktop-only state. On mobile the sidebar is
       either hidden (translateX(-260px)) or fully open (.open).         */
    .ep-sidebar,
    .ep-sidebar.ep-collapsed,
    .ep-sidebar.ep-collapsed.ep-hover-expanded {
        width: 260px !important;
        transform: translateX(-260px);
        transition: transform .25s ease !important;
        z-index: 1030;
    }
    .ep-sidebar.open {
        transform: translateX(0) !important;
        box-shadow: 8px 0 32px rgba(0,0,0,.22);
    }

    /* Restore all collapsed-hidden sidebar items so full sidebar shows on mobile */
    .ep-sidebar.ep-collapsed .ep-brand-logo              { display: block !important; }
    .ep-sidebar.ep-collapsed .ep-brand-icon              { display: none !important; }
    .ep-sidebar.ep-collapsed .ep-nav-section             { display: block !important; }
    .ep-sidebar.ep-collapsed .sidebar-link > span        { display: block !important; }
    .ep-sidebar.ep-collapsed .sidebar-link .si-chevron   { display: block !important; }
    .ep-sidebar.ep-collapsed .ep-submenu                 { display: block !important; }
    .ep-sidebar.ep-collapsed .sidebar-link {
        padding: 10px 20px !important;
        justify-content: flex-start !important;
        border-radius: 8px !important;
        margin: 0 !important;
        min-height: unset !important;
    }
    .ep-sidebar.ep-collapsed .sidebar-link::after        { display: none !important; }
    .ep-sidebar.ep-collapsed .ep-sidebar-footer          { padding: 12px 16px !important; }
    .ep-sidebar.ep-collapsed .ep-user-card               { justify-content: flex-start !important; width: 100% !important; }
    .ep-sidebar.ep-collapsed .ep-user-card > a           { flex-direction: row !important; padding: 10px 12px !important; gap: 10px !important; }
    .ep-sidebar.ep-collapsed .ep-user-card > a > div:not(.ep-user-avatar),
    .ep-sidebar.ep-collapsed .ep-user-card > a > i       { display: flex !important; }
    .ep-sidebar.ep-collapsed .ep-collapse-rail           { display: none !important; }

    /* ── Main & topbar: ep-collapsed margin/left must NOT apply on mobile ──
       .ep-main.ep-collapsed has 2-class specificity which beats .ep-main
       even with !important inside a media query — so we must match it.  */
    .ep-main,
    .ep-main.ep-collapsed {
        margin-left: 0 !important;
        height: 100vh;
    }
    .ep-topbar,
    .ep-topbar.ep-collapsed {
        left: 0 !important;
    }

    /* Topbar title — truncate on narrow screens so it never wraps */
    .ep-topbar-title {
        max-width: 180px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .ep-topbar-sub {
        display: none !important;
    }

    /* ── Select2: override its fixed inline width on mobile ── */
    .select2-container {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* ── Filter form Apply+Clear buttons: stay on ONE line at equal width ──
       Targets only containers that hold a Clear filters (.btn-reset-form).  */
    .d-flex.gap-2:has(.btn-reset-form) .btn {
        flex: 1 !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: nowrap !important;
        min-width: 0 !important;
    }
}

/* Small phones — tighten body padding */
@media (max-width: 575.98px) {
    .ep-body { padding: 16px !important; }
    .wallet-hero, .ep-wallet-hero { padding: 20px 18px !important; }
    .wallet-hero .row > div + div {
        border-left: none !important;
        border-top: 1px solid rgba(255,255,255,.2);
        padding-top: 12px;
        margin-top: 8px;
    }
    .ep-topbar { padding: 0 16px !important; }
    .ep-footer  { padding: 0 16px !important; }
}

/* Large screens (≥1200px) — wider sidebar spacing */
@media (min-width: 1200px) {
    .ep-body { padding: 28px 26px !important; }
}

/* =====================================================
   PAGINATION — Pill style
===================================================== */
.pagination {
    gap: 3px !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    margin-bottom: 0 !important;
}
.page-item .page-link {
    border: none !important;
    border-radius: 50% !important;
    width: 36px !important;
    height: 36px !important;
    min-width: unset !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    background-color: transparent !important;
    line-height: 1 !important;
    transition: background .15s, color .15s, box-shadow .15s !important;
}
.page-item .page-link:hover {
    background-color: #f1f5f9 !important;
    color: #1e293b !important;
    box-shadow: none !important;
}
.page-item.active .page-link {
    background: linear-gradient(135deg, #1e3a5f, #2563eb) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 10px rgba(37,99,235,.35) !important;
}
.page-item.active .page-link:hover {
    background: linear-gradient(135deg, #162d4a, #1d4ed8) !important;
    box-shadow: 0 4px 14px rgba(37,99,235,.45) !important;
}
.page-item.disabled .page-link {
    background-color: transparent !important;
    color: #cbd5e1 !important;
    cursor: not-allowed !important;
}

/* Results summary — strip the inline line-height from the tag helper */
.pagination ~ span span[style],
.paging-items-shown span,
.col-md-6.text-right span span {
    line-height: normal !important;
    font-size: 13px !important;
    color: #64748b !important;
}

/* =====================================================
   BOOTBOX / CONFIRMATION MODALS
===================================================== */
.bootbox .modal-content {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 60px rgba(15,23,42,.18) !important;
    overflow: hidden !important;
}
.bootbox .modal-header {
    background: #fff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 1rem 1.25rem !important;
    align-items: center !important;
}
.bootbox .modal-header .modal-title {
    font-size: 0.9375rem !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    line-height: 1.4 !important;
}
.bootbox .bootbox-close-button {
    font-size: 1rem !important;
    opacity: 0.45 !important;
    line-height: 1 !important;
}
.bootbox .bootbox-close-button:hover { opacity: 0.8 !important; }
.bootbox .modal-body {
    padding: 1.25rem !important;
    font-size: 0.875rem !important;
    color: #475569 !important;
    line-height: 1.6 !important;
    background: #fff !important;
}
.bootbox .modal-footer {
    background: #f8fafd !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 0.75rem 1.25rem !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 0.5rem !important;
}
.bootbox .modal-footer .btn {
    font-size: 0.8125rem !important;
    padding: 0.375rem 1rem !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    min-width: 72px !important;
}

/* =====================================================
   TEXTAREA FULLSCREEN — z-index above sidebar (1030)
===================================================== */
.tx-editor-wrapper .tx-editor.expanded {
    z-index: 1060 !important;
    border-radius: 10px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,.18) !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
}
.tx-editor-overlay {
    z-index: 1055 !important;
    background: rgba(15,23,42,.35) !important;
    backdrop-filter: blur(2px) !important;
}

/* =====================================================
   BREADCRUMBS
===================================================== */
.ep-breadcrumb-bar {
    padding: 8px 0 12px;
}
.ep-breadcrumb-bar .breadcrumb {
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 12.5px !important;
    gap: 0 !important;
}
.ep-breadcrumb-bar .breadcrumb-item a {
    color: #64748b !important;
    text-decoration: none !important;
    transition: color .15s !important;
}
.ep-breadcrumb-bar .breadcrumb-item a:hover {
    color: #2563eb !important;
}
.ep-breadcrumb-bar .breadcrumb-item.active {
    color: #0f172a !important;
    font-weight: 500 !important;
}
.ep-breadcrumb-bar .breadcrumb-item + .breadcrumb-item::before {
    content: "\f285" !important;
    font-family: "bootstrap-icons" !important;
    font-size: 10px !important;
    color: #cbd5e1 !important;
    padding: 0 6px !important;
    vertical-align: middle !important;
}

