/* =====================================================================
   Robot Café shared library — composition, navigation, overlays, domain
   ===================================================================== */

/* ---------- Page header ---------- */
.rc-page-head { display: flex; flex-direction: column; gap: var(--rc-space-4); margin-bottom: var(--rc-space-6); }
.rc-page-head__text { display: flex; flex-direction: column; gap: var(--rc-title-to-body); min-width: 0; }
.rc-page-head__text .rc-eyebrow { margin-bottom: 0; }
.rc-page-head__text .rc-title,
.rc-page-head__text .rc-display { margin-top: var(--rc-title-to-body); }
.rc-page-head__text .rc-lede { margin-top: var(--rc-title-to-body); }
.rc-page-head__aside { display: flex; flex-wrap: wrap; gap: var(--rc-action-gap); align-items: center; }
@media (min-width: 768px) {
  .rc-page-head--split { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: var(--rc-space-6); }
}
.rc-page-head--center { text-align: center; align-items: center; }
.rc-page-head--center .rc-lede { margin-inline: auto; }

/* Section heading inside a page */
.rc-section { display: flex; flex-direction: column; gap: var(--rc-head-to-content); }
.rc-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--rc-space-4); flex-wrap: wrap; }
.rc-section-head__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

/* ---------- Cards ---------- */
.rc-card {
  background: var(--rc-surface); border: 1px solid var(--rc-line); border-radius: var(--rc-radius-lg);
  box-shadow: var(--rc-shadow-1); padding: var(--rc-card-pad); min-width: 0;
}
.rc-card--flush { padding: 0; overflow: hidden; }
.rc-card--flat { box-shadow: none; }
.rc-card--soft { background: var(--rc-surface-soft); box-shadow: none; }
.rc-card--feature { background: var(--rc-wash-feature); border-color: var(--rc-blue-100); padding: var(--rc-card-pad-lg); }
.rc-card--raised { box-shadow: var(--rc-shadow-2); }
.rc-card--interactive { position: relative; text-decoration: none; color: inherit; display: block; transition: border-color var(--rc-dur-micro) var(--rc-ease-standard), box-shadow var(--rc-dur-micro) var(--rc-ease-standard); }
@media (hover: hover) { .rc-card--interactive:hover { border-color: var(--rc-blue-200); box-shadow: var(--rc-shadow-2); } }
.rc-card--interactive:focus-visible { outline: none; box-shadow: var(--rc-focus-ring); }
.rc-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--rc-space-3); }
.rc-card__head + * { margin-top: var(--rc-head-to-content); }
.rc-card__titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rc-card__title { font-size: 1.0625rem; line-height: 1.4; font-weight: 740; letter-spacing: -.012em; }
.rc-card__desc { font-size: .9375rem; line-height: 1.5; color: var(--rc-ink-600); }
.rc-card__foot { margin-top: var(--rc-content-to-actions); padding-top: var(--rc-space-4); border-top: 1px solid var(--rc-line); }
.rc-card__section + .rc-card__section { margin-top: var(--rc-space-5); padding-top: var(--rc-space-5); border-top: 1px solid var(--rc-line); }

/* Next-action card */
.rc-next {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: var(--rc-card-pad-lg); border-radius: var(--rc-radius-lg); background: var(--rc-wash-feature); border: 1px solid var(--rc-blue-100);
}
.rc-next__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #fff; color: var(--rc-blue-600); box-shadow: var(--rc-shadow-1); }
.rc-next__icon svg { width: 22px; height: 22px; }
.rc-next__body { display: flex; flex-direction: column; gap: 6px; }
.rc-next__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--rc-action-gap); justify-content: center; margin-top: 4px; }
@media (min-width: 768px) {
  .rc-next { grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; }
  .rc-next__actions { grid-column: auto; margin-top: 0; justify-content: flex-end; } /* row exception: card-level CTA */
}

