/* SYGNAL admin: css/customers.css (customers track), on the kit (/ui.css).
 *
 * Customers: the list (/customers) and one page per customer (/customers/:id),
 * drawn by /js/pages/customers.js. The look is artboards/Customer.dc.html from 768
 * and PhoneCustomer.dc.html below; design-spec "Customers › All customers" and
 * "Customer page". Mobile-first like ui.css: the base rules are the phone, then
 * min-width 768 / 1024 / 1280 / 1440. Every target is at least 44 px; inputs are
 * 16 px below 768 (the kit's --ui-input-size). Only ui-cu-* classes are defined
 * here; kit components are used as they are.
 *
 * Which parts of a row show at which width: .ui-cu-phone (below 768),
 * .ui-cu-wide (768 up), .ui-cu-desk (1440 up), .ui-cu-nodesk (below 1440), at
 * the end of this file so they win.
 */

/* ── The page ───────────────────────────────────────────────────────────── */
.ui-cu { display: block; font-family: var(--ui-font); color: var(--ui-ink); }
.ui-cu-body { display: flex; flex-direction: column; gap: 12px; }
.ui-cu-muted { color: var(--ui-muted); }
.ui-cu-num { text-align: right; }
.ui-cu-per { font-size: 0.6em; font-weight: 600; color: var(--ui-slate); letter-spacing: 0; }
.ui-cu-amt { white-space: nowrap; font-weight: 700; }
.ui-cu-code { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--ui-muted); }
.ui-cu-banners { display: flex; flex-direction: column; gap: 8px; }
.ui-cu-banners:empty { display: none; }
.ui-cu-showing { margin: 0; }
.ui-cu-showing:empty { display: none; }
.ui-cu-empty { margin: 0; padding: 16px; }
.ui-cu-loading { display: flex; flex-direction: column; gap: 4px; padding: 8px 16px; }
.ui-cu-skrow { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; }
.ui-cu-countsk { display: inline-block; width: 18px; height: 14px; }
.ui-cu-cellsk { display: inline-block; width: 64px; height: 14px; }
.ui-cu-kpisk { display: inline-block; width: 96px; height: 24px; border-radius: 6px; }

/* Logo, or the organisation's initials (a broken logo becomes the initials). */
.ui-cu-logo { display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: var(--ui-radius-control); color: var(--ui-brand); font-weight: 700; }
.ui-cu-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ui-cu-logo--initials { background: var(--ui-brand-50); border-color: var(--ui-brand-50); }
.ui-cu-logo--32 { width: 32px; height: 32px; border-radius: 8px; font-size: 13px; line-height: 16px; }
.ui-cu-logo--64 { width: 56px; height: 56px; border-radius: var(--ui-radius-pop); font-size: 22px; line-height: 28px; }
@media (min-width: 768px) { .ui-cu-logo--64 { width: 64px; height: 64px; font-size: 28px; line-height: 34px; } }

/* ── The list: the white band (chips, search, sort) under the heading ───── */
/* Phone: it continues the heading's white band, edge to edge (PhonePipeline's band). */
.ui-cu-band {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 calc(-1 * (var(--ui-page-pad) + var(--ui-safe-right))) 4px calc(-1 * (var(--ui-page-pad) + var(--ui-safe-left)));
  padding: 16px calc(var(--ui-page-pad) + var(--ui-safe-right)) 16px calc(var(--ui-page-pad) + var(--ui-safe-left));
  background: var(--ui-surface);
  border-bottom: 1px solid var(--ui-line);
}
/* Phone: two chips to a row, every row full (8 chips: 4 rows). */
.ui-cu-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.ui-cu-chips .ui-chip { width: 100%; min-width: 0; padding: 0 10px; gap: 6px; }
.ui-cu-filterrow { display: flex; flex-direction: column; gap: 12px; }
.ui-cu-search { flex: 1 1 auto; }
.ui-cu-sort { flex: none; }
.ui-cu-result { color: var(--ui-slate); font-size: 14px; line-height: 20px; font-weight: 600; white-space: nowrap; }
@media (min-width: 768px) {
  .ui-cu-band { margin: 0 0 4px; padding: 0; background: transparent; border-bottom: 0; }
  /* Tablet and small desktop: four to a row, two full rows (pills that wrap left 5 / 3 at 834). */
  .ui-cu-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ui-cu-chips .ui-chip { padding: 0 12px; gap: 8px; }
  .ui-cu-filterrow { flex-direction: row; align-items: center; gap: 12px; }
  .ui-cu-search { flex: 0 1 360px; min-width: 200px; }
  .ui-cu-sort { width: 220px; }
  .ui-cu-result { margin-left: auto; }
}

