:root {
    --ebl-bg: #f2f5fa;
    --ebl-surface: #fff;
    --ebl-text: #17263c;
    --ebl-muted: #526179;
    --ebl-primary: #2755c7;
    --ebl-primary-hover: #1b3f9d;
    --ebl-sidebar-bg: #111c30;
    --ebl-sidebar-text: #e7edf7;
    --ebl-sidebar-active: #263b62;
    --ebl-border: #dce3ee;
    --ebl-control-border: #71819a;
    --ebl-radius-control: .625rem;
    --ebl-radius-card: .75rem;
    --ebl-shadow: 0 5px 18px rgba(17, 28, 48, .055);
    --ebl-topbar-height: 3.5rem;
    --ebl-sidebar-width: 15rem;
    --ebl-sidebar-collapsed-width: 4.25rem;
}
* { box-sizing: border-box; }
html { min-width: 0; }
body.ebl-body { min-width: 0; margin: 0; color: var(--ebl-text); background: var(--ebl-bg); font-family: system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: var(--ebl-primary); }
.ebl-skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 1100; padding: .75rem 1rem; background: #fff; color: var(--ebl-primary); border-radius: .5rem; box-shadow: var(--ebl-shadow); }
.ebl-skip-link:focus { top: 1rem; }
.ebl-icon { width: 1rem; height: 1rem; flex: 0 0 1rem; fill: currentColor; }

