/* ==========================================================================
   Database app (pages/database/app.php, assets/js/db-app.js): full-screen search for People, Companies
   and Influencers. Colors come from the site's theme variables, so light and dark both work.
   ========================================================================== */
.page-dbx { overflow: hidden; background: var(--bg-soft); }
.dbx {
  --dbx-top: 60px; --dbx-rail: 92px; --dbx-filters: 312px; --dbx-drawer: 500px;
  --dbx-row: 54px; --dbx-radius: 10px; --dbx-hover: color-mix(in srgb, var(--heading) 4%, transparent);
  position: fixed; inset: 0; display: grid;
  grid-template-columns: var(--dbx-rail) var(--dbx-filters) minmax(0, 1fr);
  grid-template-rows: var(--dbx-top) minmax(0, 1fr);
  color: var(--text); font-size: .9rem;
}
.dbx .icon { width: 17px; height: 17px; flex: none; }
:where(.dbx) button, :where(.dbx) input, :where(.dbx) select { font: inherit; color: inherit; }
.dbx :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Buttons and small controls */
.dbx-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--heading); font-weight: 600; font-size: .86rem; text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color .15s, background-color .15s; }
.dbx-btn:hover { border-color: var(--heading); }
.dbx-btn--primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.dbx-btn--primary:hover { border-color: #d9480f; background: #d9480f; color: #fff; }
.dbx-btn--sm { height: 30px; padding: 0 10px; font-size: .82rem; }
.dbx-btn b { padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .74rem; }
.dbx-icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--heading); cursor: pointer; text-decoration: none; }
.dbx-icon-btn:hover { border-color: var(--line); background: var(--surface-2); }
.dbx-icon-btn:disabled { opacity: .35; cursor: default; }
.dbx-link { padding: 0; border: 0; background: none; color: var(--accent-text); font-weight: 650; font-size: .82rem; cursor: pointer; }
.dbx-link:hover { text-decoration: underline; }
.dbx-note { margin: 0; color: var(--muted); font-size: .78rem; }

/* Top bar */
.dbx-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 16px 0 12px; border-bottom: 1px solid var(--line); background: var(--surface); z-index: 30; }
.dbx-brand { display: inline-flex; align-items: center; gap: 9px; min-width: calc(var(--dbx-rail) + var(--dbx-filters) - 28px); color: var(--heading); font-size: 1.1rem; font-weight: 750; text-decoration: none; }
.dbx-brand b { color: var(--accent); font-weight: 750; }
.dbx-search { position: relative; flex: 1; max-width: 640px; display: flex; align-items: center; }
.dbx-search > .icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.dbx-search input { width: 100%; height: 38px; padding: 0 40px 0 38px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg-soft); }
.dbx-search input:focus { outline: 0; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.dbx-search kbd { position: absolute; right: 10px; padding: 1px 7px; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); font: 600 .72rem var(--font); }
.dbx-search input:focus + kbd, .dbx-search input:not(:placeholder-shown) + kbd { display: none; }
.dbx-top__tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.dbx-top__link { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 9px; color: var(--heading); font-weight: 600; font-size: .86rem; text-decoration: none; }
.dbx-top__link:hover { background: var(--surface-2); }
.dbx-credits { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--heading); font-weight: 650; font-size: .82rem; text-decoration: none; }
.dbx-credits .icon { color: var(--accent); width: 15px; height: 15px; }
.dbx-me span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--grad-accent, var(--accent)); color: #04133F; font-weight: 800; }
.dbx .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .dbx .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .dbx .theme-toggle .icon-moon { display: none; }