/* From 1440 the eight chips sit in one row of pills, as drawn. */
@media (min-width: 1440px) {
  .ui-cu-chips { display: flex; flex-wrap: nowrap; }
  .ui-cu-chips .ui-chip { width: auto; padding: 0 16px; }
}

/* ── The table: cards on the phone, a table from 768 ────────────────────── */
.ui-cu-tablecard { margin: 0; background: var(--ui-surface); border: 1px solid var(--ui-line); border-radius: var(--ui-radius-card); box-shadow: var(--ui-shadow-1); overflow: hidden; }
.ui-cu-table { width: 100%; margin: 0; border-collapse: collapse; font-size: 15px; line-height: 22px; }
.ui-cu-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ui-cu-table tbody { display: block; }
/* Phone card: the organisation (a link) across the top, its status under the name,
   the next step full width below; the whole name line is the 44 px target. */
.ui-cu-table tr { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: 8px; padding: 10px 16px 12px; border-bottom: 1px solid var(--ui-line); }
.ui-cu-table tbody tr:last-child { border-bottom: 0; }
.ui-cu-table td { display: block; min-width: 0; padding: 0; }
.ui-cu-table td.ui-cu-c-status { padding-left: 44px; }
.ui-cu-table td.ui-cu-c-acts--none { display: none; }
.ui-cu-org { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 44px; color: var(--ui-ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.ui-cu-org:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; border-radius: 6px; }
.ui-cu-org__text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.ui-cu-org__name { font-size: 15px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.ui-cu-org__meta { overflow-wrap: anywhere; }
.ui-cu-org__go { color: var(--ui-muted); }
.ui-cu-acts { display: flex; gap: 8px; }
.ui-cu-acts .ui-btn { flex: 1 1 auto; }
.ui-cu-addons { display: inline-flex; gap: 6px; }
.ui-cu-addon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--ui-radius-pill); background: var(--ui-brand-50); color: var(--ui-brand); }
.ui-cu-foot { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--ui-line); }
.ui-cu-foot:has(> .ui-small:only-child) { display: none; }
@media (hover: hover) { .ui-cu-org:hover .ui-cu-org__name { color: var(--ui-brand); text-decoration: underline; } }
@media (min-width: 768px) {
  .ui-cu-table { table-layout: fixed; }
  .ui-cu-table thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; display: table-header-group; }
  .ui-cu-table tbody { display: table-row-group; }
  .ui-cu-table tr { display: table-row; padding: 0; border-bottom: 0; }
  .ui-cu-table th, .ui-cu-table td { display: table-cell; }
  .ui-cu-table th { height: 44px; padding: 0 16px; background: var(--ui-surface-2); border-bottom: 1px solid var(--ui-line); color: var(--ui-slate); font-size: 13px; line-height: 18px; font-weight: 600; text-align: left; white-space: nowrap; }
  .ui-cu-table td { height: 64px; padding: 8px 16px; border-bottom: 1px solid var(--ui-line); vertical-align: middle; }
  .ui-cu-table td.ui-cu-c-status { padding-left: 16px; }
  .ui-cu-table td.ui-cu-c-acts--none { display: table-cell; }
  .ui-cu-table tbody tr:last-child td { border-bottom: 0; }
  .ui-cu-table th.ui-cu-num, .ui-cu-table td.ui-cu-num { text-align: right; }
  .ui-cu-w-status { width: 200px; }
  .ui-cu-w-acts { width: 156px; }
  .ui-cu-acts { justify-content: flex-end; }
  .ui-cu-acts .ui-btn { flex: none; }
  .ui-cu-foot { justify-content: space-between; }
  .ui-cu-foot:has(> .ui-small:only-child) { display: flex; }
}
@media (min-width: 768px) and (hover: hover) { .ui-cu-table tbody tr:hover td { background: var(--ui-surface-2); } }
/* The artboard's full table (Customer list, design-spec: 1128 px) starts at 1440,
   where it is drawn; 768-1439 folds Type, Add-ons, Renews and Recurring into the
   organisation's line, so 834 and 1280 need no sideways scroll inside the card. */