.ebl-topbar { position: sticky; top: 0; z-index: 1030; min-height: var(--ebl-topbar-height); background: var(--ebl-sidebar-bg); color: #fff; box-shadow: 0 2px 14px rgba(8, 17, 32, .16); }
.ebl-topbar-inner { min-width: 0; min-height: var(--ebl-topbar-height); display: flex; align-items: center; gap: .5rem; padding: .35rem .75rem; }
.ebl-brand { flex: 0 0 auto; color: #fff; font-size: 1.1rem; font-weight: 750; text-decoration: none; letter-spacing: -.02em; }
.ebl-brand:hover, .ebl-brand:focus-visible { color: #fff; }
.ebl-area-name { min-width: 0; color: #bcc9dc; font-size: .9rem; }
.ebl-topbar-actions { min-width: 0; margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.ebl-deals-link { min-height: 34px; align-items: center; gap: .4rem; padding: .32rem .6rem; color: #dbe6f6; text-decoration: none; border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--ebl-radius-control); }
.ebl-deals-link:hover, .ebl-deals-link:focus-visible { color: #fff; background: rgba(255, 255, 255, .09); }
.ebl-menu-toggle, .ebl-user-menu { min-height: 34px; color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.ebl-menu-toggle { align-items: center; gap: .4rem; padding-inline: .55rem; }
.ebl-menu-toggle:hover, .ebl-menu-toggle:focus-visible, .ebl-user-menu:hover, .ebl-user-menu:focus-visible, .ebl-user-menu.show { color: #fff; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .45); }
.ebl-user-menu { max-width: 10rem; display: flex; align-items: center; gap: .4rem; padding-inline: .55rem; }
.ebl-user-menu-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ebl-user-dropdown { width: min(18rem, calc(100vw - 1.5rem)); border-color: var(--ebl-border); box-shadow: var(--ebl-shadow); }
.ebl-user-dropdown .dropdown-header { white-space: normal; overflow-wrap: anywhere; }
.ebl-user-dropdown .dropdown-item { display: flex; align-items: center; gap: .5rem; font-size: .875rem; }

.ebl-shell { min-width: 0; min-height: calc(100vh - var(--ebl-topbar-height)); }
.ebl-shell-auth { display: block; }
.ebl-sidebar { min-width: 0; background: var(--ebl-sidebar-bg); color: var(--ebl-sidebar-text); }
.ebl-sidebar-content { width: 100%; min-width: 0; display: flex; flex-direction: column; padding: .85rem .65rem; }
.ebl-sidebar-heading { display: flex; align-items: center; gap: .55rem; padding: 0 .55rem .75rem; color: #fff; font-weight: 700; }
.ebl-sidebar-heading-icon { width: 1.15rem; height: 1.15rem; flex-basis: 1.15rem; }
.ebl-sidebar-heading-copy { min-width: 0; display: grid; gap: .05rem; }
.ebl-sidebar-heading small { color: #9eb0c9; font-size: .7rem; font-weight: 500; }
.ebl-nav-group + .ebl-nav-group { margin-top: .7rem; }
.ebl-nav-label { margin: 0 0 .25rem; padding: 0 .55rem; color: #8fa2bd; font-size: .63rem; font-weight: 750; letter-spacing: .09em; }
.ebl-nav { display: grid; gap: .2rem; }
.ebl-nav-link { width: 100%; min-height: 36px; display: flex; align-items: center; gap: .6rem; color: var(--ebl-sidebar-text); text-align: left; text-decoration: none; padding: .45rem .55rem; border: 0; border-radius: .5rem; background: transparent; font-size: .875rem; }
.ebl-nav-icon { width: 1.05rem; height: 1.05rem; flex-basis: 1.05rem; }
.ebl-nav-link:hover, .ebl-nav-link:focus-visible { color: #fff; background: rgba(255, 255, 255, .09); }
.ebl-nav-link.active { color: #fff; background: var(--ebl-sidebar-active); box-shadow: inset 3px 0 0 #7fa5ff; font-weight: 700; }
.ebl-sidebar-actions { display: grid; gap: .25rem; margin-top: auto; padding-top: .85rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.ebl-sidebar-deals { min-height: 36px; display: inline-flex; align-items: center; justify-content: flex-start; gap: .6rem; padding: .4rem .55rem; color: #fff; text-decoration: none; border: 1px solid rgba(255, 255, 255, .22); border-radius: .5rem; }
.ebl-sidebar-deals:hover, .ebl-sidebar-deals:focus-visible { color: #fff; background: rgba(255, 255, 255, .09); }
.ebl-nav-button { cursor: pointer; }
.ebl-offcanvas { width: min(19rem, 88vw); color: var(--ebl-sidebar-text); background: var(--ebl-sidebar-bg); }
.ebl-offcanvas .offcanvas-header { min-height: var(--ebl-topbar-height); border-bottom: 1px solid rgba(255, 255, 255, .12); }
.ebl-offcanvas .offcanvas-title { color: #fff; font-size: 1.1rem; }
.ebl-offcanvas .offcanvas-body, .ebl-offcanvas .ebl-sidebar-content { min-height: 100%; }

.ebl-main { min-width: 0; width: 100%; max-width: 92rem; margin: 0 auto; padding: 1rem .85rem 2.25rem; }
.ebl-dashboard-main { max-width: none; }
.ebl-auth-card { width: min(100%, 30rem); margin: 1.75rem auto; padding: clamp(1rem, 3.5vw, 1.75rem); background: var(--ebl-surface); border: 1px solid var(--ebl-border); border-radius: var(--ebl-radius-card); box-shadow: var(--ebl-shadow); }
.ebl-auth-icon { width: 2.15rem; height: 2.15rem; margin-bottom: .6rem; color: var(--ebl-primary); fill: currentColor; }
.ebl-breadcrumb { margin-bottom: .6rem; font-size: .8rem; }
.ebl-breadcrumb .breadcrumb-item { min-width: 0; overflow-wrap: anywhere; }
.ebl-eyebrow, .ebl-section-kicker { margin: 0 0 .3rem; color: var(--ebl-primary); font-weight: 750; letter-spacing: .06em; text-transform: uppercase; font-size: .75rem; }
.ebl-page-heading { min-width: 0; margin-bottom: 1rem; }
.ebl-page-heading h1, .ebl-auth-card h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.7rem); font-weight: 700; letter-spacing: -.02em; }
.ebl-auth-card h1 { margin-bottom: .45rem; }
.ebl-newsletter-consent { padding: .65rem .75rem .65rem 2.15rem; border: 1px solid var(--ebl-border); border-radius: var(--ebl-radius-control); background: #f8faff; }
.ebl-newsletter-consent .form-text { margin-top: .25rem; }
.ebl-account-label { max-width: 100%; color: var(--ebl-muted); overflow-wrap: anywhere; }
.ebl-metric-card, .ebl-form-card, .ebl-content-card { min-width: 0; height: 100%; border: 1px solid var(--ebl-border); border-radius: var(--ebl-radius-card); box-shadow: var(--ebl-shadow); }
.ebl-metric-card .card-body, .ebl-form-card .card-body, .ebl-content-card .card-body { min-width: 0; }
.ebl-metric-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; color: var(--ebl-muted); }
.ebl-metric-heading .ebl-icon { color: var(--ebl-primary); }
.ebl-metric-card h2 { margin: 0; color: var(--ebl-muted); font-size: .78rem; font-weight: 650; }
.ebl-metric-card p { margin: .25rem 0 0; font-size: clamp(1.25rem, 4vw, 1.65rem); font-weight: 750; letter-spacing: -.025em; }
.ebl-metric-card small { display: block; margin-top: .25rem; color: var(--ebl-muted); font-size: .75rem; }
.ebl-form-card h2, .ebl-content-card h2 { margin: 0 0 .6rem; font-size: 1.05rem; }
.ebl-section-heading { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem; margin-bottom: .75rem; }
.ebl-section-heading h2 { margin-bottom: 0; }
.ebl-count { flex: 0 0 auto; min-width: 1.85rem; min-height: 1.85rem; display: inline-grid; place-items: center; padding: .15rem .45rem; color: var(--ebl-primary-hover); background: #e9effd; border-radius: 999px; font-size: .8rem; font-weight: 750; }
.ebl-inline-link { display: inline-flex; min-height: 34px; align-items: center; margin-left: .6rem; font-size: .875rem; }
.ebl-btn-primary { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; color: #fff; background: var(--ebl-primary); border-color: var(--ebl-primary); }
.ebl-btn-primary:hover, .ebl-btn-primary:focus-visible { color: #fff; background: var(--ebl-primary-hover); border-color: var(--ebl-primary-hover); }
.btn-outline-primary { --bs-btn-color: var(--ebl-primary); --bs-btn-border-color: var(--ebl-primary); --bs-btn-hover-bg: var(--ebl-primary); --bs-btn-hover-border-color: var(--ebl-primary); --bs-btn-active-bg: var(--ebl-primary-hover); --bs-btn-active-border-color: var(--ebl-primary-hover); min-height: 34px; display: inline-flex; align-items: center; gap: .4rem; }
.form-control, .form-select { border-color: var(--ebl-control-border); border-radius: var(--ebl-radius-control); }
.form-control-sm, .form-select-sm, .input-group-sm > .form-control, .input-group-sm > .form-select { min-height: 2.125rem; }
.form-label { margin-bottom: .25rem; font-size: .875rem; font-weight: 600; }
.form-text { font-size: .78rem; }
.alert { padding: .65rem .8rem; font-size: .875rem; }
.ebl-empty, .ebl-note { min-width: 0; padding: .75rem .9rem; border: 1px solid var(--ebl-border); border-radius: .65rem; background: var(--ebl-surface); font-size: .875rem; }
.ebl-note { color: #384860; background: #f8faff; }
.ebl-table-wrap { max-width: 100%; border: 1px solid var(--ebl-border); border-radius: .75rem; background: #fff; }
.ebl-table-wrap .table { min-width: 44rem; margin-bottom: 0; font-size: .9375rem; }
.ebl-table-wrap .table > :not(caption) > * > * { padding: .42rem .55rem; }
.ebl-table-wrap thead th { color: #42516a; background: #f7f9fc; border-bottom-color: var(--ebl-border); font-size: .76rem; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.ebl-status { display: inline-flex; align-items: center; min-height: 1.5rem; padding: .15rem .45rem; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.ebl-status-info { color: #17458f; background: #e6efff; }
.ebl-status-warning { color: #7a4b00; background: #fff1cc; }
.ebl-status-success { color: #12633d; background: #dff4e8; }
.ebl-status-danger { color: #8d2119; background: #fde5e3; }
.ebl-status-secondary { color: #46556d; background: #e9edf3; }
.ebl-newsletter-card { position: relative; overflow: hidden; }
.ebl-newsletter-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: .25rem; background: var(--ebl-border); }
.ebl-newsletter-card-danger { background: #fffafa; border-color: #efc4c0; }
.ebl-newsletter-card-danger::before { background: #b42318; }
.ebl-newsletter-card-warning { background: #fffdf5; border-color: #ead49a; }
.ebl-newsletter-card-warning::before { background: #b77900; }
.ebl-newsletter-card-success { background: #f8fdf9; border-color: #b9ddc9; }
.ebl-newsletter-card-success::before { background: #146c43; }
.ebl-newsletter-card .ebl-section-heading > .ebl-icon { width: 1.25rem; height: 1.25rem; flex-basis: 1.25rem; }
.ebl-newsletter-card-danger .ebl-section-heading > .ebl-icon { color: #b42318; }
.ebl-newsletter-card-warning .ebl-section-heading > .ebl-icon { color: #8a5a00; }
.ebl-newsletter-card-success .ebl-section-heading > .ebl-icon { color: #146c43; }
.ebl-newsletter-card .btn { display: inline-flex; align-items: center; gap: .4rem; }
#newsletter-history-modal .modal-content { border-color: var(--ebl-border); border-radius: var(--ebl-radius-card); }
#newsletter-history-modal .modal-header { padding: .75rem 1rem; }
#newsletter-history-modal .modal-body { padding: 1rem; }
#newsletter-history-modal .ebl-table-wrap .table { min-width: 38rem; }
.pagination-sm { --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(39, 85, 199, .25); }
.ebl-security-list dt, .ebl-security-list dd { padding-block: .4rem; border-bottom: 1px solid var(--ebl-border); font-size: .875rem; }
.ebl-security-list dt:last-of-type, .ebl-security-list dd:last-child { border-bottom: 0; }
.ebl-swal-popup { border-radius: var(--ebl-radius-card); padding: 1rem; }
.ebl-swal-title { padding-top: .25rem; font-size: 1.2rem; }
.ebl-swal-html { margin: .5rem 1rem 0; font-size: .9rem; }
.ebl-swal-actions { gap: .5rem; margin-top: 1rem; }
:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }

@media (max-width: 359.98px) {
    .ebl-topbar-inner { gap: .5rem; padding-inline: .5rem; }
    .ebl-menu-toggle { padding-inline: .5rem; }
    .ebl-menu-toggle > span:last-child { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
    .ebl-user-menu { max-width: 7.5rem; padding-inline: .55rem; }
    .ebl-main { padding-inline: .75rem; }
    .ebl-inline-link { margin-left: 0; }
}
@media (min-width: 768px) {
    .ebl-topbar-inner { padding-inline: 1.25rem; }
}
@media (min-width: 992px) {
    .ebl-sidebar { position: fixed; top: var(--ebl-topbar-height); bottom: 0; left: 0; z-index: 1020; width: var(--ebl-sidebar-width); overflow-y: auto; }
    .ebl-sidebar-content { min-height: 100%; }
    .ebl-dashboard-main { margin-left: var(--ebl-sidebar-width); width: calc(100% - var(--ebl-sidebar-width)); transition: margin-left .18s ease, width .18s ease; }
    .ebl-main { padding: 1.25rem clamp(1.25rem, 2.5vw, 2.25rem) 2.5rem; }
    .ebl-user-menu { max-width: 14rem; }
    .ebl-sidebar-collapsed .ebl-sidebar { width: var(--ebl-sidebar-collapsed-width); }
    .ebl-sidebar-collapsed .ebl-dashboard-main { margin-left: var(--ebl-sidebar-collapsed-width); width: calc(100% - var(--ebl-sidebar-collapsed-width)); }
    .ebl-sidebar-collapsed .ebl-sidebar-content { padding-inline: .45rem; }
    .ebl-sidebar-collapsed .ebl-sidebar .ebl-nav-label,
    .ebl-sidebar-collapsed .ebl-sidebar .ebl-nav-text { display: none; }
    .ebl-sidebar-collapsed .ebl-sidebar .ebl-nav-group + .ebl-nav-group { margin-top: .35rem; }
    .ebl-sidebar-collapsed .ebl-sidebar .ebl-nav-link,
    .ebl-sidebar-collapsed .ebl-sidebar .ebl-sidebar-deals { justify-content: center; gap: 0; padding-inline: .35rem; }
    .ebl-sidebar-collapsed .ebl-sidebar-actions { padding-top: .55rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
