/*
 * Uniborn UI kit — components
 * Plain CSS, no framework. Requires tokens/tokens.css.
 * Every class starts with ub-. Modifiers: ub-x--y. States: is-*, [disabled], [aria-*].
 * See kit.html for every component with copyable markup.
 */

/* ── Base ─────────────────────────────────────────────── */
.ub-root {
  background: var(--ub-bg);
  color: var(--ub-ink);
  font: 400 var(--ub-text-md)/1.45 var(--ub-font-sans);
  -webkit-font-smoothing: antialiased;
}
.ub-root *, .ub-root *::before, .ub-root *::after { box-sizing: border-box; }
.ub-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ub-muted { color: var(--ub-muted); }
.ub-faint { color: var(--ub-faint); }
.ub-meta { color: var(--ub-muted); font-size: var(--ub-text-sm); }
.ub-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Type */
.ub-title { font: 500 var(--ub-title-lg)/1.1 var(--ub-font-serif); letter-spacing: -0.015em; margin: 0; }
.ub-title--md { font-size: var(--ub-title-md); }
.ub-title--sm { font-size: var(--ub-title-sm); }
.ub-figure { font: 500 var(--ub-title-md)/1.1 var(--ub-font-serif); font-variant-numeric: lining-nums tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.ub-figure--lg { font-size: var(--ub-title-xl); }
.ub-heading { font: 600 var(--ub-text-md)/1.3 var(--ub-font-sans); margin: 0; }

/* ── Buttons ──────────────────────────────────────────── */
.ub-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--ub-control-md); padding: 0 14px;
  border: 1px solid var(--ub-rule-strong); border-radius: var(--ub-radius-md);
  background: var(--ub-surface); color: var(--ub-ink);
  font: 600 13px/1 var(--ub-font-sans); white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background var(--ub-duration) var(--ub-ease), box-shadow var(--ub-duration) var(--ub-ease);
}
.ub-btn:hover { background: var(--ub-surface-2); }
.ub-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--ub-bg), 0 0 0 4px var(--ub-focus); }
.ub-btn[disabled], .ub-btn.is-disabled { opacity: .42; cursor: not-allowed; }
.ub-btn--primary { background: var(--ub-ink); color: var(--ub-inverse); border-color: transparent; }
.ub-btn--primary:hover { background: color-mix(in srgb, var(--ub-ink) 86%, var(--ub-bg)); }
.ub-btn--ghost { background: none; border-color: transparent; }
.ub-btn--ghost:hover { background: var(--ub-surface-2); }
.ub-btn--danger { color: var(--ub-negative); border-color: color-mix(in srgb, var(--ub-negative) 45%, transparent); }
.ub-btn--sm { height: var(--ub-control-sm); padding: 0 10px; font-size: 12px; }
.ub-btn--lg { height: var(--ub-control-lg); padding: 0 18px; font-size: 14px; }
.ub-btn--block { width: 100%; }
.ub-btn svg { width: 15px; height: 15px; }
.ub-spinner { width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: ub-spin .8s linear infinite; }
@keyframes ub-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ub-spinner { animation: none; } }