@media (min-width: 1440px) {
  .ui-cu-w-type { width: 110px; }
  .ui-cu-w-status { width: 180px; }
  .ui-cu-w-addons { width: 130px; }
  .ui-cu-w-ends { width: 120px; }
  .ui-cu-w-rec { width: 120px; }
  .ui-cu-w-acts { width: 148px; }
}

/* ── One customer ───────────────────────────────────────────────────────── */
/* The page's sub-page grid (All customers | Usage) gives way to the breadcrumb
   on a customer's page, as PhoneCustomer draws it (a back link, no grid). */
.ui-main:has(.ui-cu--record) > .ui-subnav { display: none; }
.ui-cu-crumb { display: flex; align-items: center; gap: 4px; min-height: 44px; margin: 0; }
.ui-cu-crumb > .ui-btn--tertiary { margin-left: -12px; }
.ui-cu-crumb__here { min-width: 0; overflow: hidden; color: var(--ui-slate); font-size: 15px; line-height: 22px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.ui-cu-crumb__here::before { content: '\203A'; margin: 0 8px 0 0; color: var(--ui-muted); }

/* Header: a white band on the phone (with the breadcrumb above it), a card from 768. */
.ui-cu-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; padding: 16px; }
.ui-cu-head__main { display: flex; flex-direction: column; flex: 1 1 0; min-width: 0; }
.ui-cu-head__top { display: flex; align-items: center; gap: 24px; min-height: 56px; }
.ui-cu-head__name { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ui-cu-head__meta { margin: 2px 0 0; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ui-muted); overflow-wrap: anywhere; }
.ui-cu-ilink { display: inline-flex; align-items: center; min-height: 44px; margin: -13px 0; color: var(--ui-brand); font-weight: 600; text-decoration: none; }
.ui-cu-ilink:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; border-radius: 4px; }
@media (hover: hover) { .ui-cu-ilink:hover { text-decoration: underline; } }
.ui-cu-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ui-cu-badge { display: inline-flex; }
.ui-cu-badge[hidden], .ui-cu-more-badges[hidden] { display: none; }
.ui-cu-more-badges { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; margin: -10px 0; padding: 0 8px; border: 0; border-radius: var(--ui-radius-pill); background: transparent; color: var(--ui-brand); font-family: var(--ui-font); font-size: 12px; line-height: 16px; font-weight: 700; cursor: pointer; }
.ui-cu-more-badges:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: -2px; }
/* The phone's actions: Primary lg full width, then a full row of two. */
.ui-cu-actions-phone { display: flex; flex-direction: column; gap: 12px; flex: 1 1 100%; margin-top: 4px; }
.ui-cu-actions-phone__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ui-cu-actions-phone__row--one { grid-template-columns: minmax(0, 1fr); }
.ui-cu-actions-phone__row .ui-btn { width: 100%; padding: 0 12px; }
.ui-cu-actions { flex-wrap: wrap; justify-content: flex-end; flex: none; gap: 12px; }
/* Phone: the breadcrumb and the header are one white band, edge to edge. */
.ui-cu--record .ui-cu-crumb {
  margin: calc(-1 * var(--ui-page-pad)) calc(-1 * (var(--ui-page-pad) + var(--ui-safe-right))) 0 calc(-1 * (var(--ui-page-pad) + var(--ui-safe-left)));
  padding: 4px calc(var(--ui-page-pad) + var(--ui-safe-right)) 0 calc(var(--ui-page-pad) + var(--ui-safe-left));
  background: var(--ui-surface);
}
.ui-cu--record .ui-cu-head {
  margin: -12px calc(-1 * (var(--ui-page-pad) + var(--ui-safe-right))) 0 calc(-1 * (var(--ui-page-pad) + var(--ui-safe-left)));
  padding: 8px calc(var(--ui-page-pad) + var(--ui-safe-right)) 16px calc(var(--ui-page-pad) + var(--ui-safe-left));
  border-width: 0 0 1px;
  border-radius: 0;
  box-shadow: none;
}
@media (min-width: 768px) {
  .ui-cu--record .ui-cu-crumb { margin: 0; padding: 0; background: transparent; }
  .ui-cu--record .ui-cu-head { margin: 0; padding: 24px; border-width: 1px; border-radius: var(--ui-radius-card); box-shadow: var(--ui-shadow-1); }
  .ui-cu-head { flex-wrap: nowrap; gap: 20px; padding: 24px; }
  .ui-cu-head__top { flex-wrap: wrap; row-gap: 12px; min-height: 44px; }
  .ui-cu-head__name { flex: 1 1 240px; font-size: 28px; line-height: 34px; }
  .ui-cu-head__meta { font-size: 15px; line-height: 22px; color: var(--ui-slate); font-weight: 400; }
  .ui-cu-badges { margin-top: 14px; }
}