/* Filters panel */
.dbx-filters { grid-row: 2; display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--surface); }
.dbx-filters__head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.dbx-filters__head h2 { flex: 1; display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1rem; }
.dbx-filters__head h2 b, [data-dbx-fcount2] { padding: 1px 8px; border-radius: 99px; background: var(--accent); color: #fff; font-size: .74rem; }
.dbx-filters__close { display: none; }
.dbx-filters__find { position: relative; margin: 0 12px 8px; }
.dbx-filters__find .icon { position: absolute; left: 10px; top: 9px; width: 15px; height: 15px; color: var(--muted); }
.dbx-filters__find input { width: 100%; height: 34px; padding: 0 10px 0 32px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-soft); font-size: .85rem; }
.dbx-filters__list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 6px 24px 0; }
.dbx-fgroup { padding: 10px 16px 4px; color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.dbx-f { border-top: 1px solid var(--line); }
.dbx-f[hidden] { display: none; }
.dbx-f__head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 11px 16px; border: 0; background: none; color: var(--heading); font-weight: 600; font-size: .88rem; text-align: left; cursor: pointer; }
.dbx-f__head:hover { background: var(--dbx-hover); }
.dbx-f__head > span { flex: 1; min-width: 0; }
.dbx-f__head .icon { width: 15px; height: 15px; color: var(--muted); transition: transform .15s; }
.dbx-f.is-open .dbx-f__head .icon { transform: rotate(180deg); }
.dbx-f__badge { padding: 0 7px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); font-size: .74rem; font-weight: 750; }
.dbx-f.is-on > .dbx-f__head > span::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 7px 2px 0; border-radius: 50%; background: var(--accent); }
.dbx-f__body { display: grid; gap: 8px; padding: 2px 16px 14px; }
.dbx-f:not(.is-open) .dbx-f__body { display: none; }
.dbx-input { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font-size: .86rem; }
.dbx-input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dbx-opts { display: grid; gap: 1px; max-height: 260px; overflow-y: auto; margin: 0 -6px; padding-right: 12px; }
.dbx-opt { display: flex; align-items: center; gap: 9px; padding: 5px 6px; border-radius: 7px; cursor: pointer; font-size: .86rem; }
.dbx-opt:hover { background: var(--dbx-hover); }
.dbx-opt input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.dbx-opt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbx-opt small { color: var(--muted); font-size: .76rem; font-variant-numeric: tabular-nums; }
.dbx-opt.is-zero { opacity: .5; }
.dbx-seg { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-soft); }
.dbx-seg button { padding: 3px 10px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: .78rem; font-weight: 650; cursor: pointer; }
.dbx-seg button[aria-pressed="true"] { background: var(--surface); color: var(--heading); box-shadow: var(--shadow-sm); }
.dbx-range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; color: var(--muted); }
.dbx-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.dbx-tag { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 4px 3px 9px; border-radius: 7px; background: var(--navy-soft); color: var(--heading); font-size: .8rem; font-weight: 600; }
.dbx-tag--ex { background: color-mix(in srgb, #dc2626 12%, transparent); color: #b91c1c; text-decoration: line-through; }
:root[data-theme="dark"] .dbx-tag--ex { color: #fca5a5; }
.dbx-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dbx-tag button { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 5px; background: none; color: inherit; cursor: pointer; opacity: .7; }
.dbx-tag button:hover { opacity: 1; background: rgba(0, 0, 0, .06); }
.dbx-tag .icon { width: 12px; height: 12px; }
.dbx-suggest { display: grid; margin: -4px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: 0 10px 30px -12px rgba(3, 15, 54, .25); }
.dbx-suggest button { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border: 0; border-radius: 6px; background: none; font-size: .84rem; text-align: left; cursor: pointer; }
.dbx-suggest button:hover, .dbx-suggest button.is-hl { background: var(--dbx-hover); }
.dbx-suggest small { color: var(--muted); }
.dbx-more { justify-self: start; }

/* Main column */
.dbx-main { grid-row: 2; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); }
.dbx-main:focus { outline: 0; }
.dbx-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.dbx-bar__title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dbx-bar__title h1 { margin: 0; font-size: 1.25rem; letter-spacing: -.01em; }
.dbx-total { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.dbx-total b { color: var(--heading); }
.dbx-sample { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; background: #FEF3C7; color: #92400E; font-size: .74rem; font-weight: 700; }
.dbx-sample .icon { width: 13px; height: 13px; }
:root[data-theme="dark"] .dbx-sample { background: rgba(251, 191, 36, .15); color: #FCD34D; }
.dbx-filters__open { display: none; }
.dbx-bar__actions { display: flex; align-items: center; gap: 8px; }
.dbx-sort { position: relative; display: inline-flex; align-items: center; }
.dbx-sort .icon { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.dbx-sort select { height: 34px; padding: 0 30px 0 32px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); color: var(--heading); font-weight: 600; font-size: .86rem; cursor: pointer; }
.dbx-menu { position: relative; }
.dbx-menu__panel { position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; width: 300px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 18px 48px -16px rgba(3, 15, 54, .35); }
.dbx-menu__panel--cols { width: 320px; max-height: min(70vh, 560px); overflow-y: auto; }
.dbx-menu__panel h3 { margin: 10px 4px 4px; color: var(--muted); font-size: .72rem; font-weight: 700; }
.dbx-menu__panel h3:first-child { margin-top: 0; }
.dbx-menu__row { display: flex; justify-content: space-between; gap: 8px; padding: 2px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.dbx-exp { display: grid; gap: 4px; }
.dbx-exp a, .dbx-exp button { display: grid; gap: 1px; padding: 9px 10px; border: 0; border-radius: 9px; background: none; color: var(--heading); font-weight: 650; font-size: .88rem; text-align: left; text-decoration: none; cursor: pointer; }
.dbx-exp a:hover, .dbx-exp button:hover { background: var(--dbx-hover); }
.dbx-exp small { color: var(--muted); font-weight: 500; font-size: .78rem; }
.dbx-exp .is-off { opacity: .45; pointer-events: none; }
.dbx-save { display: grid; gap: 8px; }
.dbx-save label { font-weight: 650; font-size: .86rem; color: var(--heading); }
.dbx-save input { height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }

/* Active filter chips and selection bar */
.dbx-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 9px 18px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.dbx-chips[hidden], .dbx-selbar[hidden] { display: none; }
.dbx-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 320px; padding: 3px 4px 3px 10px; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface); font-size: .8rem; }
.dbx-chip b { color: var(--muted); font-weight: 600; }
.dbx-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--heading); font-weight: 650; }
.dbx-chip button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; }
.dbx-chip button:hover { background: var(--surface-2); color: var(--heading); }
.dbx-chip .icon { width: 12px; height: 12px; }
.dbx-selbar { display: flex; align-items: center; gap: 14px; padding: 8px 18px; border-bottom: 1px solid var(--line); background: var(--accent-soft); font-weight: 650; font-size: .86rem; color: var(--heading); }
.dbx-selbar .dbx-btn { margin-left: auto; }

/* Results table */
.dbx-table-wrap { position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.dbx-table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.dbx-table th, .dbx-table td { height: var(--dbx-row); padding: 0 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; vertical-align: middle; }
.dbx-table thead th { position: sticky; top: 0; z-index: 3; height: 40px; background: var(--surface); color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .02em; }
.dbx-table thead th button { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; cursor: pointer; }
.dbx-table thead th button:hover, .dbx-table thead th.is-sorted { color: var(--heading); }
.dbx-table thead th .icon { width: 13px; height: 13px; }
.dbx-table tbody tr { cursor: pointer; transition: background-color .1s; }
.dbx-table tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, var(--surface)); }
.dbx-table tbody tr.is-open td { background: var(--accent-soft); }
.dbx-table tbody tr.is-sel td { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.dbx-table td { background: var(--surface); max-width: 280px; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.dbx-table .c-sel { position: sticky; left: 0; z-index: 2; width: 44px; padding: 0 0 0 16px; }
.dbx-table .c-sel input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.dbx-table .c-name { position: sticky; left: 44px; z-index: 2; min-width: 220px; max-width: 300px; box-shadow: inset -1px 0 0 var(--line); }
.dbx-table thead .c-sel, .dbx-table thead .c-name { z-index: 4; }
.dbx-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dbx-name__av { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy-soft); color: var(--heading); font-size: .74rem; font-weight: 800; }
.dbx-name__av--co { border-radius: 8px; }
.dbx-name__txt { display: grid; min-width: 0; line-height: 1.25; }
.dbx-name__line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.dbx-name__line .icon { width: 14px; height: 14px; color: #1d9bf0; }
.dbx-name__txt a { overflow: hidden; white-space: nowrap; color: var(--heading); font-weight: 650; text-overflow: ellipsis; text-decoration: none; }
.dbx-name__txt a:hover { color: var(--accent-text); text-decoration: underline; }
.dbx-name__txt small { overflow: hidden; color: var(--muted); font-size: .76rem; text-overflow: ellipsis; }
.dbx-rel { color: var(--heading); font-weight: 600; text-decoration: none; }
.dbx-rel:hover { color: var(--accent-text); text-decoration: underline; }
.dbx-lock { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--heading); font-weight: 650; font-size: .8rem; text-decoration: none; }
.dbx-lock:hover { border-color: var(--accent); color: var(--accent-text); }
.dbx-lock .icon { width: 14px; height: 14px; }
.dbx-mail { display: inline-flex; align-items: center; gap: 6px; }
.dbx-mail a { color: var(--text); text-decoration: none; }
.dbx-mail a:hover { color: var(--accent-text); text-decoration: underline; }
.dbx-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.dbx-dot--valid { background: #16a34a; }
.dbx-dot--catch_all, .dbx-dot--risky { background: #f59e0b; }
.dbx-dot--invalid { background: #dc2626; }
.dbx-pill { display: inline-block; padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--heading); font-size: .76rem; font-weight: 650; }
.dbx-pill--valid, .dbx-pill--active, .dbx-pill--operational { background: rgba(22, 163, 74, .12); color: #15803d; }
.dbx-pill--catch_all, .dbx-pill--risky, .dbx-pill--slowing, .dbx-pill--temporarily_closed { background: rgba(245, 158, 11, .15); color: #b45309; }
.dbx-pill--invalid, .dbx-pill--inactive, .dbx-pill--permanently_closed { background: rgba(220, 38, 38, .12); color: #b91c1c; }
:root[data-theme="dark"] .dbx-pill--valid, :root[data-theme="dark"] .dbx-pill--active, :root[data-theme="dark"] .dbx-pill--operational { color: #4ade80; }
:root[data-theme="dark"] .dbx-pill--catch_all, :root[data-theme="dark"] .dbx-pill--risky, :root[data-theme="dark"] .dbx-pill--slowing, :root[data-theme="dark"] .dbx-pill--temporarily_closed { color: #fbbf24; }
:root[data-theme="dark"] .dbx-pill--invalid, :root[data-theme="dark"] .dbx-pill--inactive, :root[data-theme="dark"] .dbx-pill--permanently_closed { color: #f87171; }
.dbx-yes, .dbx-no { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.dbx-yes { color: #15803d; }
.dbx-no { color: var(--muted); }
:root[data-theme="dark"] .dbx-yes { color: #4ade80; }
.dbx-yes .icon, .dbx-no .icon { width: 14px; height: 14px; }
.dbx-ico-link { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; color: var(--heading); }
.dbx-ico-link:hover { background: var(--surface-2); color: var(--accent-text); }
.dbx-ico-link .icon { width: 16px; height: 16px; }
.dbx-stars { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; }
.dbx-stars .icon { width: 14px; height: 14px; color: #f59e0b; fill: #f59e0b; }
.dbx-num { font-variant-numeric: tabular-nums; }
.dbx-mini { display: inline-block; margin-right: 4px; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); font-size: .76rem; }
.dbx-muted { color: var(--muted); }
.dbx-table.is-loading tbody { opacity: .5; transition: opacity .15s; }
.dbx-skel td::after { content: ""; display: block; height: 10px; border-radius: 6px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: dbx-sh 1.2s infinite linear; }
@keyframes dbx-sh { to { background-position: -200% 0; } }
.dbx-empty { display: grid; justify-items: center; gap: 8px; padding: 70px 24px; text-align: center; }
.dbx-empty[hidden] { display: none; }
.dbx-empty h2 { margin: 6px 0 0; font-size: 1.1rem; }
.dbx-empty p { margin: 0 0 8px; color: var(--muted); }
.dbx-empty__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--navy-soft); color: var(--heading); }
.dbx-empty__icon .icon { width: 24px; height: 24px; }

/* Pager */
.dbx-pager { display: flex; align-items: center; gap: 18px; padding: 8px 18px; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .84rem; }
.dbx-pager select { height: 30px; margin-left: 6px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); }
.dbx-pager__range { font-variant-numeric: tabular-nums; }
.dbx-pager__nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.dbx-pager__nav input { width: 58px; height: 30px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--surface); text-align: center; }

/* Record panel */
.dbx-drawer { position: fixed; top: var(--dbx-top); right: 0; bottom: 0; z-index: 35; display: flex; flex-direction: column; width: min(var(--dbx-drawer), 100vw); border-left: 1px solid var(--line); background: var(--surface); box-shadow: -24px 0 48px -24px rgba(3, 15, 54, .3); }
.dbx-drawer[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .dbx-drawer:not([hidden]) { animation: dbx-in .18s var(--ease, ease-out); } }
@keyframes dbx-in { from { transform: translateX(24px); opacity: 0; } }
.dbx-drawer__head { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.dbx-drawer__crumb { flex: 1; min-width: 0; padding-left: 6px; overflow: hidden; color: var(--muted); font-size: .8rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.dbx-drawer__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 40px; }
.dbx-rec__top { display: flex; gap: 14px; align-items: flex-start; }
.dbx-rec__av { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--grad-navy, #051C5E); color: #fff; font-size: 1.1rem; font-weight: 800; }
.dbx-rec__av--co { border-radius: 14px; }
.dbx-rec h2 { margin: 0; font-size: 1.2rem; line-height: 1.25; }
.dbx-rec__sub { margin: 3px 0 0; color: var(--muted); font-size: .88rem; }
.dbx-rec__sub a { color: var(--heading); font-weight: 650; }
.dbx-rec__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dbx-rec__quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 4px; }
.dbx-rec__unlock { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--heading); font-size: .86rem; }
.dbx-rec__unlock .dbx-btn { margin-left: auto; }
.dbx-sec { margin-top: 18px; }
.dbx-sec h3 { margin: 0 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--heading); font-size: .82rem; font-weight: 750; }
.dbx-kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0 12px; margin: 0; }
.dbx-kv dt { padding: 6px 0; color: var(--muted); font-size: .82rem; }
.dbx-kv dd { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; padding: 6px 0; overflow-wrap: anywhere; font-size: .86rem; color: var(--text); }
.dbx-kv dd a { color: var(--heading); font-weight: 600; overflow-wrap: anywhere; }
.dbx-copy { display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; opacity: 0; }
.dbx-kv dd:hover .dbx-copy, .dbx-copy:focus-visible { opacity: 1; }
.dbx-copy:hover { background: var(--surface-2); color: var(--heading); }
.dbx-copy .icon { width: 13px; height: 13px; }
.dbx-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; }
.dbx-card:hover { border-color: var(--accent); }
.dbx-card + .dbx-card { margin-top: 6px; }
.dbx-card b { display: block; color: var(--heading); }
.dbx-card small { color: var(--muted); }
.dbx-plist { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.dbx-plist a { display: flex; justify-content: space-between; gap: 10px; padding: 7px 8px; border-radius: 8px; color: var(--heading); font-weight: 600; text-decoration: none; }
.dbx-plist a:hover { background: var(--dbx-hover); }
.dbx-plist small { color: var(--muted); font-weight: 500; text-align: right; }

.dbx-scrim { position: fixed; inset: 0; z-index: 33; background: rgba(3, 15, 54, .35); }
.dbx-scrim[hidden] { display: none; }
.dbx-toast { position: fixed; left: 50%; bottom: 64px; z-index: 60; transform: translateX(-50%); padding: 9px 16px; border-radius: 10px; background: #051C5E; color: #fff; font-weight: 600; font-size: .86rem; box-shadow: 0 12px 30px -10px rgba(3, 15, 54, .5); }
.dbx-toast[hidden] { display: none; }

/* The site assistant button sits above the pager */
.page-dbx .ast { bottom: 62px; }

/* Smaller screens: filters slide in, the rail becomes a bar at the bottom */
@media (max-width: 1100px) {
  .dbx { grid-template-columns: var(--dbx-rail) minmax(0, 1fr); }
  .dbx-brand { min-width: 0; }
  .dbx-filters { position: fixed; top: var(--dbx-top); bottom: 0; left: var(--dbx-rail); z-index: 36; width: min(340px, 88vw); box-shadow: 24px 0 48px -24px rgba(3, 15, 54, .35); transform: translateX(-110%); visibility: hidden; transition: transform .2s, visibility .2s; }
  .dbx.filters-open .dbx-filters { transform: none; visibility: visible; }
  .dbx-filters__close, .dbx-filters__open { display: inline-flex; }
  .dbx-main { grid-column: 2; }
}
@media (max-width: 720px) {
  .dbx { --dbx-rail: 0px; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--dbx-top) minmax(0, 1fr) 60px; }
  .dbx-rail { grid-row: 3; grid-column: 1; flex-direction: row; justify-content: space-around; padding: 4px 6px; overflow-x: auto; }
  .dbx-rail__label { display: none; }
  .dbx-rail__link { flex: 1 0 auto; min-width: 58px; padding: 4px 2px; }
  .dbx-rail__ico { width: 34px; height: 30px; }
  .dbx-main { grid-column: 1; }
  .dbx-filters { left: 0; bottom: 60px; }
  .dbx-brand span, .dbx-top__link span, .dbx-credits span, .dbx-search kbd { display: none; }
  .dbx-top { gap: 8px; }
  .dbx-top .dbx-btn--primary { display: none; }
  .dbx-bar { padding: 10px 12px; }
  .dbx-bar__actions { width: 100%; overflow-x: auto; }
  .dbx-sample { display: none; }
  .dbx-table .c-name { min-width: 170px; }
  .dbx-pager { gap: 10px; padding: 6px 12px; }
  .dbx-pager__per { display: none; }
  .dbx-drawer { top: 0; bottom: 0; z-index: 50; }
  .dbx-kv { grid-template-columns: 120px minmax(0, 1fr); }
  .dbx-fly { left: 8px; right: 8px; top: auto !important; bottom: 68px; width: auto; }
  .page-dbx .ast { bottom: 124px; }
  .dbx-top__signin span { display: inline; }
}


/* ==========================================================================
   Navigation rail, flyouts, quick filters, export & send (v2)
   ========================================================================== */
.dbx-rail { grid-row: 2; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 10px 8px 14px; overflow-y: auto;
  background: linear-gradient(180deg, #051C5E 0%, #04154A 100%); box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06); }
:root[data-theme="dark"] .dbx-rail { background: linear-gradient(180deg, #071233 0%, #050d27 100%); }
.dbx-rail__label { margin: 12px 0 4px; color: rgba(255, 255, 255, .42); font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-align: center; }
.dbx-rail__label:first-child { margin-top: 2px; }
.dbx .dbx-rail__link { display: grid; justify-items: center; gap: 5px; padding: 7px 2px 8px; border: 0; border-radius: 12px; background: none; color: rgba(255, 255, 255, .74);
  font-size: .72rem; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; transition: color .15s, background-color .15s; }
.dbx-rail__ico { display: grid; place-items: center; width: 42px; height: 36px; border-radius: 11px; transition: background-color .15s, transform .15s, box-shadow .15s; }
.dbx-rail__ico .icon { width: 20px; height: 20px; }
.dbx .dbx-rail__link:hover { color: #fff; }
.dbx .dbx-rail__link:hover .dbx-rail__ico { background: rgba(255, 255, 255, .09); }
.dbx .dbx-rail__link.is-active { color: #fff; }
.dbx .dbx-rail__link.is-active .dbx-rail__ico { background: linear-gradient(135deg, #FF8A4C, #F86219); color: #fff; box-shadow: 0 8px 18px -8px rgba(248, 98, 25, .9); }
.dbx-rail__txt { line-height: 1.1; }

/* Flyouts beside the rail (Saved, Exports) */
.dbx-fly { position: fixed; top: 72px; left: calc(var(--dbx-rail) + 10px); z-index: 45; display: flex; flex-direction: column; width: 380px; max-height: min(560px, calc(100vh - 90px));
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 28px 70px -24px rgba(3, 15, 54, .45); }
.dbx-fly[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .dbx-fly:not([hidden]) { animation: dbx-fly .16s ease-out; } }
@keyframes dbx-fly { from { opacity: 0; transform: translateX(-8px); } }
.dbx-fly__head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 12px 16px; border-bottom: 1px solid var(--line); }
.dbx-fly__head h2 { flex: 1; margin: 0; font-size: 1rem; }
.dbx-fly__ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.dbx-fly__list { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 8px; list-style: none; }
.dbx-fly__list li { display: flex; align-items: center; gap: 4px; }
.dbx-fly__item { flex: 1; display: flex; align-items: center; gap: 11px; min-width: 0; padding: 9px 8px; border-radius: 11px; color: var(--heading); text-decoration: none; }
a.dbx-fly__item:hover, .dbx-fly__list li:hover .dbx-fly__item { background: var(--dbx-hover); }
.dbx-fly__ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--navy-soft); color: var(--heading); }
.dbx-fly__ic--sheets { background: rgba(22, 163, 74, .12); color: #15803d; }
.dbx-fly__ic--email { background: rgba(37, 99, 235, .12); color: #1d4ed8; }
.dbx-fly__ic--whatsapp { background: rgba(37, 211, 102, .14); color: #128c4b; }
.dbx-fly__ic--csv { background: var(--accent-soft); color: var(--accent-text); }
.dbx-fly__txt { flex: 1; display: grid; min-width: 0; line-height: 1.3; }
.dbx-fly__txt b { overflow: hidden; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.dbx-fly__txt small { overflow: hidden; color: var(--muted); font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.dbx-fly__empty { display: flex; gap: 10px; padding: 18px 12px; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.dbx-fly__empty .icon { flex: none; margin-top: 2px; }
.dbx-fly__all { justify-content: center; margin: 4px 12px 12px; }

/* Filters panel: cleaner groups, active rows marked */
.dbx-filters { background: var(--surface); }
.dbx-filters__head { padding: 16px 16px 10px; }
.dbx-filters__find input { height: 38px; border-radius: 10px; }
.dbx-filters__find .icon { top: 11px; }
.dbx-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 12px 12px; border-bottom: 1px solid var(--line); }
.dbx-qf { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px 0 8px; border: 1px dashed var(--line-strong); border-radius: 99px; background: var(--surface); color: var(--heading); font-size: .78rem; font-weight: 650; cursor: pointer; transition: all .15s; }
.dbx-qf .icon { width: 13px; height: 13px; color: var(--muted); }
.dbx-qf:hover { border-color: var(--accent); color: var(--accent-text); }
.dbx-qf.is-on { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.dbx-qf.is-on .icon { color: var(--accent-text); }
.dbx-fgroup { display: flex; align-items: center; gap: 8px; padding: 16px 16px 6px; color: var(--muted); font-size: .7rem; font-weight: 750; letter-spacing: .05em; }
.dbx-fgroup::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.dbx-fgroup[hidden] { display: none; }
.dbx-f { margin: 0 8px; border: 0; border-radius: 10px; }
.dbx-f__head { padding: 10px 10px 10px 12px; border-radius: 10px; font-size: .87rem; font-weight: 600; }
.dbx-f.is-open { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.dbx-f.is-open .dbx-f__head { font-weight: 700; }
.dbx-f.is-on > .dbx-f__head { color: var(--accent-text); }
.dbx-f__body { padding: 0 12px 12px; }

/* Toolbar */
.dbx-bar { padding: 14px 20px; }
.dbx-bar__title h1 { font-size: 1.35rem; }
.dbx-caret { width: 14px !important; height: 14px !important; opacity: .8; }
.dbx-chips { padding: 10px 20px; }

/* Table: roomier rows, softer header, colored avatars */
.dbx-table { font-size: .875rem; }
.dbx-table th, .dbx-table td { padding: 0 16px; }
.dbx-table thead th { height: 44px; background: var(--bg-soft); color: var(--muted); font-size: .78rem; font-weight: 650; letter-spacing: 0; border-bottom: 1px solid var(--line); }
.dbx-table-wrap.is-scrolled-y thead th { box-shadow: 0 6px 12px -10px rgba(3, 15, 54, .35); }
.dbx-table-wrap.is-scrolled-x .c-name { box-shadow: inset -1px 0 0 var(--line), 8px 0 12px -10px rgba(3, 15, 54, .35); }
.dbx-table thead .c-sel, .dbx-table thead .c-name { background: var(--bg-soft); }
.dbx-table td { border-bottom-color: color-mix(in srgb, var(--line) 75%, transparent); }
.dbx-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 3.5%, var(--surface)); }
.dbx-table .c-sel { width: 48px; padding-left: 20px; }
.dbx-table .c-name { left: 48px; min-width: 240px; }
.dbx-name__av { width: 34px; height: 34px; font-size: .76rem; }
.dbx-av-0 { background: #E8EDF8; color: #051C5E; } .dbx-av-1 { background: #FFF0E7; color: #B8420E; } .dbx-av-2 { background: #E7F6EC; color: #15803d; }
.dbx-av-3 { background: #EDE9FE; color: #6D28D9; } .dbx-av-4 { background: #E0F2FE; color: #0369A1; } .dbx-av-5 { background: #FCE7F3; color: #BE185D; }
:root[data-theme="dark"] [class*="dbx-av-"] { background: var(--surface-2); color: var(--heading); }
.dbx-name__txt a { font-size: .9rem; }
.dbx-co { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.dbx-co__av { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-size: .62rem; font-weight: 800; }
.dbx-pager { padding: 10px 20px; }

/* Export & send panel */
.dbx-menu__panel--send { width: 400px; padding: 14px; }
.dbx-send__head { display: grid; gap: 2px; margin-bottom: 12px; }
.dbx-send__head b { color: var(--heading); font-size: .98rem; }
.dbx-send__head small { color: var(--muted); font-size: .8rem; }
.dbx-seg--full { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.dbx-seg--full button { display: grid; gap: 0; padding: 6px 4px; line-height: 1.2; }
.dbx-seg--full button small { color: var(--muted); font-size: .72rem; font-weight: 600; }
.dbx-seg--full button:disabled { opacity: .45; cursor: default; }
.dbx-send__name { display: grid; gap: 4px; margin: 12px 0 10px; }
.dbx-send__name span { color: var(--muted); font-size: .76rem; font-weight: 650; }
.dbx-send__list { display: grid; gap: 6px; }
.dbx-dest { border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s; }
.dbx-dest:hover { border-color: var(--accent); }
.dbx-dest__btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none; text-align: left; cursor: pointer; }
.dbx-dest__btn > .icon { color: var(--muted); width: 15px; height: 15px; transition: transform .15s; }
.dbx-dest:hover .dbx-dest__btn > .icon { color: var(--accent-text); transform: translateX(2px); }
.dbx-dest__ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; }
.dbx-dest__ic--csv { background: var(--accent-soft); color: var(--accent-text); }
.dbx-dest__ic--sheets { background: rgba(22, 163, 74, .12); color: #15803d; }
.dbx-dest__ic--email { background: rgba(37, 99, 235, .12); color: #1d4ed8; }
.dbx-dest__ic--whatsapp { background: rgba(37, 211, 102, .14); color: #128c4b; }
.dbx-dest__ic--sms { background: rgba(124, 77, 255, .12); color: #5b3cc4; }
.dbx-dest__ic--dialer { background: rgba(0, 150, 136, .12); color: #00796b; }
.dbx-dest__txt { flex: 1; display: grid; min-width: 0; line-height: 1.3; }
.dbx-dest__txt b { color: var(--heading); font-size: .88rem; }
.dbx-dest__txt small { color: var(--muted); font-size: .76rem; }
.dbx-send__opt { display: flex; align-items: center; gap: 7px; padding: 0 12px 10px 60px; color: var(--muted); font-size: .78rem; cursor: pointer; }
.dbx-send__opt input { accent-color: var(--accent); }
.dbx-send__result { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 12px; border-radius: 11px; background: var(--surface-2); color: var(--heading); font-size: .84rem; }
.dbx-send__result[hidden] { display: none; }
.dbx-send__result span { flex: 1; }
.dbx-send__result.is-ok { background: rgba(22, 163, 74, .1); }
.dbx-send__result.is-ok > .icon { color: #16a34a; }
.dbx-send__result.is-err { background: rgba(220, 38, 38, .09); }
.dbx-send__result.is-err > .icon { color: #dc2626; }
.dbx-send__locked { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 12px; border-radius: 12px; background: var(--accent-soft); color: var(--heading); font-size: .86rem; }
.dbx-send__locked span { flex: 1; }
.dbx-menu__panel--send .dbx-note { display: flex; gap: 6px; margin-top: 12px; }
.dbx-menu__panel--send .dbx-note .icon { flex: none; width: 14px; height: 14px; margin-top: 2px; }
.dbx-spin { flex: none; width: 16px; height: 16px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: dbx-spin .7s linear infinite; }
@keyframes dbx-spin { to { transform: rotate(360deg); } }
.dbx-selbar__acts { display: flex; gap: 6px; margin-left: auto; }
.dbx-toast { display: flex; align-items: center; gap: 10px; max-width: min(560px, 92vw); }
.dbx-toast a { color: #fff; }
.dbx-toast .dbx-btn { margin-left: 6px; }

/* Email bounce rate (Email Verifier) and phone numbers */
.dbx-bounce { display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 7px; border-radius: 99px; font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dbx-bounce:first-child { margin-left: 0; }
.dbx-bounce--lo { background: rgba(22, 163, 74, .12); color: #15803d; }
.dbx-bounce--mid { background: rgba(245, 158, 11, .15); color: #b45309; }
.dbx-bounce--hi { background: rgba(220, 38, 38, .12); color: #b91c1c; }
:root[data-theme="dark"] .dbx-bounce--lo { color: #4ade80; }
:root[data-theme="dark"] .dbx-bounce--mid { color: #fbbf24; }
:root[data-theme="dark"] .dbx-bounce--hi { color: #f87171; }
.dbx-lock + .dbx-bounce { margin-left: 8px; }
.dbx-tel { font-variant-numeric: tabular-nums; white-space: nowrap; }