/* ── Fields ───────────────────────────────────────────── */
.ub-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ub-label { font-size: 13px; font-weight: 500; }
.ub-help { font-size: 12px; color: var(--ub-muted); }
.ub-help--error { color: var(--ub-negative); }
.ub-input {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 10px; min-width: 0;
  border: 1px solid var(--ub-rule-strong); border-radius: var(--ub-radius-md);
  background: var(--ub-surface); color: var(--ub-ink);
  font: 400 var(--ub-text-md)/1 var(--ub-font-sans);
}
.ub-input input, .ub-input select, .ub-input textarea {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: inherit; font: inherit; padding: 0;
}
.ub-input input::placeholder, .ub-input textarea::placeholder { color: var(--ub-faint); }
.ub-input:focus-within, .ub-input.is-focus { border-color: var(--ub-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ub-ink) 14%, transparent); }
.ub-input.is-invalid { border-color: var(--ub-negative); }
.ub-input.is-disabled { background: var(--ub-surface-2); color: var(--ub-faint); }
.ub-input--area { height: auto; align-items: flex-start; padding: 8px 10px; }
.ub-input--area textarea { min-height: 72px; resize: vertical; line-height: 1.5; }
.ub-input__prefix, .ub-input__suffix { color: var(--ub-muted); font-size: 13px; flex: none; }
.ub-input input[inputmode="decimal"], .ub-input .ub-num { font-variant-numeric: tabular-nums; }
.ub-select::after { content: ""; flex: none; width: 7px; height: 7px; border-right: 1.5px solid var(--ub-muted); border-bottom: 1.5px solid var(--ub-muted); transform: rotate(45deg) translate(-2px, -2px); }
.ub-select select { appearance: none; }
@media (max-width: 600px) { .ub-input { font-size: var(--ub-text-lg); } }

.ub-check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--ub-text-md); cursor: pointer; }
.ub-check input { appearance: none; margin: 0; width: 16px; height: 16px; border-radius: var(--ub-radius-sm); border: 1px solid var(--ub-rule-strong); background: var(--ub-surface); display: grid; place-items: center; flex: none; }
.ub-check input:checked { background: var(--ub-ink); border-color: transparent; }
.ub-check input:checked::after { content: ""; width: 8px; height: 4px; border-left: 2px solid var(--ub-inverse); border-bottom: 2px solid var(--ub-inverse); transform: rotate(-45deg) translate(1px, -1px); }
.ub-check input:focus-visible { box-shadow: 0 0 0 3px var(--ub-focus); }

.ub-switch { display: inline-flex; align-items: center; gap: 8px; font-size: var(--ub-text-md); cursor: pointer; }
.ub-switch input { appearance: none; margin: 0; width: 32px; height: 18px; border-radius: 9px; background: var(--ub-rule-strong); position: relative; flex: none; transition: background var(--ub-duration); }
.ub-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--ub-surface); transition: left var(--ub-duration) var(--ub-ease); }
.ub-switch input:checked { background: var(--ub-ink); }
.ub-switch input:checked::after { left: 16px; background: var(--ub-inverse); }

.ub-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 7px; background: var(--ub-surface-2); box-shadow: inset 0 0 0 1px var(--ub-rule); white-space: nowrap; }
.ub-seg button, .ub-seg > span { border: 0; background: none; padding: 5px 12px; border-radius: 5px; font: 500 13px/1.2 var(--ub-font-sans); color: var(--ub-muted); cursor: pointer; }
.ub-seg [aria-pressed="true"], .ub-seg .is-active { background: var(--ub-surface); color: var(--ub-ink); box-shadow: 0 0 0 1px var(--ub-rule-strong); }

/* ── Status, tags, counts ─────────────────────────────── */
/* Deal stage: label + 9-step meter. Tone via data-tone: neutral | live | muted | positive | negative */
.ub-stage { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 8px; border: 1px solid var(--ub-rule-strong); border-radius: var(--ub-radius-sm); font: 500 12px/1 var(--ub-font-sans); color: var(--ub-ink); white-space: nowrap; }
.ub-stage[data-tone="live"] { border-color: var(--ub-ink); }
.ub-stage[data-tone="muted"] { color: var(--ub-muted); border-style: dashed; }
.ub-stage[data-tone="positive"] { color: var(--ub-positive); }
.ub-stage[data-tone="negative"] { color: var(--ub-negative); }
.ub-stage__meter { display: inline-grid; grid-template-columns: repeat(9, 3px); gap: 1px; }
.ub-stage__meter i { height: 9px; background: currentColor; opacity: .22; }
.ub-stage__meter i.is-on { opacity: 1; }