/* Metrics */
.rc-metric { display: flex; flex-direction: column; gap: 6px; padding: var(--rc-card-pad); background: #fff; border: 1px solid var(--rc-line); border-radius: var(--rc-radius-lg); box-shadow: var(--rc-shadow-1); min-width: 0; }
.rc-metric__label { font-size: var(--rc-text-meta); color: var(--rc-ink-600); font-weight: 650; }
.rc-metric__value { font-size: var(--rc-text-amount-lg); line-height: 1.15; font-weight: 780; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rc-metric__value small { font-size: .9375rem; font-weight: 700; color: var(--rc-ink-600); margin-right: 4px; letter-spacing: 0; }
.rc-metric__note { font-size: var(--rc-text-meta); color: var(--rc-ink-500); }
@media (max-width: 599px) { .rc-metric { padding: 14px; } .rc-metric__value { font-size: 1.375rem; } }

/* Key/value */
.rc-kv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.rc-kv__row { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 12px; align-items: baseline; }
.rc-kv dt { font-size: var(--rc-text-meta); color: var(--rc-ink-600); font-weight: 600; }
.rc-kv dd { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.rc-kv--stacked .rc-kv__row { grid-template-columns: 1fr; gap: 2px; }

/* Summary lines (money) */
.rc-lines { display: flex; flex-direction: column; gap: 10px; }
.rc-line { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.rc-line > :last-child { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 650; }
.rc-line--total { padding-top: 12px; border-top: 1px solid var(--rc-line); font-size: 1.0625rem; font-weight: 780; }
.rc-line--total > :last-child { font-weight: 800; }

/* ---------- Lists & tables ---------- */
.rc-list { display: flex; flex-direction: column; }
.rc-list__item { display: flex; align-items: center; gap: 14px; padding: var(--rc-list-row-y) var(--rc-list-row-x); border-top: 1px solid var(--rc-line); min-height: 64px; }
.rc-list__item:first-child { border-top: 0; }
.rc-list__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rc-list__title { font-weight: 720; line-height: 1.4; overflow-wrap: anywhere; }
.rc-list__aside { flex: none; display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
/* DG-054: long unbroken values (provider URLs) must wrap inside list asides */
.rc-list__aside > .rc-code,
.rc-list__aside > .small {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
a.rc-list__item { text-decoration: none; color: inherit; transition: background-color var(--rc-dur-micro) var(--rc-ease-standard); }
a.rc-list__item:hover { background: var(--rc-blue-25); }
a.rc-list__item:focus-visible { outline: none; box-shadow: inset var(--rc-focus-ring); border-radius: 0; }
.rc-chevron { width: 18px; height: 18px; color: var(--rc-ink-400); flex: none; }

.rc-table-wrap { width: 100%; }
.rc-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.rc-table th { text-align: left; font-size: .8125rem; line-height: 1.3; font-weight: 700; color: var(--rc-ink-600); padding: 12px 16px; border-bottom: 1px solid var(--rc-line-strong); background: var(--rc-surface-soft); white-space: nowrap; }
.rc-table td { padding: 14px 16px; border-bottom: 1px solid var(--rc-line); vertical-align: middle; }
.rc-table tr:last-child td { border-bottom: 0; }
.rc-table .is-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-table .is-action { text-align: right; width: 1%; white-space: nowrap; }
.rc-table tbody tr.is-link { cursor: pointer; transition: background-color var(--rc-dur-micro) var(--rc-ease-standard); }
.rc-table tbody tr.is-link:hover { background: var(--rc-blue-25); }
.rc-table .rc-cell-title { font-weight: 720; display: block; }
.rc-table .rc-cell-sub { font-size: var(--rc-text-meta); color: var(--rc-ink-500); display: block; }
@media (max-width: 767px) {
  .rc-table--responsive thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rc-table--responsive, .rc-table--responsive tbody, .rc-table--responsive tr, .rc-table--responsive td { display: block; width: 100%; }
  /* Phone card rows: title full width, then labelled facts, badges inline, amounts pushed right (G2-06/G2-14) */
  .rc-table--responsive tr { padding: 14px 16px; border-top: 1px solid var(--rc-line); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  .rc-table--responsive td { flex: 1 1 100%; min-width: 0; width: auto; }
  .rc-table--responsive tr:first-child { border-top: 0; }
  .rc-table--responsive td { padding: 0; border: 0; }
  .rc-table--responsive td.is-primary { flex-basis: 100%; }
  .rc-table--responsive td.is-num { text-align: right; }
  .rc-table--responsive td[data-label]:not(.is-primary):not(.is-num):not(.is-action)::before { content: attr(data-label) " · "; color: var(--rc-ink-500); font-size: .8125rem; font-weight: 650; }
  .rc-table--responsive td.is-wide { flex-basis: 100%; }
  .rc-table--responsive td.is-badge { flex: 0 0 auto; }
  .rc-table--responsive td.is-num { flex: 0 0 auto; text-align: left; }
  .rc-table--responsive td.is-num:not(.is-money)::before { content: attr(data-label) " · "; color: var(--rc-ink-500); font-size: .8125rem; font-weight: 650; }
  .rc-table--responsive td.is-money { flex: 1 0 auto; margin-left: auto; text-align: right; }
  .rc-table--responsive td.is-badge::before { content: none !important; }
  .rc-table--responsive td.is-action { flex-basis: 100%; text-align: center; margin-top: 4px; }
  .rc-table--responsive td.is-action .rc-btn { width: 100%; }
}

/* Pagination */
.rc-pager { display: flex; align-items: center; justify-content: center; gap: var(--rc-space-3); padding: var(--rc-space-4) 0 0; flex-wrap: wrap; }
.rc-pager__status { font-size: var(--rc-text-meta); color: var(--rc-ink-600); font-weight: 650; min-width: 110px; text-align: center; }

/* Empty / loading / error */
.rc-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: var(--rc-space-8) var(--rc-space-4); }
.rc-empty__icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--rc-wash-feature); border: 1px solid var(--rc-blue-100); color: var(--rc-blue-600); margin-bottom: 6px; }
.rc-empty__icon svg { width: 26px; height: 26px; }
.rc-empty__icon img { width: 34px; height: 34px; }
.rc-empty__title { font-size: 1.0625rem; font-weight: 740; }
.rc-empty__body { font-size: .9375rem; color: var(--rc-ink-600); max-width: 30rem; }
.rc-empty .rc-actions { margin-top: 12px; }
.rc-skeleton { display: block; border-radius: 8px; background: linear-gradient(90deg, #EEF3F6 0%, #F7FAFC 40%, #EEF3F6 80%); background-size: 200% 100%; animation: rc-shimmer 1.4s ease-in-out infinite; }
.rc-skeleton--line { height: 14px; }
.rc-skeleton--title { height: 22px; width: 40%; }
.rc-skeleton--block { height: 88px; border-radius: 14px; }
@keyframes rc-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .rc-skeleton { animation: none; } }

/* ---------- Tabs ---------- */
.rc-tabs { position: relative; display: flex; gap: 4px; border-bottom: 1px solid var(--rc-line-strong); overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.rc-tabs::-webkit-scrollbar { display: none; }
.rc-tab {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px;
  border: 0; background: none; cursor: pointer; font-weight: 680; color: var(--rc-ink-600); white-space: nowrap; text-decoration: none; scroll-snap-align: start;
  border-radius: 10px 10px 0 0; transition: color var(--rc-dur-micro) var(--rc-ease-standard), background-color var(--rc-dur-micro);
}
.rc-tab::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--rc-grad-primary); transform: scaleX(0); transition: transform var(--rc-dur-micro-slow) var(--rc-ease-standard); }
.rc-tab:hover { color: var(--rc-ink-900); background: var(--rc-blue-25); }
.rc-tab[aria-selected="true"], .rc-tab[aria-current="page"] { color: var(--rc-ink-900); font-weight: 760; }
.rc-tab[aria-selected="true"]::after, .rc-tab[aria-current="page"]::after { transform: scaleX(1); }
.rc-tab:focus-visible { outline: none; box-shadow: inset var(--rc-focus-ring); }
.rc-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--rc-neutral-bg); color: var(--rc-ink-700); font-size: .75rem; font-weight: 780; font-variant-numeric: tabular-nums; }
.rc-count--alert { background: var(--rc-warning-bg); color: var(--rc-warning-fg); box-shadow: inset 0 0 0 1px var(--rc-warning-line); }
.rc-count--danger { background: var(--rc-danger-bg); color: var(--rc-danger-fg); box-shadow: inset 0 0 0 1px var(--rc-danger-line); }
.rc-tabpanel { padding-top: var(--rc-space-5); }
.rc-tabpanel:focus-visible { outline: none; }
.rc-scroll-x { position: relative; }
.rc-scroll-x::after { content: ""; position: absolute; right: 0; top: 0; bottom: 1px; width: 28px; pointer-events: none; background: linear-gradient(90deg, rgba(246,249,251,0), var(--rc-page)); }

/* ---------- Filter bar & chips ---------- */
.rc-filterbar { display: grid; gap: var(--rc-space-3); grid-template-columns: 1fr; padding: var(--rc-space-4); border: 1px solid var(--rc-line); border-radius: var(--rc-radius-lg); background: #fff; box-shadow: var(--rc-shadow-1); }
@media (min-width: 768px) { .rc-filterbar { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; } }
.rc-filterbar .rc-field { gap: 4px; }
.rc-filterbar .rc-label { font-size: .8125rem; color: var(--rc-ink-600); }
.rc-filterbar .rc-input, .rc-filterbar .rc-select { min-height: 44px; }
.rc-filterbar__actions { display: flex; gap: 8px; align-items: center; justify-content: center; }
@media (min-width: 768px) { .rc-filterbar__actions { justify-content: flex-end; } }
.rc-filter-summary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: var(--rc-space-3); }
.rc-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: var(--rc-radius-pill);
  border: 1.5px solid transparent; background: var(--rc-neutral-bg); color: var(--rc-ink-700); font-size: .9375rem; font-weight: 680; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color var(--rc-dur-micro) var(--rc-ease-standard), box-shadow var(--rc-dur-micro), color var(--rc-dur-micro);
}
.rc-chip:hover { background: var(--rc-blue-50); color: var(--rc-ink-900); }
.rc-chip[aria-pressed="true"], .rc-chip[aria-current="true"] { background: linear-gradient(#fff,#fff) padding-box, var(--rc-grad-primary) border-box; color: var(--rc-blue-800); box-shadow: var(--rc-shadow-1); }
.rc-chip:focus-visible { outline: none; box-shadow: var(--rc-focus-ring); }
.rc-chip--removable { background: var(--rc-blue-50); border-color: var(--rc-blue-100); color: var(--rc-blue-800); padding-right: 6px; }
.rc-chip--removable svg { width: 16px; height: 16px; }
.rc-chip--removable .rc-chip__x { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.rc-chip--removable:hover .rc-chip__x { background: var(--rc-blue-100); }
.rc-chip-nav { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; scroll-snap-type: x proximity; }
.rc-chip-nav::-webkit-scrollbar { display: none; }
.rc-chip-nav .rc-chip { scroll-snap-align: start; min-height: 40px; }

/* ---------- App shells ---------- */
.rc-app { min-height: 100vh; min-height: 100dvh; }
.rc-main { padding: var(--rc-page-top) var(--rc-gutter) var(--rc-space-10); max-width: var(--rc-content-max); width: 100%; margin-inline: auto; }
.rc-main--narrow { max-width: calc(var(--rc-content-narrow) + 2 * var(--rc-gutter)); }
.rc-main--form { max-width: calc(36rem + 2 * var(--rc-gutter)); }
.rc-main:focus { outline: none; }

/* Workspace shell: sidebar ≥1024, top bar + drawer below — never match guest rc-shell bodies.
   The ≥1024 sidebar+main grid belongs on .shell-frame.rc-shell--composed (app.css), not on
   body. A 2-column body grid auto-places .shell-frame into the 256px track (especially after
   the demo-strip body child was removed), collapsing .rc-shell__body and zero-width #page-title
   / flash alerts so Playwright reports them as hidden while glyphs still paint. */
body.shell-workspace.rc-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  grid-template-columns: none;
}
.rc-sidebar { display: none; }
@media (min-width: 1024px) {
  body.shell-workspace .rc-sidebar { display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 22px 14px 16px; background: rgba(255,255,255,.86); border-right: 1px solid var(--rc-line); overflow-y: auto; }
  body.shell-workspace .rc-shell .rc-topbar { display: none; }
}
.rc-brand { display: flex; flex-direction: column; gap: 8px; padding: 0 10px 18px; text-decoration: none; color: inherit; }
.rc-brand img.rc-logo { width: 138px; height: auto; }
.rc-brand__context { font-size: .8125rem; font-weight: 700; color: var(--rc-ink-600); letter-spacing: .01em; }
.rc-brand__context strong { color: var(--rc-ink-900); }
.rc-nav { display: flex; flex-direction: column; gap: var(--rc-nav-gap); }
.rc-nav__label { font-size: .75rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--rc-ink-500); padding: 14px 12px 6px; }
.rc-nav__item {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: var(--rc-nav-pad-y) var(--rc-nav-pad-x);
  border-radius: 12px; color: var(--rc-ink-700); text-decoration: none; font-weight: 650; font-size: .9688rem;
  transition: background-color var(--rc-dur-micro) var(--rc-ease-standard), color var(--rc-dur-micro);
}
.rc-nav__item svg { width: 20px; height: 20px; flex: none; color: var(--rc-ink-500); transition: color var(--rc-dur-micro); }
.rc-nav__item:hover { background: var(--rc-blue-25); color: var(--rc-ink-900); }
.rc-nav__item:hover svg { color: var(--rc-blue-600); }
.rc-nav__item[aria-current="page"] { background: var(--rc-blue-50); color: var(--rc-blue-800); font-weight: 760; }
.rc-nav__item[aria-current="page"] svg { color: var(--rc-blue-600); }
.rc-nav__item[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--rc-grad-primary); }
.rc-nav__item:focus-visible { outline: none; box-shadow: var(--rc-focus-ring); }
.rc-nav__item .rc-count { margin-left: auto; }
.rc-sidebar__foot { margin-top: auto; padding-top: 16px; }
.rc-account {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 1px solid var(--rc-line); border-radius: 14px; background: #fff; cursor: pointer; text-align: left;
  transition: border-color var(--rc-dur-micro), box-shadow var(--rc-dur-micro);
}
.rc-account:hover { border-color: var(--rc-blue-200); box-shadow: var(--rc-shadow-1); }
.rc-account:focus-visible { outline: none; box-shadow: var(--rc-focus-ring); }
.rc-avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--rc-wash-feature); border: 1px solid var(--rc-blue-100); color: var(--rc-blue-800); font-size: .8125rem; font-weight: 800; }
.rc-account__text { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.rc-account__name { font-weight: 740; font-size: .9375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-account__role { font-size: .8125rem; color: var(--rc-ink-500); }
.rc-account svg { width: 18px; height: 18px; color: var(--rc-ink-500); margin-left: auto; flex: none; }

/* Top bar (phone/tablet workspace; guest storefront at all sizes) */
.rc-topbar { position: sticky; top: 0; z-index: var(--rc-z-nav); display: flex; align-items: center; gap: 10px; min-height: var(--rc-topbar-h); padding: 8px var(--rc-gutter); background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--rc-line); }
.rc-topbar .rc-logo { width: 112px; height: auto; }
.rc-topbar__brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; border-radius: 8px; }
.rc-topbar__context { min-width: 0; font-size: .8125rem; font-weight: 700; color: var(--rc-ink-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 10px; border-left: 1px solid var(--rc-line-strong); }
.rc-topbar__end { margin-left: auto; display: flex; align-items: center; gap: 4px; flex: none; }
@media (min-width: 600px) { .rc-topbar .rc-logo { width: 124px; } }

/* Guest storefront chrome */
.rc-guest-top { justify-content: space-between; }
.rc-guest-top__inner { width: 100%; max-width: var(--rc-guest-max); margin-inline: auto; display: flex; align-items: center; gap: 12px; }
.rc-cobrand { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--rc-ink-600); font-weight: 650; }
.rc-cobrand__mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #F3EEE6; color: #6B4E2E; font-size: .6875rem; font-weight: 800; border: 1px solid #E6DCCD; }
.rc-guest-main { padding: var(--rc-space-4) var(--rc-gutter) 120px; max-width: var(--rc-guest-max); margin-inline: auto; }
.rc-guest-main--task { max-width: calc(34rem + 2 * var(--rc-gutter)); }
.rc-guest-foot { max-width: var(--rc-guest-max); margin: 0 auto; padding: 24px var(--rc-gutter) 40px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; font-size: var(--rc-text-meta); color: var(--rc-ink-500); }
.rc-guest-foot__nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 16px; }
.rc-guest-foot a { color: var(--rc-ink-600); min-height: 44px; display: inline-flex; align-items: center; padding: 4px 2px; }
.rc-guest-top__nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 8px; flex: none; }
@media (max-width: 359px) {
  .rc-guest-top__nav .rc-btn--sm { padding-inline: 10px; font-size: .8125rem; }
}