/* ── KPI tiles: 2 x 2 below 1024, 4 across from 1024 (each opens its tab) ── */
.ui-cu-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; }
.ui-cu-kpi.ui-tile { justify-content: space-between; gap: 4px; min-height: 104px; padding: 14px; }
.ui-cu-kpi__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ui-cu-kpi__label { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ui-slate); }
.ui-cu-kpi__go { display: none; color: var(--ui-muted); }
.ui-cu-kpi__value { font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ui-cu-kpi__value--text { font-variant-numeric: normal; }
.ui-cu-kpi--danger .ui-cu-kpi__value { color: var(--ui-danger); }
.ui-cu-kpi__meta { overflow-wrap: anywhere; }
@media (min-width: 768px) {
  .ui-cu-kpis { gap: var(--ui-gap); }
  .ui-cu-kpi.ui-tile { min-height: 120px; padding: 20px; }
  .ui-cu-kpi__label { font-size: 14px; line-height: 20px; }
  .ui-cu-kpi__go { display: inline-block; }
  .ui-cu-kpi__value { font-size: 28px; line-height: 34px; }
}
@media (min-width: 1024px) { .ui-cu-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1440px) { .ui-cu-kpi__value { font-size: 36px; line-height: 40px; letter-spacing: -0.02em; } }

/* ── Record tabs: the ONE row allowed to scroll sideways, on the phone, with a
   16 px fade at its edge; underline tabs at every width. ─────────────────── */
.ui-cu-tabwrap { position: relative; margin: 4px calc(-1 * (var(--ui-page-pad) + var(--ui-safe-right))) 0 calc(-1 * (var(--ui-page-pad) + var(--ui-safe-left))); background: var(--ui-surface); border-top: 1px solid var(--ui-line); }
.ui-cu-tabwrap > .ui-cu-tabs { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: none; }
.ui-cu-tabwrap > .ui-cu-tabs::-webkit-scrollbar { display: none; }
.ui-cu-tabs.ui-tabs { display: flex; gap: 4px; padding: 0 calc(var(--ui-page-pad) + var(--ui-safe-right)) 0 calc(var(--ui-page-pad) + var(--ui-safe-left)); border-bottom: 1px solid var(--ui-line); }
.ui-cu-tabs .ui-tab { flex: none; flex-direction: row; gap: 8px; height: 48px; margin-bottom: -1px; padding: 0 14px; border-radius: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ui-slate); font-size: 15px; line-height: 22px; box-shadow: none; }
.ui-cu-tabs .ui-tab .ui-count { min-width: 20px; height: 20px; padding: 0 6px; background: var(--ui-brand-50); color: var(--ui-brand); font-size: 12px; line-height: 16px; }
.ui-cu-tabs .ui-tab[aria-current="page"] { background: transparent; color: var(--ui-ink); border-bottom-color: var(--ui-brand); box-shadow: none; }
.ui-cu-tabs .ui-tab[aria-current="page"] .ui-count { color: var(--ui-brand); }
.ui-cu-tabfade { position: absolute; top: 0; right: 0; bottom: 1px; width: 16px; pointer-events: none; background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--ui-surface)); }
@media (hover: hover) { .ui-cu-tabs .ui-tab[aria-current="page"]:hover { color: var(--ui-ink); } }
@media (min-width: 768px) {
  .ui-cu-tabwrap { margin: 16px 0 0; background: transparent; border-top: 0; }
  .ui-cu-tabs.ui-tabs { padding: 0; }
  .ui-cu-tabfade { display: none; }
}