/* Outcome status: dot + word. Tone: neutral | attention | positive | negative */
.ub-status { display: inline-flex; align-items: center; gap: 6px; font: 500 13px/1.2 var(--ub-font-sans); color: var(--ub-ink); white-space: nowrap; }
.ub-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.ub-status[data-tone="neutral"]::before { background: none; box-shadow: inset 0 0 0 1.5px currentColor; }
.ub-status[data-tone="attention"] { color: var(--ub-attention); }
.ub-status[data-tone="positive"] { color: var(--ub-positive); }
.ub-status[data-tone="negative"] { color: var(--ub-negative); }

.ub-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: var(--ub-radius-sm); box-shadow: inset 0 0 0 1px var(--ub-rule-strong); font: 500 12px/1 var(--ub-font-sans); color: var(--ub-muted); white-space: nowrap; }
.ub-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ub-ink); color: var(--ub-inverse); font: 600 11px/1 var(--ub-font-sans); }
.ub-count--attention { background: var(--ub-attention); }
.ub-count--quiet { background: var(--ub-surface-2); color: var(--ub-muted); box-shadow: inset 0 0 0 1px var(--ub-rule); }

/* ── Navigation ───────────────────────────────────────── */
.ub-sidebar { display: flex; flex-direction: column; gap: 1px; padding: 18px 10px 10px; background: var(--ub-sidebar); border-right: 1px solid var(--ub-rule); min-height: 100%; }
.ub-sidebar__logo { display: block; color: var(--ub-ink); padding: 0 8px 20px; }
.ub-sidebar__logo svg { height: 17px; width: auto; aspect-ratio: 2056 / 304; display: block; }
.ub-sidebar__spacer { flex: 1; }
.ub-nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--ub-radius-md); color: var(--ub-muted); font: 500 14px/1.2 var(--ub-font-sans); text-decoration: none; }
.ub-nav-item svg { width: 16px; height: 16px; flex: none; }
.ub-nav-item:hover { color: var(--ub-ink); background: color-mix(in srgb, var(--ub-surface) 50%, transparent); }
.ub-nav-item.is-active, .ub-nav-item[aria-current="page"] { background: var(--ub-surface); color: var(--ub-ink); box-shadow: inset 0 0 0 1px var(--ub-rule); }
.ub-nav-item__count { margin-left: auto; font-size: 12px; color: var(--ub-faint); }
.ub-nav-item__count--attention { color: var(--ub-attention); font-weight: 600; }

.ub-subnav { display: flex; flex-direction: column; gap: 1px; }
.ub-subnav__group { font: 500 12px/1.2 var(--ub-font-sans); color: var(--ub-faint); margin: 14px 8px 4px; }
.ub-subnav__group:first-child { margin-top: 0; }
.ub-subnav a { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: var(--ub-radius-md); color: var(--ub-muted); font: 500 13px/1.3 var(--ub-font-sans); text-decoration: none; }
.ub-subnav a.is-active, .ub-subnav a[aria-current="page"] { background: var(--ub-surface); color: var(--ub-ink); box-shadow: inset 0 0 0 1px var(--ub-rule); }

.ub-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--ub-rule); overflow-x: auto; }
.ub-tabs a, .ub-tabs button { padding: 8px 0; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--ub-muted); font: 500 13px/1.2 var(--ub-font-sans); white-space: nowrap; text-decoration: none; cursor: pointer; }
.ub-tabs .is-active, .ub-tabs [aria-selected="true"] { color: var(--ub-ink); border-color: var(--ub-ink); }
.ub-tabs small { color: var(--ub-faint); margin-left: 5px; font-size: 12px; }

.ub-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.ub-page-head__back { display: block; font-size: 13px; color: var(--ub-muted); margin-bottom: 6px; text-decoration: none; }
.ub-page-head__sub { margin: 6px 0 0; color: var(--ub-muted); font-size: 13px; }
.ub-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* Needs attention: sidebar block */
.ub-attention { display: block; margin: 0 0 14px; padding: 10px; border-radius: 8px; background: var(--ub-surface); box-shadow: inset 0 0 0 1px var(--ub-rule-strong); font-size: 12px; color: var(--ub-ink); text-decoration: none; }
.ub-attention__head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; }
.ub-attention__head .ub-count { margin-left: auto; }
.ub-attention__next { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--ub-rule); line-height: 1.35; }
.ub-attention__next span { display: block; color: var(--ub-attention); font-size: 11px; margin-top: 2px; }