/* Account / profile menu (popover) */
.rc-menu { position: relative; }
.rc-menu__panel {
  position: absolute; z-index: var(--rc-z-overlay); min-width: 232px; padding: 6px; background: #fff; border: 1px solid var(--rc-line); border-radius: 16px; box-shadow: var(--rc-shadow-3);
  opacity: 0; transform: translateY(4px); visibility: hidden; transition: opacity var(--rc-dur-micro-slow) var(--rc-ease-decelerate), transform var(--rc-dur-micro-slow) var(--rc-ease-decelerate), visibility 0s linear var(--rc-dur-micro-slow);
}
.rc-menu__panel--up { bottom: calc(100% + 8px); left: 0; right: 0; }
.rc-menu__panel--down { top: calc(100% + 8px); right: 0; }
.rc-menu.is-open .rc-menu__panel { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.rc-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 0; background: none; color: var(--rc-ink-700); font-weight: 650; text-decoration: none; cursor: pointer; text-align: left; font-size: .9375rem; }
.rc-menu__item svg { width: 18px; height: 18px; color: var(--rc-ink-500); }
.rc-menu__item:hover, .rc-menu__item:focus-visible { background: var(--rc-blue-50); color: var(--rc-ink-900); outline: none; }
.rc-menu__sep { height: 1px; background: var(--rc-line); margin: 6px 4px; }
.rc-menu__head { padding: 8px 12px 6px; font-size: .8125rem; color: var(--rc-ink-500); font-weight: 650; }

