/* Analytic distribution (an-*): the line button, the distribution dialog, plan colour dot. Tokens from admin.css only; logical properties for RTL. */
.an-cell { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 34px; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; text-align: start; }
.an-cell:hover { border-color: var(--accent); }
.an-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.an-cell.empty { color: var(--muted); border-style: dashed; }
.an-cell .an-cell-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-td { min-width: 150px; }

.an-dlg { display: grid; gap: 14px; }
.an-plan { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.an-plan.bad { border-color: color-mix(in srgb, var(--danger) 55%, var(--line)); }
.an-plan-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.an-total { margin-inline-start: auto; font-variant-numeric: tabular-nums; color: var(--muted); }
.an-total.ok { color: var(--ok-ink); font-weight: 700; }
.an-total.bad { color: var(--danger-ink); font-weight: 700; }
.an-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto auto; align-items: center; gap: 8px; }
.an-pctwrap { display: flex; align-items: center; gap: 4px; }
.an-pctwrap .an-pct { width: 100%; text-align: end; }
.an-rest { min-height: 34px; padding-inline: 10px; }
.an-add { justify-self: start; }
.an-dot { display: inline-block; inline-size: 10px; block-size: 10px; margin-inline-end: 8px; border-radius: 50%; vertical-align: middle; }
.an-std { margin-inline-start: 8px; }
@media (max-width: 720px) {
  .an-row { grid-template-columns: minmax(0, 1fr) 96px; }
  .an-row .an-rest, .an-row .icon-btn { justify-self: start; min-height: 44px; }
  .an-cell { min-height: 44px; }
}