/* ── Overview: stacked on the phone and the portrait tablet; 2 : 1 from 1024 ── */
.ui-cu-panel { margin-top: 4px; }
.ui-cu-overview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.ui-cu-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 768px) { .ui-cu-panel { margin-top: 8px; } .ui-cu-overview, .ui-cu-col { gap: var(--ui-gap); } }
@media (min-width: 1024px) { .ui-cu-overview { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }

.ui-cu-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.ui-cu-card > :not(.ui-cu-card__head):not(.ui-cu-mlist):not(.ui-cu-frow):not(.ui-cu-card__foot):not(.ui-cu-undo) { margin-left: 16px; margin-right: 16px; }
.ui-cu-card > :last-child:not(.ui-cu-mlist):not(.ui-cu-card__foot):not(.ui-cu-frow) { margin-bottom: 16px; }
.ui-cu-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px; }
.ui-cu-card__titles { display: flex; flex-direction: column; min-width: 0; }
.ui-cu-card__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 4px; border-top: 1px solid var(--ui-line); }
.ui-cu-card > .ui-cu-card__foot { margin: 8px 0 0; }
.ui-cu-card > .ui-btn--tertiary { align-self: flex-start; margin-left: 4px; }
.ui-cu-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; }
.ui-cu-note > .ui-i { margin-top: 1px; color: var(--ui-muted); }
@media (min-width: 768px) {
  .ui-cu-card > :not(.ui-cu-card__head):not(.ui-cu-mlist):not(.ui-cu-frow):not(.ui-cu-card__foot):not(.ui-cu-undo) { margin-left: 20px; margin-right: 20px; }
  .ui-cu-card > :last-child:not(.ui-cu-mlist):not(.ui-cu-card__foot):not(.ui-cu-frow) { margin-bottom: 20px; }
  .ui-cu-card__head { padding: 20px 20px 12px; }
  .ui-cu-card__foot { padding: 8px 12px; }
  .ui-cu-card > .ui-btn--tertiary { margin-left: 8px; }
}