/* Admin view bar */
.ub-admin-bar { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 7px 16px; background: var(--ub-ink); color: var(--ub-inverse); font: 400 13px/1.3 var(--ub-font-sans); }
.ub-admin-bar a { color: inherit; opacity: .85; text-underline-offset: 3px; }

/* ── Surfaces ─────────────────────────────────────────── */
.ub-card { background: var(--ub-surface); border: 1px solid var(--ub-rule); border-radius: var(--ub-radius-lg); overflow: hidden; }
.ub-card__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--ub-rule); font: 600 13px/1.3 var(--ub-font-sans); }
.ub-card__head span { font-weight: 500; color: var(--ub-muted); }
.ub-card__body { padding: 16px; }
.ub-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--ub-rule); font-size: 12px; color: var(--ub-muted); }

/* Row inside a card: icon/dot, text with sub-line, action */
.ub-row { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--ub-rule); font-size: 13px; }
.ub-row:last-child { border-bottom: 0; }
.ub-row__main { flex: 1; min-width: 0; }
.ub-row__main span { display: block; color: var(--ub-muted); font-size: 12px; margin-top: 1px; }

/* Key–value list */
.ub-dl { display: grid; grid-template-columns: 1fr auto; font-size: 13px; margin: 0; }
.ub-dl dt, .ub-dl dd { margin: 0; padding: 9px 16px; border-bottom: 1px solid var(--ub-rule); }
.ub-dl dt { color: var(--ub-muted); }
.ub-dl dd { font-variant-numeric: tabular-nums; text-align: right; }
.ub-dl dt:nth-last-of-type(1), .ub-dl dd:last-of-type { border-bottom: 0; }

/* ── Table ────────────────────────────────────────────── */
.ub-table-wrap { overflow-x: auto; }
.ub-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--ub-rule); flex-wrap: wrap; }
.ub-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.ub-filter { height: 28px; padding: 0 10px; border-radius: var(--ub-radius-md); border: 1px solid var(--ub-rule); background: none; display: inline-flex; align-items: center; gap: 6px; font: 500 12px/1 var(--ub-font-sans); color: var(--ub-muted); white-space: nowrap; cursor: pointer; }
.ub-filter small { opacity: .7; font-size: 12px; }
.ub-filter.is-active, .ub-filter[aria-pressed="true"] { background: var(--ub-ink); color: var(--ub-inverse); border-color: transparent; }
.ub-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ub-table th { text-align: left; font-weight: 500; font-size: 12px; color: var(--ub-muted); padding: 10px 12px; border-bottom: 1px solid var(--ub-rule); white-space: nowrap; }
.ub-table td { padding: 11px 12px; border-bottom: 1px solid var(--ub-rule); vertical-align: middle; }
.ub-table tbody tr:last-child td { border-bottom: 0; }
.ub-table tbody tr:hover td, .ub-table tr.is-hover td { background: var(--ub-surface-2); }
.ub-table tr.is-selected td { background: color-mix(in srgb, var(--ub-ink) 6%, var(--ub-surface)); }
.ub-table .ub-col-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ub-table tfoot td { border-top: 1px solid var(--ub-rule-strong); border-bottom: 0; font-weight: 600; background: var(--ub-surface-2); }
@media (max-width: 600px) {
  .ub-table--stack thead { display: none; }
  .ub-table--stack tr { display: grid; padding-block: 8px; border-bottom: 1px solid var(--ub-rule); }
  .ub-table--stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 12px; }
  .ub-table--stack td::before { content: attr(data-label); color: var(--ub-muted); }
}

/* Entity cell: avatar or logo + name + sub-line */
.ub-entity { display: flex; gap: 10px; align-items: center; min-width: 0; }
.ub-entity b { display: block; font-weight: 600; white-space: nowrap; }
.ub-entity span { color: var(--ub-muted); font-size: 12px; white-space: nowrap; }