.rc-list__item.is-interest-selected {
  outline: 2px solid var(--rc-blue-500);
  outline-offset: 2px;
  border-radius: var(--rc-radius-md);
}

/* ---------- Dialogs, sheets, drawers (native <dialog>) ---------- */
.rc-dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 0; border-radius: var(--rc-radius-xl);
  background: #fff; color: var(--rc-ink-900); box-shadow: var(--rc-shadow-3); overflow: hidden;
  opacity: 0; transform: translateY(var(--rc-rise)) scale(.985);
  transition: opacity var(--rc-dur-dialog) var(--rc-ease-decelerate), transform var(--rc-dur-dialog) var(--rc-ease-emphasized), overlay var(--rc-dur-dialog) allow-discrete, display var(--rc-dur-dialog) allow-discrete;
}
.rc-dialog[open] { opacity: 1; transform: none; display: flex; flex-direction: column; }
@starting-style { .rc-dialog[open] { opacity: 0; transform: translateY(var(--rc-rise)) scale(.985); } }
.rc-dialog.is-closing { opacity: 0; transform: translateY(4px) scale(.99); transition-duration: var(--rc-dur-exit); transition-timing-function: var(--rc-ease-accelerate); }
.rc-dialog::backdrop { background: rgba(22,51,68,0); transition: background-color var(--rc-dur-dialog) var(--rc-ease-standard), overlay var(--rc-dur-dialog) allow-discrete, display var(--rc-dur-dialog) allow-discrete; }
.rc-dialog[open]::backdrop { background: rgba(22,51,68,.44); }
@starting-style { .rc-dialog[open]::backdrop { background: rgba(22,51,68,0); } }
.rc-dialog.is-closing::backdrop { background: rgba(22,51,68,0); }
.rc-dialog__head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 16px 0 24px; }
.rc-dialog__titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding-top: 8px; }
.rc-dialog__title { font-size: 1.25rem; line-height: 1.3; font-weight: 760; letter-spacing: -.015em; }
.rc-dialog__title:focus { outline: none; }
.rc-dialog__desc { font-size: .9375rem; color: var(--rc-ink-600); }
.rc-dialog__body { padding: 18px 24px 4px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: var(--rc-field-gap); }
/* Sheet dialog: scrollable body, sticky primary action (design manual §16.3) */
.dish-dialog.rc-dialog form.dish-action.rc-dialog__body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  flex-wrap: nowrap;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  gap: var(--rc-field-gap);
}
.dish-dialog.rc-dialog .rc-dialog__foot--sticky {
  position: sticky; bottom: 0; z-index: 2; flex-shrink: 0; margin: 12px -24px 0;
  padding: 18px 24px calc(18px + env(safe-area-inset-bottom)); background: #fff;
  border-top: 1px solid var(--rc-line); box-shadow: 0 -8px 24px rgba(22,51,68,.06);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  width: calc(100% + 48px);
  box-sizing: border-box;
}
.dish-dialog.rc-dialog .rc-dialog__foot--sticky .rc-btn {
  width: 100%;
  max-width: none;
  flex: 1 1 auto;
}
/* Dish dialog lives inside .rc-dish; clip sticky foot so closed/open layers do not hit-test over the card */
.dish-dialog.rc-dialog[open] {
  overflow: hidden;
  contain: layout paint style;
}
.dish-dialog.rc-dialog:not([open]) {
  pointer-events: none;
}
.rc-dialog__foot { padding: 18px 24px 24px; display: flex; flex-wrap: wrap; gap: var(--rc-action-gap); justify-content: center; border-top: 1px solid transparent; }
.rc-dialog__foot.is-scrolled { border-top-color: var(--rc-line); }
@media (max-width: 599px) {
  .rc-dialog__foot { flex-direction: column-reverse; align-items: stretch; }
  .rc-dialog__foot .rc-btn { width: 100%; }
}
.rc-dialog--wide { width: min(760px, calc(100vw - 32px)); }