/* Money rows: quotes and open invoices. */
.ui-cu-mlist { margin: 0; padding: 0; list-style: none; }
.ui-cu-mrow { display: flex; flex-direction: column; border-top: 1px solid var(--ui-line); }
.ui-cu-mrow__link { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px; color: var(--ui-ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.ui-cu-mrow__link:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: -2px; }
.ui-cu-mrow__icon { color: var(--ui-muted); }
.ui-cu-mrow__text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.ui-cu-mrow__line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 24px; }
.ui-cu-mrow__name { font-size: 15px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.ui-cu-mrow__name.ui-mono { font-size: 14px; line-height: 20px; }
.ui-cu-mrow__link > .ui-cu-amt { flex: none; text-align: right; }
.ui-cu-mrow__acts { display: flex; padding: 0 16px 12px; }
.ui-cu-mrow__acts .ui-btn { flex: 1 1 auto; }
@media (hover: hover) { .ui-cu-mrow__link:hover { background: var(--ui-surface-2); } .ui-cu-mrow__link:hover .ui-cu-mrow__name { color: var(--ui-brand); } }
@media (min-width: 768px) {
  .ui-cu-mrow { flex-direction: row; align-items: center; }
  .ui-cu-mrow__link { flex: 1 1 auto; min-width: 0; padding: 10px 20px; }
  .ui-cu-mrow__acts { flex: none; padding: 0 20px 0 0; }
  .ui-cu-mrow__acts .ui-btn { flex: none; }
}

/* Subscription. */
.ui-cu-sub { display: flex; flex-direction: column; gap: 4px; }
.ui-cu-sub + .ui-cu-sub { padding-top: 12px; border-top: 1px solid var(--ui-line); }
.ui-cu-sub__line { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.ui-cu-sub__amt { font-size: 20px; line-height: 28px; font-weight: 700; white-space: nowrap; }
.ui-cu-sub > .ui-btn--tertiary { align-self: flex-start; margin-left: -12px; }

/* Feature switches: 64 px rows, the switch's 60 x 44 hit area at the right. */
.ui-cu-frow { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 6px 6px 6px 16px; border-top: 1px solid var(--ui-line); }
.ui-cu-frow__text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.ui-cu-frow__label { font-size: 15px; line-height: 22px; font-weight: 600; }
.ui-cu-frow .ui-switch[aria-busy="true"] { cursor: progress; }
.ui-cu-undo { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 8px 4px 16px; border-top: 1px solid var(--ui-line); background: var(--ui-success-50); color: var(--ui-ink); font-size: 14px; line-height: 20px; font-weight: 500; }
.ui-cu-undo > .ui-i { color: var(--ui-success); }
.ui-cu-undo > span { flex: 1 1 auto; min-width: 0; }
@media (min-width: 768px) { .ui-cu-frow { padding-left: 20px; } .ui-cu-undo { padding-left: 20px; } }

/* Licence. */
.ui-cu-key { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 4px 4px 14px; border: 1px solid var(--ui-line); border-radius: var(--ui-radius-control); background: var(--ui-surface-2); }
.ui-cu-key > .ui-i { color: var(--ui-muted); }
.ui-cu-key__value { flex: 1 1 auto; min-width: 0; font-weight: 600; letter-spacing: .02em; overflow-wrap: anywhere; }
.ui-cu-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin-top: 12px; margin-bottom: 0; }
.ui-cu-facts:empty { display: none; }
.ui-cu-facts dd { margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; overflow-wrap: anywhere; }
.ui-cu-domains { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.ui-cu-domains__list { display: flex; flex-wrap: wrap; gap: 8px; }
.ui-cu-domains__list .ui-badge { white-space: normal; height: auto; min-height: 24px; overflow-wrap: anywhere; }

/* Contact, Account, the Danger zone, the Dealer tab. */
.ui-cu-person { margin-bottom: 4px; }
.ui-cu-email { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.ui-cu-email > .ui-i { color: var(--ui-muted); }
/* The address is a mailto link: a 44 px tall target (11 + 22 + 11), still one line with an ellipsis. */
.ui-cu-email__value { display: block; flex: 1 1 auto; min-width: 0; padding: 11px 0; overflow: hidden; color: var(--ui-ink); font-size: 15px; line-height: 22px; text-decoration: none; white-space: nowrap; text-overflow: ellipsis; }
@media (hover: hover) { .ui-cu-email__value:hover { color: var(--ui-brand); text-decoration: underline; } }
.ui-cu-referred { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 44px; }
.ui-cu-referred > .ui-btn--tertiary { margin-left: -6px; }
.ui-cu-account { display: flex; flex-direction: column; gap: 12px; }
.ui-cu-account + .ui-cu-account { margin-top: 16px; }
.ui-cu-account p { margin: 0; }
.ui-cu-danger p { margin: 0; }
.ui-cu-linkrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ui-line); }
.ui-cu-linkrow > .ui-small { flex: 1 1 100%; }
.ui-cu-linkrow__url { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }

/* ── Overlays ───────────────────────────────────────────────────────────── */
/* Edit details: the kit's drawer; full screen on the phone, clear of the status bar. */
.ui-cu-drawer .ui-drawer__head { padding-top: var(--ui-safe-top); min-height: calc(64px + var(--ui-safe-top)); }
.ui-cu-drawer__title { min-width: 0; overflow-wrap: anywhere; }
.ui-cu-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.ui-cu-input--short { max-width: 140px; }
.ui-cu-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.ui-cu-fieldset > .ui-label { padding: 0; }
.ui-cu-frow--form { min-height: 56px; padding: 4px 0; border-top: 1px solid var(--ui-line); }
.ui-cu-frow--form .ui-switch { margin-right: -8px; }
.ui-cu-drop { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-height: 96px; padding: 12px 14px; border: 1.5px dashed var(--ui-input); border-radius: var(--ui-radius-control); background: var(--ui-surface-2); }
.ui-cu-drop.is-dragging { border-color: var(--ui-brand); background: var(--ui-brand-50); }
.ui-cu-drop__show { display: flex; align-items: center; gap: 12px; flex: 1 1 200px; min-width: 0; }
.ui-cu-drop__img { flex: none; width: 48px; height: 48px; border: 1px solid var(--ui-line); border-radius: 8px; background: var(--ui-surface); object-fit: contain; }
.ui-cu-drop__text { min-width: 0; font-size: 13px; line-height: 18px; color: var(--ui-slate); overflow-wrap: anywhere; }
.ui-cu-savewrap { display: contents; }
@media (min-width: 768px) { .ui-cu-drawer .ui-drawer__head { padding-top: 0; min-height: 64px; } }

/* More: a bottom sheet of 56 px rows on the phone, a menu under the button from 768. */
.ui-cu-more[hidden] { display: none; }
.ui-cu-more__sheet { gap: 12px; }
.ui-cu-more__rows { display: flex; flex-direction: column; }
.ui-cu-more--sheet .ui-cu-more__row { min-height: 56px; padding: 0 12px; }
.ui-cu-more--sheet .ui-cu-more__row + .ui-cu-more__row { border-top: 1px solid var(--ui-line); }
.ui-cu-more--menu { position: fixed; z-index: 61; top: var(--cu-pop-top, 72px); right: var(--cu-pop-right, 24px); margin: 0; animation: ui-pop-in .16s ease-out; }
.ui-cu-more__row { width: 100%; }

@media (prefers-reduced-motion: reduce) { .ui-cu-more--menu { animation: none; } }

/* ── Which parts show at which width (last, so they win) ─────────────────── */
.ui-cu-wide, .ui-cu-desk,
.ui-cu-table .ui-cu-wide, .ui-cu-table .ui-cu-desk,
.ui-cu-table td.ui-cu-desk, .ui-cu-table th.ui-cu-desk { display: none; }
@media (min-width: 768px) {
  .ui-cu-phone, .ui-cu-table .ui-cu-phone { display: none; }
  .ui-cu-wide { display: revert; }
  .ui-cu-actions.ui-cu-wide { display: flex; }
  .ui-cu-crumb__here.ui-cu-wide { display: inline; }
  .ui-cu-result.ui-cu-wide { display: inline; }
  .ui-cu-foot > .ui-small.ui-cu-wide { display: inline; }
  .ui-cu-table a.ui-cu-wide { display: inline-flex; }
}
@media (min-width: 1440px) {
  .ui-cu-nodesk, .ui-cu-table .ui-cu-nodesk { display: none; }
  .ui-cu-desk { display: revert; }
  .ui-cu-table th.ui-cu-desk, .ui-cu-table td.ui-cu-desk { display: table-cell; }
  .ui-cu-org__meta.ui-cu-desk { display: block; }
}

/* The record page's heading before the record is drawn: the address asked for. */
.ui-cu-idhead { margin: 4px 0 16px; overflow-wrap: anywhere; }