/* ── Figures and progress ─────────────────────────────── */
.ub-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(9em, 1fr)); border-top: 1px solid var(--ub-rule-strong); border-bottom: 1px solid var(--ub-rule); }
.ub-kpi { padding: 14px 18px 16px 0; }
.ub-kpi + .ub-kpi { padding-left: 18px; border-left: 1px solid var(--ub-rule); }
.ub-kpi__label { display: block; font-size: 12px; color: var(--ub-muted); margin-bottom: 4px; }
.ub-kpi__note { display: block; font-size: 12px; color: var(--ub-muted); margin-top: 4px; }

.ub-progress { position: relative; height: 6px; border-radius: 3px; background: var(--ub-rule); }
.ub-progress__bar { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--ub-ink); }
.ub-progress__mark { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--ub-ink); }
.ub-progress--thin { height: 4px; }
.ub-progress__labels { position: relative; height: 16px; margin-top: 6px; font-size: 11px; color: var(--ub-muted); }
.ub-progress__labels span { position: absolute; white-space: nowrap; }

.ub-steps { display: inline-flex; gap: 3px; }
.ub-steps i { width: 16px; height: 5px; border-radius: 1px; background: var(--ub-rule-strong); }
.ub-steps i.is-on { background: var(--ub-ink); }

/* Stage rail: --ub-rail-done = completed share, e.g. 4.5 of 9 */
.ub-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border-top: 2px solid var(--ub-rule-strong); position: relative; }
.ub-rail::before { content: ""; position: absolute; top: -2px; left: 0; height: 2px; width: var(--ub-rail-done, 0%); background: var(--ub-ink); }
.ub-rail > div { position: relative; padding: 12px 6px 0 0; font-size: 12px; color: var(--ub-muted); }
.ub-rail > div::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--ub-bg); box-shadow: inset 0 0 0 2px var(--ub-rule-strong); }
.ub-rail > div.is-done { color: var(--ub-ink); }
.ub-rail > div.is-done::before { background: var(--ub-ink); box-shadow: none; }
.ub-rail > div.is-current { color: var(--ub-ink); font-weight: 600; }
.ub-rail > div.is-current::before { box-shadow: inset 0 0 0 2px var(--ub-ink), 0 0 0 4px var(--ub-bg), 0 0 0 5px var(--ub-ink); }
.ub-rail small { display: block; font-weight: 400; color: var(--ub-faint); font-size: 11px; }

/* Vertical timeline */
.ub-timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.ub-timeline li { position: relative; padding: 0 0 14px 22px; }
.ub-timeline li::before { content: ""; position: absolute; left: 4px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--ub-bg); box-shadow: inset 0 0 0 1.5px var(--ub-ink); }
.ub-timeline li.is-done::before { background: var(--ub-ink); }
.ub-timeline li::after { content: ""; position: absolute; left: 7.5px; top: 15px; bottom: 0; width: 1px; background: var(--ub-rule-strong); }
.ub-timeline li:last-child::after { display: none; }
.ub-timeline li span { display: block; color: var(--ub-muted); font-size: 12px; }

/* ── Feedback ─────────────────────────────────────────── */
.ub-alert { border-left: 2px solid var(--ub-ink); background: var(--ub-surface); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 13px; }
.ub-alert b { display: block; font-weight: 600; margin-bottom: 2px; }
.ub-alert--attention { border-color: var(--ub-attention); }
.ub-alert--attention b { color: var(--ub-attention); }
.ub-alert--negative { border-color: var(--ub-negative); }
.ub-alert--negative b { color: var(--ub-negative); }
.ub-alert--positive { border-color: var(--ub-positive); }
.ub-alert--positive b { color: var(--ub-positive); }