/* Dish sheet: phone bottom sheet; desktop bounded centred dialog (§16.3) */
@media (min-width: 600px) {
  .dish-dialog.rc-dialog.rc-dialog--sheet {
    width: min(560px, calc(100vw - 32px));
    max-width: min(560px, calc(100vw - 32px));
    max-height: calc(100dvh - 48px);
    margin: auto;
    border-radius: var(--rc-radius-xl);
    transform: translateY(var(--rc-rise)) scale(.985);
  }
  .dish-dialog.rc-dialog.rc-dialog--sheet[open] { transform: none; }
  .dish-dialog.rc-dialog.rc-dialog--sheet .rc-dialog__head::before { display: none; }
  .dish-dialog.rc-dialog .dish-photo.rc-dialog__media,
  .dish-dialog.rc-dialog .dish-placeholder.rc-dialog__media {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 200px;
    min-height: 0;
    object-fit: cover;
    border-radius: var(--rc-radius-md);
  }
  .dish-dialog.rc-dialog .rc-dialog__body .rc-field,
  .dish-dialog.rc-dialog .rc-dialog__body .rc-input,
  .dish-dialog.rc-dialog .rc-dialog__body .option-group {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}
@media (max-width: 599px) {
  /* FP-03 max-height only while open — bare .rc-dialog--sheet display:flex was leaving every closed in-card dialog in the layout tree and intercepting clicks on dish cards beneath it on phones. */
  .dish-dialog.rc-dialog.rc-dialog--sheet[open] {
    max-height: 92dvh;
    overflow: hidden;
  }
  .dish-dialog.rc-dialog.rc-dialog--sheet .dish-photo.rc-dialog__media,
  .dish-dialog.rc-dialog.rc-dialog--sheet .dish-placeholder.rc-dialog__media {
    width: 100%;
    max-height: 150px;
    height: auto;
    object-fit: cover;
  }
}
/* Sheet: bottom sheet on phones, centred dialog ≥600 */
@media (max-width: 599px) {
  .rc-dialog--sheet { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: var(--rc-radius-xl) var(--rc-radius-xl) 0 0; transform: translateY(24px); padding-bottom: env(safe-area-inset-bottom); }
  .rc-dialog--sheet[open] { transform: none; }
  @starting-style { .rc-dialog--sheet[open] { transform: translateY(24px); } }
  .rc-dialog--sheet.is-closing { transform: translateY(24px); }
  .rc-dialog--sheet .rc-dialog__head::before { content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--rc-line-strong); }
}
/* Drawer: right side panel ≥600 (filters, basket, nav), bottom sheet on phone */
.rc-dialog--drawer { }
@media (min-width: 600px) {
  .rc-dialog--drawer { width: min(440px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: var(--rc-radius-xl) 0 0 var(--rc-radius-xl); transform: translateX(24px); }
  .rc-dialog--drawer[open] { transform: none; }
  @starting-style { .rc-dialog--drawer[open] { transform: translateX(24px); } }
  .rc-dialog--drawer.is-closing { transform: translateX(24px); }
  .rc-dialog--drawer .rc-dialog__body { flex: 1; }
}
@media (max-width: 599px) {
  .rc-dialog--drawer { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: var(--rc-radius-xl) var(--rc-radius-xl) 0 0; transform: translateY(24px); }
  .rc-dialog--drawer[open] { transform: none; }
  @starting-style { .rc-dialog--drawer[open] { transform: translateY(24px); } }
  .rc-dialog--drawer.is-closing { transform: translateY(24px); }
}
/* Navigation drawer: left on all sizes */
.rc-dialog--nav { width: min(320px, 88vw); height: 100dvh; max-height: 100dvh; margin: 0 auto 0 0; border-radius: 0 var(--rc-radius-xl) var(--rc-radius-xl) 0; transform: translateX(-24px); }
.rc-dialog--nav[open] { transform: none; }
@starting-style { .rc-dialog--nav[open] { transform: translateX(-24px); } }
.rc-dialog--nav.is-closing { transform: translateX(-24px); }
.rc-dialog--nav .rc-dialog__body { padding: 8px 14px 24px; flex: 1; }
.rc-dialog--nav .rc-dialog__head { padding: 16px 12px 8px 22px; align-items: center; }

/* ---------- Toasts ---------- */
.rc-toasts { position: fixed; z-index: var(--rc-z-toast); left: 0; right: 0; bottom: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.rc-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 480px; width: max-content; min-height: 52px; padding: 10px 10px 10px 16px;
  background: #fff; border: 1px solid var(--rc-line); border-radius: 16px; box-shadow: var(--rc-shadow-3); font-weight: 650; font-size: .9375rem;
  opacity: 0; transform: translateY(var(--rc-rise)); transition: opacity var(--rc-dur-micro-slow) var(--rc-ease-decelerate), transform var(--rc-dur-micro-slow) var(--rc-ease-decelerate);
}
.rc-toast.is-in { opacity: 1; transform: none; }
.rc-toast.is-out { opacity: 0; transform: translateY(4px); transition-duration: var(--rc-dur-exit); transition-timing-function: var(--rc-ease-accelerate); }
.rc-toast svg { width: 20px; height: 20px; flex: none; color: var(--rc-success-dot); }
.rc-toast--info svg { color: var(--rc-info-dot); }
.rc-toast--warning svg { color: var(--rc-warning-dot); }
.rc-toast__msg { flex: 1; min-width: 0; }
@media (max-width: 599px) { .rc-toasts { bottom: 96px; } .rc-toast { width: 100%; } }

/* Route content entrance (purposeful, once per navigation) */
.rc-enter { animation: rc-enter var(--rc-dur-page) var(--rc-ease-decelerate) both; }
@keyframes rc-enter { from { opacity: 0; transform: translateY(calc(var(--rc-rise) / 2)); } to { opacity: 1; transform: none; } }
.rc-reveal { animation: rc-enter var(--rc-dur-dialog) var(--rc-ease-decelerate) both; }
.rc-disclosure { border: 1px solid var(--rc-line); border-radius: var(--rc-radius-md); background: #fff; }
.rc-disclosure > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 16px; cursor: pointer; font-weight: 720; border-radius: inherit; }
.rc-disclosure > summary::-webkit-details-marker { display: none; }
.rc-disclosure > summary svg { width: 18px; height: 18px; transition: transform var(--rc-dur-dialog) var(--rc-ease-standard); color: var(--rc-ink-500); }
.rc-disclosure[open] > summary svg { transform: rotate(180deg); }
.rc-disclosure > summary:focus-visible { outline: none; box-shadow: var(--rc-focus-ring); }
.rc-disclosure__body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; animation: rc-enter var(--rc-dur-dialog) var(--rc-ease-decelerate) both; }
/* Card body rhythm: consecutive body blocks get related spacing (head/foot handled above) */
.rc-card > :not(.rc-card__head):not(.rc-card__foot) + :not(.rc-card__foot) { margin-top: var(--rc-space-4); }
/* Utilities used by compositions */
p.rc-center, div.rc-center:not(.rc-qr), span.rc-center { text-align: center; }
.rc-mt { margin-top: var(--rc-space-6); }
.rc-pad { padding: var(--rc-space-3) var(--rc-space-4); }
.rc-split--aside { }
/* Workspace: the sidebar takes 256px, so side-by-side splits wait for wider canvases */
@media (min-width: 1024px) and (max-width: 1279px) { .rc-shell .rc-split:not(.rc-split--even) { grid-template-columns: minmax(0, 1fr); } }
.rc-form-page { max-width: 44rem; }
.rc-grid--metrics-3 { }
@media (min-width: 768px) { .rc-grid--metrics-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rc-metric--na { background: var(--rc-surface-soft); border-style: dashed; box-shadow: none; }
.rc-metric__value--na { font-size: 1.25rem; color: var(--rc-ink-600); letter-spacing: 0; }
.rc-cell-note { color: var(--rc-review-fg); font-weight: 650; }
.rc-card--warn { border-color: var(--rc-warning-line, #EBCB86); background: linear-gradient(180deg, #FFFBF1 0%, #fff 60%); }
.rc-quote { margin: 0; padding: 12px 16px; border-left: 3px solid var(--rc-blue-200); background: var(--rc-blue-25); border-radius: 0 12px 12px 0; font-size: .9688rem; line-height: 1.55; color: var(--rc-ink-700); }
.rc-a4-wrap { display: flex; flex-direction: column; gap: var(--rc-space-4); padding: var(--rc-space-6); }
.rc-check.is-invalid { outline: 2px solid var(--rc-danger-dot); outline-offset: 4px; border-radius: 8px; }

/* Grid/flex children never force the page wider than the viewport */
.rc-shell > *, .rc-menu-layout > *, .rc-split > *, .rc-grid > *, .rc-stack > * { min-width: 0; }

/* Sidebar column paints full height; its content stays pinned while the page scrolls */
@media (min-width: 1024px) {
  .rc-shell { background: linear-gradient(90deg, rgba(255,255,255,.86) 0 var(--rc-shell-sidebar), transparent var(--rc-shell-sidebar)); }
  .rc-shell::before { content: ""; position: fixed; z-index: 0; top: 0; bottom: 0; left: calc(var(--rc-shell-sidebar) - 1px); width: 1px; background: var(--rc-line); pointer-events: none; }
}
.rc-cell-note { display: block; margin-top: 2px; }

/* Inline filter bar: fields share a row with their actions on tablet and up */
@media (min-width: 768px) {
  .rc-filterbar--inline { display: flex; flex-wrap: wrap; align-items: flex-end; }
  .rc-filterbar--inline > .rc-field { flex: 1 1 180px; }
  .rc-filterbar--inline > .rc-filterbar__actions, .rc-filterbar--inline > .rc-actions { justify-content: flex-end; }
}
.rc-filterbar__actions { display: flex; gap: var(--rc-space-2); align-items: end; flex-wrap: wrap; }
@media (max-width: 767px) { .rc-filterbar__actions { justify-content: center; } }
@media (max-width: 767px) { .rc-grid--metrics-3 > :last-child:nth-child(odd) { grid-column: 1 / -1; } }

/* Guardian G1-06: scroll cue on horizontally scrolling chip and tab rows.
   rc.js toggles .is-scroll-start / .is-scroll-end; the mask fades only the edge that has more content. */
.rc-chip-nav.is-scrollable, .rc-tabs.is-scrollable { --fade-l: 0px; --fade-r: 28px; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%); }
.rc-chip-nav.is-scrollable:not(.is-at-start), .rc-tabs.is-scrollable:not(.is-at-start) { --fade-l: 28px; }
.rc-chip-nav.is-scrollable.is-at-end, .rc-tabs.is-scrollable.is-at-end { --fade-r: 0px; }

/* List rows with actions wrap below 600px: text keeps full width, badge + action move to their own line */
@media (max-width: 599px) {
  .rc-list__item:has(> .rc-list__aside .rc-btn) { flex-wrap: wrap; row-gap: 8px; }
  .rc-list__item:has(> .rc-list__aside .rc-btn) > .rc-list__main { flex-basis: calc(100% - 60px); }
  .rc-list__item:has(> .rc-list__aside .rc-btn) > .rc-list__aside { flex: 1 0 100%; justify-content: space-between; }
  .rc-list__item:has(> .rc-avatar):has(> .rc-list__aside .rc-btn) > .rc-list__aside { padding-left: 50px; }
}

/* Native file input, restyled as a quiet pill + filename (keeps the real control for a11y) */
input[type="file"].rc-input, .rc-field input[type="file"] { padding: 6px; min-height: 48px; font: inherit; font-size: .9375rem; color: var(--rc-ink-500); background: var(--rc-surface); border: 1px dashed var(--rc-line-strong); border-radius: var(--rc-radius-md, 14px); width: 100%; cursor: pointer; }
.rc-field input[type="file"]::file-selector-button { font: 700 .9375rem/1 var(--rc-font); color: var(--rc-blue-800, #0B3A57); min-height: 36px; padding: 0 16px; margin-right: 12px; border-radius: 99px; border: 2px solid transparent; background: linear-gradient(#fff, #fff) padding-box, var(--rc-grad-primary) border-box; cursor: pointer; }
.rc-field input[type="file"]:hover::file-selector-button { background: linear-gradient(var(--rc-blue-25), var(--rc-blue-25)) padding-box, var(--rc-grad-primary) border-box; }
.rc-field input[type="file"]:focus-visible { outline: none; box-shadow: var(--rc-focus-ring); }

/* Link list (one tap target per row) */
.rc-list--links { list-style: none; margin: 0; padding: 0; }
.rc-list--links > li + li > .rc-list__item { border-top: 1px solid var(--rc-line); }
.rc-list--links .rc-list__aside > svg { width: 18px; height: 18px; color: var(--rc-ink-400); }
.rc-card--flush-body .rc-list { margin-inline: calc(-1 * var(--rc-list-row-x)); }

/* Partner overview §18.1 / Fig 28 (G1-03): DOM is reading order so phone visual
   rhythm and keyboard Tab order stay aligned — next → metrics → share/QR →
   locations → orders → terms. Desktop keeps an aside column without reordering DOM. */
@media (max-width: 1279px) {
  .rc-split--overview {
    display: flex;
    flex-direction: column;
    gap: var(--rc-space-6);
  }
  .rc-split--overview .rc-ov-hide-stacked { display: none; }
}
@media (min-width: 1280px) {
  .rc-split--overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: var(--rc-space-7);
    grid-auto-flow: dense;
    align-items: start;
  }
  .rc-split--overview > .rc-ov-main { grid-column: 1; }
  .rc-split--overview > .rc-ov-aside { grid-column: 2; }
}
@media (max-width: 599px) {
  .rc-list__aside { flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; }
  /* DG-054: stack label above long values when the two-column row cannot fit */
  .rc-list__item--long-value {
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 6px;
  }
  .rc-list__item--long-value > .rc-list__main,
  .rc-list__item--long-value > .rc-list__aside {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
    justify-content: flex-start;
  }
}
.rc-split--overview > .rc-ov-main,
.rc-split--overview > .rc-ov-aside { min-width: 0; max-width: 100%; }
/* G2-09: tenant/partner scope in the phone topbar wraps to two lines instead of clipping mid-name */
@media (max-width: 1023px) {
  .rc-topbar__context { white-space: normal; text-overflow: clip; line-height: 16px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
}
/* G2-10: trailing room so the last chip/tab can scroll fully clear of the edge fade; focused items stay clear */
.rc-chip-nav::after, .rc-tabs::after { content: ""; flex: 0 0 24px; }
.rc-chip-nav, .rc-tabs { scroll-padding-inline: 16px 32px; }