.ub-toast { display: flex; gap: 12px; align-items: flex-start; max-width: 360px; padding: 12px 14px; border-radius: 8px; background: var(--ub-ink); color: var(--ub-inverse); font-size: 13px; box-shadow: var(--ub-shadow-pop); }
.ub-toast b { display: block; font-weight: 600; }
.ub-toast span { opacity: .75; }
.ub-toast button { margin-left: auto; border: 0; background: none; color: inherit; font: 600 13px var(--ub-font-sans); cursor: pointer; }

.ub-modal { max-width: 440px; background: var(--ub-surface); border: 1px solid var(--ub-rule-strong); border-radius: var(--ub-radius-xl); box-shadow: var(--ub-shadow-pop); }
.ub-modal__head { padding: 18px 20px 0; font: 500 22px/1.2 var(--ub-font-serif); }
.ub-modal__body { padding: 10px 20px 18px; font-size: 14px; color: var(--ub-muted); }
.ub-modal__body ul { margin: 8px 0 0; padding-left: 18px; }
.ub-modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--ub-rule); }
.ub-backdrop { position: fixed; inset: 0; background: rgb(17 18 20 / .4); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 16px; }

.ub-panel { width: min(400px, 100%); background: var(--ub-surface); border-left: 1px solid var(--ub-rule-strong); box-shadow: var(--ub-shadow-pop); display: flex; flex-direction: column; }
.ub-panel__head { padding: 16px 18px; border-bottom: 1px solid var(--ub-rule); }
.ub-panel__head b { font: 500 20px/1.15 var(--ub-font-serif); }
.ub-panel__body { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.ub-panel__foot { padding: 14px 18px; border-top: 1px solid var(--ub-rule); display: flex; justify-content: space-between; gap: 8px; }

.ub-tooltip { display: inline-block; position: relative; padding: 6px 9px; border-radius: var(--ub-radius-sm); background: var(--ub-ink); color: var(--ub-inverse); font-size: 12px; }
.ub-tooltip::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; background: inherit; transform: translateX(-50%) rotate(45deg); }

.ub-empty { padding: 36px 24px; text-align: center; border: 1px dashed var(--ub-rule-strong); border-radius: var(--ub-radius-lg); }
.ub-empty__icon { width: 36px; height: 36px; margin: 0 auto 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ub-rule-strong); display: grid; place-items: center; color: var(--ub-muted); }
.ub-empty__icon svg { width: 18px; height: 18px; }
.ub-empty b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.ub-empty p { margin: 0 auto 14px; max-width: 40ch; font-size: 13px; color: var(--ub-muted); }

.ub-skeleton { display: block; height: 10px; border-radius: 3px; background: var(--ub-rule); width: var(--w, 80px); }

/* ── People and companies ─────────────────────────────── */
.ub-avatar { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--ub-surface-2); color: var(--ub-muted); box-shadow: inset 0 0 0 1px var(--ub-rule-strong); font: 600 12px/1 var(--ub-font-sans); overflow: hidden; }
.ub-avatar img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.ub-avatar--sm { width: 24px; height: 24px; font-size: 10px; }
.ub-avatar--lg { width: 48px; height: 48px; font-size: 15px; }
.ub-avatar--xl { width: 64px; height: 64px; font-size: 18px; }
.ub-avatars { display: flex; }
.ub-avatars .ub-avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--ub-surface), inset 0 0 0 1px var(--ub-rule-strong); }
.ub-avatars .ub-avatar:first-child { margin-left: 0; }
.ub-logo { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 7px; background: var(--ub-ink); color: var(--ub-inverse); font: 600 15px/1 var(--ub-font-serif); overflow: hidden; }
.ub-logo img { width: 100%; height: 100%; object-fit: contain; }
.ub-logo--outline { background: var(--ub-surface-2); color: var(--ub-ink); box-shadow: inset 0 0 0 1px var(--ub-rule-strong); }
.ub-logo--sm { width: 24px; height: 24px; font-size: 12px; border-radius: 5px; }
.ub-logo--lg { width: 44px; height: 44px; font-size: 19px; border-radius: 9px; }
