/* RentLedger console: component styles and shell layout.
   Original work for RentLedger, built only on the tokens in rl-tokens.css.
   Loaded in Classic too, where it is inert: every override of legacy markup is
   scoped under html.rl-shell, and rl-* classes only appear in new markup. */

/* ===== Shell frame ======================================================= */
html.rl-shell { background: var(--rl-bg); }
html.rl-shell body {
  background: var(--rl-bg); color: var(--rl-ink);
  font-family: var(--rl-font-ui); font-size: var(--rl-fs-md); line-height: var(--rl-lh);
  overflow-x: clip;
}
html.rl-shell.rl-modal-open { overflow: hidden; }

/* Legacy page chrome is replaced by the shell. */
html.rl-shell body > header.header,
html.rl-shell section.page-header,
html.rl-shell footer.footer,
html.rl-shell #app > .user-bar,
html.rl-shell #app > .tabs,
html.rl-shell #status,
html.rl-shell [data-rl-part="massmail"] { display: none !important; }
html.rl-shell .contact-section { padding: 0; }
html.rl-shell .rep-wrap { max-width: none; }

/* Elements the shell hides with the hidden attribute (legacy markup keeps its own rules). */
:is(#rlShell, #rlLayerClassic) [hidden]:not(.rl-legacy [hidden]) { display: none !important; }

#rlShell { min-height: 100vh; color: var(--rl-ink); }
#rlShell, #rlLayerClassic { font-family: var(--rl-font-ui); }
#rlShell *, #rlShell *::before, #rlShell *::after,
#rlLayerClassic *, #rlLayerClassic *::before, #rlLayerClassic *::after { box-sizing: border-box; }
#rlShell :focus-visible, #rlLayerClassic :focus-visible { outline: 2px solid var(--rl-focus); outline-offset: 2px; }
.rl-icon { display: inline-block; flex: none; vertical-align: middle; }
.rl-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Rail ---------------------------------------------------------------- */
.rl-rail {
  position: fixed; top: 0; bottom: 0; left: 0; width: var(--rl-rail-w);
  z-index: var(--rl-z-rail); display: flex; flex-direction: column;
  background: var(--rl-rail-bg); color: var(--rl-rail-ink);
  overflow-y: auto; overscroll-behavior: contain;
  padding: var(--rl-s-4) var(--rl-s-3) calc(var(--rl-s-4) + env(safe-area-inset-bottom));
}
.rl-rail :focus-visible { outline-color: var(--rl-rail-focus); }
.rl-rail__brand { display: block; padding: var(--rl-s-1) var(--rl-s-3) var(--rl-s-5); text-decoration: none; color: inherit; min-width: 0; }
.rl-rail__company { display: block; font-size: var(--rl-fs-lg); font-weight: 600; line-height: var(--rl-lh-tight); color: var(--rl-rail-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-rail__product { display: block; font-size: var(--rl-fs-xs); color: var(--rl-rail-ink-2); margin-top: 2px; letter-spacing: .02em; }
.rl-rail__initials { display: none; }
.rl-rail__brand--plain .rl-rail__product { display: none; }
.rl-rail__nav { display: flex; flex-direction: column; gap: 2px; }
.rl-rail__item {
  position: relative; display: flex; align-items: center; gap: var(--rl-s-3);
  min-height: 44px; padding: 0 var(--rl-s-3); border-radius: var(--rl-r-sm);
  color: var(--rl-rail-ink-2); text-decoration: none; font-size: var(--rl-fs-md); font-weight: 600;
  background: transparent; border: 0; width: 100%; text-align: left; cursor: pointer; font-family: inherit;
  transition: background var(--rl-dur) var(--rl-ease), color var(--rl-dur) var(--rl-ease);
}
.rl-rail__item:hover { background: var(--rl-rail-active); color: var(--rl-rail-ink); }
.rl-rail__item[aria-current="page"] { background: var(--rl-rail-active); color: var(--rl-rail-ink); }
.rl-rail__item[aria-current="page"]::before {
  content: ""; position: absolute; left: calc(-1 * var(--rl-s-3)); top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--rl-rail-accent);
}
.rl-rail__icon { position: relative; display: inline-flex; flex: none; }
.rl-rail__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-rail__badge, .rl-bottombar__badge {
  position: absolute; top: -6px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--rl-r-pill); background: var(--rl-badge-bg); color: var(--rl-badge-ink);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums;
}
.rl-rail__badge:empty, .rl-bottombar__badge:empty { display: none; }
.rl-rail__foot { margin-top: auto; padding-top: var(--rl-s-4); border-top: 1px solid var(--rl-rail-active); display: flex; flex-direction: column; gap: 2px; }
.rl-rail__foot .rl-rail__item { min-height: 36px; font-size: var(--rl-fs-sm); font-weight: 500; }

/* ---- Topbar --------------------------------------------------------------- */
.rl-topbar {
  position: sticky; top: 0; z-index: var(--rl-z-topbar);
  height: var(--rl-topbar-h); margin-left: var(--rl-rail-w);
  display: flex; align-items: center; gap: var(--rl-s-3);
  padding: 0 var(--rl-gutter); background: var(--rl-surface); border-bottom: 1px solid var(--rl-border);
}
.rl-topbar__back { flex: none; }
.rl-topbar__title {
  flex: 1 1 auto; min-width: 0; margin: 0; font-family: var(--rl-font-display);
  font-size: var(--rl-fs-xl); font-weight: 600; line-height: var(--rl-lh-tight); color: var(--rl-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rl-topbar__title:focus { outline: none; }
/* The title only takes focus after a route change; mark it without boxing it. */
#rlShell .rl-topbar__title:focus-visible { outline: none; text-decoration: underline 2px var(--rl-focus); text-underline-offset: 6px; }
.rl-topbar__search {
  flex: 0 1 280px; display: inline-flex; align-items: center; gap: var(--rl-s-2);
  height: 38px; padding: 0 var(--rl-s-3); border-radius: var(--rl-r-pill);
  border: 1px solid var(--rl-border-strong); background: var(--rl-surface-2); color: var(--rl-ink-3);
  font: 500 var(--rl-fs-sm)/1 var(--rl-font-ui); cursor: pointer; text-align: left;
}
.rl-topbar__search:hover { border-color: var(--rl-ink-3); color: var(--rl-ink-2); }
.rl-topbar__search-text { flex: 1; }
.rl-kbd, .rl-palette kbd {
  display: inline-block; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--rl-border-strong);
  background: var(--rl-surface); color: var(--rl-ink-3); font: 600 11px/16px var(--rl-font-ui);
}
.rl-topbar__plus {
  flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; display: inline-grid; place-items: center;
  background: var(--rl-brand); color: var(--rl-brand-ink); cursor: pointer;
  transition: background var(--rl-dur) var(--rl-ease);
}
.rl-topbar__plus:hover { background: var(--rl-brand-hover); }
.rl-topbar__user {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center;
  border: 1px solid var(--rl-border-strong); background: var(--rl-brand-soft); color: var(--rl-brand-soft-ink);
  font: 700 var(--rl-fs-xs)/1 var(--rl-font-ui); cursor: pointer; letter-spacing: .02em;
}

/* ---- Main / sub-nav ------------------------------------------------------- */
.rl-main {
  display: block; margin-left: var(--rl-rail-w); min-width: 0;
  padding: var(--rl-s-5) var(--rl-gutter) var(--rl-s-12);
}
.rl-main:focus { outline: none; }
.rl-main > * { max-width: var(--rl-content-max); margin-left: auto; margin-right: auto; }
.rl-view { display: block; min-width: 0; }
.rl-view__host { display: block; min-width: 0; }

.rl-subnav {
  display: flex; gap: var(--rl-s-1); margin-bottom: var(--rl-s-5);
  border-bottom: 1px solid var(--rl-border); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.rl-subnav::-webkit-scrollbar { display: none; }
.rl-subnav__tab, .rl-tab {
  flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--rl-s-3);
  margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none;
  color: var(--rl-ink-3); font: 600 var(--rl-fs-sm)/1.2 var(--rl-font-ui); text-decoration: none; white-space: nowrap; cursor: pointer;
}
.rl-subnav__tab:hover, .rl-tab:hover { color: var(--rl-ink); }
.rl-subnav__tab[aria-selected="true"], .rl-tab[aria-selected="true"] { color: var(--rl-brand-text); border-bottom-color: var(--rl-brand); }
.rl-tabs { display: flex; gap: var(--rl-s-1); border-bottom: 1px solid var(--rl-border); margin-bottom: var(--rl-s-4); overflow-x: auto; scrollbar-width: none; }
.rl-tabs::-webkit-scrollbar { display: none; }

/* ---- Bottom bar (phones) ---------------------------------------------------- */
.rl-bottombar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--rl-z-bottombar);
  height: calc(var(--rl-bottombar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--rl-surface); border-top: 1px solid var(--rl-border);
}
.rl-bottombar__item {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 48px; color: var(--rl-ink-3); text-decoration: none; font-size: 11px; font-weight: 600;
}
.rl-bottombar__item .rl-rail__icon { position: relative; }
.rl-bottombar__item[aria-current="page"] { color: var(--rl-brand-text); }
.rl-bottombar__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Responsive frame (§2.8) ------------------------------------------------ */
@media (min-width: 768px) and (max-width: 1099px) {
  .rl-rail { width: var(--rl-rail-w-compact); padding-left: var(--rl-s-2); padding-right: var(--rl-s-2); }
  .rl-rail__brand { padding: var(--rl-s-1) 0 var(--rl-s-4); text-align: center; }
  .rl-rail__company, .rl-rail__product { display: none; }
  .rl-rail__initials {
    display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--rl-r-md);
    background: var(--rl-rail-active); color: var(--rl-rail-ink); font-weight: 700; font-size: var(--rl-fs-sm);
  }
  .rl-rail__item { flex-direction: column; justify-content: center; gap: 2px; padding: var(--rl-s-2) 2px; min-height: 56px; text-align: center; }
  .rl-rail__item[aria-current="page"]::before { left: calc(-1 * var(--rl-s-2)); }
  .rl-rail__label { font-size: 11px; max-width: 100%; }
  .rl-rail__foot .rl-rail__item { min-height: 48px; font-size: 11px; }
  .rl-rail__foot .rl-rail__label { white-space: normal; line-height: 1.15; }
  .rl-topbar, .rl-main { margin-left: var(--rl-rail-w-compact); }
}
@media (max-width: 767px) {
  .rl-rail { display: none; }
  .rl-topbar { margin-left: 0; gap: var(--rl-s-2); }
  .rl-topbar__title { font-size: var(--rl-fs-lg); }
  .rl-topbar__search { flex: none; width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 50%; }
  .rl-topbar__search-text, .rl-topbar__search .rl-kbd { display: none; }
  .rl-main { margin-left: 0; padding-top: var(--rl-s-4); padding-bottom: calc(var(--rl-bottombar-h) + env(safe-area-inset-bottom) + var(--rl-s-6)); }
  .rl-bottombar { display: flex; }
}

/* ===== Legacy sections inside the shell =================================== */
html.rl-shell .rl-legacy {
  background: var(--rl-paper); color: var(--rl-paper-ink); color-scheme: light; font-family: var(--rl-font-ui);
  border: 1px solid var(--rl-border); border-radius: var(--rl-r-md); padding: var(--rl-s-4);
  min-width: 0; overflow-wrap: break-word;
}
html.rl-shell body > :not(#rlShell) { color-scheme: light; color: var(--rl-paper-ink); }   /* overlays legacy code appends to <body> */
html.rl-shell .rl-legacy * { scroll-margin-top: calc(var(--rl-topbar-h) + 12px); }
html.rl-shell .rl-legacy #app { display: block; }
html.rl-shell .rl-part-off { display: none !important; }
html.rl-shell #directReadsWarning.rl-banner {
  background: var(--rl-warn-bg) !important; color: var(--rl-warn) !important; padding: 12px 14px !important;
  border-radius: var(--rl-r-md); margin-bottom: var(--rl-s-4);
}
@media (min-width: 1100px) { html.rl-shell .rl-legacy { padding: var(--rl-s-5); } }
@media (max-width: 767px) { html.rl-shell .rl-legacy { padding: var(--rl-s-3); border-radius: var(--rl-r-sm); } }

/* Money actions the drawer replaces, and bulk or risky sends (§0.1.13, §3.5.3). */
html.rl-shell #rentRoll .roll-pay, html.rl-shell #rentRoll .roll-movein, html.rl-shell #rentRoll .roll-adj,
html.rl-shell #rentRoll .roll-fee,  html.rl-shell #rentRoll .roll-waive,
html.rl-shell #ledgerDetail .le-void,
html.rl-shell #ledgerDetail div:has(> .row > #lpRecord),
html.rl-shell #adminPayList .p-del,
html.rl-shell #sendAllInvoicesBtn,
html.rl-shell #onlinePayCard .row:has(> #sendAllInvoicesBtn) + details,
html.rl-shell #runReminders { display: none !important; }
html.rl-shell #rentRoll .rl-roll-money-cell { white-space: nowrap; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--border-color, #e0e0e0); }

/* "Try the new console" (Classic only). */
.rl-try-new {
  background: none; border: 1px solid var(--rl-green-700); color: var(--rl-green-700);
  padding: 0.4rem 0.9rem; border-radius: 4px; cursor: pointer; font-family: inherit; font-weight: 600;
}
.rl-try-new:hover { background: var(--rl-green-50); }

/* ===== Components ========================================================= */

/* ---- Card ------------------------------------------------------------------- */
.rl-card {
  background: var(--rl-surface); color: var(--rl-ink); border: 1px solid var(--rl-border);
  border-radius: var(--rl-r-md); box-shadow: var(--rl-e1); padding: var(--rl-s-4); margin: 0 0 var(--rl-s-4);
}
.rl-card__head { display: flex; align-items: center; justify-content: space-between; gap: var(--rl-s-3); flex-wrap: wrap; margin-bottom: var(--rl-s-3); }
.rl-card__title { margin: 0; font-size: var(--rl-fs-lg); font-weight: 600; line-height: var(--rl-lh-tight); color: var(--rl-ink); }
.rl-card__body { min-width: 0; }
.rl-card__foot { display: flex; flex-wrap: wrap; gap: var(--rl-s-2); align-items: center; margin-top: var(--rl-s-3); padding-top: var(--rl-s-3); border-top: 1px solid var(--rl-border); }
@media (min-width: 1100px) { .rl-card { padding: var(--rl-s-5); } }

/* ---- Chip -------------------------------------------------------------------- */
.rl-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--rl-r-pill);
  font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap; vertical-align: middle; text-decoration: none;
  background: var(--rl-neutral-bg); color: var(--rl-neutral);
}
a.rl-chip:hover { text-decoration: underline; }
.rl-chip--ok { background: var(--rl-ok-bg); color: var(--rl-ok); }
.rl-chip--warn { background: var(--rl-warn-bg); color: var(--rl-warn); }
.rl-chip--bad { background: var(--rl-bad-bg); color: var(--rl-bad); }
.rl-chip--info { background: var(--rl-info-bg); color: var(--rl-info); }
.rl-chip--neutral { background: var(--rl-neutral-bg); color: var(--rl-neutral); }
.rl-chip--brand { background: var(--rl-brand-soft); color: var(--rl-brand-soft-ink); }
.rl-chip__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* ---- Button -------------------------------------------------------------------- */
.rl-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 14px; border-radius: var(--rl-r-sm); border: 1px solid var(--rl-border-strong);
  background: var(--rl-surface); color: var(--rl-ink);
  font: 600 var(--rl-fs-sm)/1.2 var(--rl-font-ui); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background var(--rl-dur) var(--rl-ease), border-color var(--rl-dur) var(--rl-ease), box-shadow var(--rl-dur) var(--rl-ease);
}
.rl-btn:hover { box-shadow: inset 0 0 0 999px var(--rl-hover); }
.rl-btn--primary { background: var(--rl-brand); border-color: var(--rl-brand); color: var(--rl-brand-ink); }
.rl-btn--primary:hover { background: var(--rl-brand-hover); border-color: var(--rl-brand-hover); box-shadow: none; }
.rl-btn--secondary { background: var(--rl-surface); border-color: var(--rl-border-strong); color: var(--rl-ink); }
.rl-btn--ghost { background: transparent; border-color: transparent; color: var(--rl-brand-text); }
.rl-btn--danger { background: var(--rl-bad-bg); border-color: transparent; color: var(--rl-bad); }
.rl-btn--sm { min-height: 30px; padding: 0 10px; font-size: var(--rl-fs-xs); }
.rl-btn--icon { width: 36px; padding: 0; }
.rl-btn--sm.rl-btn--icon { width: 30px; }
.rl-btn:disabled, .rl-btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.rl-btn[aria-busy="true"] { cursor: progress; opacity: .85; }
.rl-btn[aria-busy="true"]::before {
  content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: rl-spin .8s linear infinite;
}
.rl-spinner {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: rl-spin .8s linear infinite;
}
@media (max-width: 767px) {
  .rl-btn { min-height: 48px; }
  .rl-btn--sm { min-height: 40px; }
  .rl-btn--icon { width: 48px; }
  .rl-btn--sm.rl-btn--icon { width: 40px; }
}

/* ---- Form ------------------------------------------------------------------------- */
.rl-field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 var(--rl-s-4); min-width: 0; }
.rl-field__label { font-size: var(--rl-fs-sm); font-weight: 600; color: var(--rl-ink-2); }
.rl-field__hint { font-size: var(--rl-fs-xs); color: var(--rl-ink-3); }
.rl-field__error { font-size: var(--rl-fs-xs); color: var(--rl-bad); font-weight: 600; }
.rl-input, .rl-select, .rl-textarea {
  width: 100%; min-height: 40px; padding: 8px 10px; border-radius: var(--rl-r-sm);
  border: 1px solid var(--rl-border-strong); background: var(--rl-surface); color: var(--rl-ink);
  font: 400 var(--rl-fs-md)/1.3 var(--rl-font-ui);
}
.rl-textarea { min-height: 88px; resize: vertical; line-height: var(--rl-lh); }
.rl-input::placeholder, .rl-textarea::placeholder { color: var(--rl-ink-3); opacity: 1; }
.rl-input:disabled, .rl-select:disabled, .rl-textarea:disabled { color: var(--rl-disabled-ink); background: var(--rl-sunken); }
.rl-input[aria-invalid="true"], .rl-select[aria-invalid="true"], .rl-textarea[aria-invalid="true"] { border-color: var(--rl-bad); box-shadow: 0 0 0 1px var(--rl-bad); }
.rl-check { display: inline-flex; align-items: flex-start; gap: var(--rl-s-2); font-size: var(--rl-fs-sm); color: var(--rl-ink); cursor: pointer; }
.rl-check input { width: 18px; height: 18px; margin: 1px 0 0; flex: none; accent-color: var(--rl-brand); }
@media (max-width: 767px) {
  .rl-input, .rl-select, .rl-textarea { min-height: 48px; font-size: 16px; }
}

/* ---- Table --------------------------------------------------------------------------- */
.rl-table { width: 100%; border-collapse: collapse; font-size: var(--rl-fs-sm); color: var(--rl-ink); }
.rl-table th {
  text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rl-border);
  font-size: var(--rl-fs-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--rl-ink-3); white-space: nowrap;
}
.rl-table td { padding: 10px; border-bottom: 1px solid var(--rl-border); vertical-align: middle; }
.rl-table tbody tr:hover { background: var(--rl-hover); }
.rl-table__num, .rl-table th.rl-table__num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 767px) {
  .rl-table--stack thead { display: none; }
  .rl-table--stack, .rl-table--stack tbody, .rl-table--stack tr, .rl-table--stack td { display: block; width: 100%; }
  .rl-table--stack tr {
    background: var(--rl-surface); border: 1px solid var(--rl-border); border-radius: var(--rl-r-md);
    padding: var(--rl-s-2) var(--rl-s-3); margin-bottom: var(--rl-s-2);
  }
  .rl-table--stack td { display: flex; justify-content: space-between; align-items: center; gap: var(--rl-s-3); border: 0; padding: 6px 0; text-align: right; }
  .rl-table--stack td::before { content: attr(data-label); flex: none; text-align: left; font-size: var(--rl-fs-xs); font-weight: 600; color: var(--rl-ink-3); }
  .rl-table--stack td:not([data-label])::before, .rl-table--stack td[data-label=""]::before { content: none; }
}

/* ---- List row ------------------------------------------------------------------------- */
.rl-list { list-style: none; margin: 0; padding: 0; }
.rl-row {
  display: flex; align-items: center; gap: var(--rl-s-3); width: 100%; min-height: 44px;
  padding: 10px var(--rl-s-3); border: 0; border-bottom: 1px solid var(--rl-border);
  background: transparent; color: inherit; text-decoration: none; text-align: left; font: inherit;
}
a.rl-row, button.rl-row { cursor: pointer; }
a.rl-row:hover, button.rl-row:hover { background: var(--rl-hover); }
.rl-row[aria-selected="true"] { background: var(--rl-selected); }
.rl-row__lead { flex: none; color: var(--rl-ink-3); display: inline-flex; }
.rl-row__main { flex: 1 1 auto; min-width: 0; }
.rl-row__title { font-size: var(--rl-fs-md); font-weight: 600; color: var(--rl-ink); overflow-wrap: anywhere; }
.rl-row__sub { font-size: var(--rl-fs-sm); color: var(--rl-ink-3); overflow-wrap: anywhere; }
.rl-row__meta { flex: none; font-size: var(--rl-fs-xs); color: var(--rl-ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rl-row__actions { flex: none; display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 767px) {
  .rl-row { min-height: 48px; flex-wrap: wrap; }
  .rl-row__actions { width: 100%; }
}

/* ---- Queue bands and items ---------------------------------------------------------------- */
.rl-band { margin: 0 0 var(--rl-s-6); --rl-band-color: var(--rl-info); }
.rl-band--now { --rl-band-color: var(--rl-bad); }
.rl-band--waiting { --rl-band-color: var(--rl-warn); }
.rl-band--week { --rl-band-color: var(--rl-info); }
.rl-band__head {
  display: flex; align-items: center; gap: var(--rl-s-2); margin: 0 0 var(--rl-s-3);
  font: 700 var(--rl-fs-sm)/1.2 var(--rl-font-display); letter-spacing: .04em; text-transform: uppercase; color: var(--rl-ink-2);
}
.rl-band__head::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--rl-band-color); flex: none; }
.rl-qitem {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--rl-s-2) var(--rl-s-4);
  padding: var(--rl-s-3) var(--rl-s-3) var(--rl-s-3) calc(var(--rl-s-4) + 2px); margin: 0 0 var(--rl-s-2);
  background: var(--rl-surface); border: 1px solid var(--rl-border); border-radius: var(--rl-r-md); box-shadow: var(--rl-e1);
}
.rl-qitem__sev {
  position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  border-radius: var(--rl-r-md) 0 0 var(--rl-r-md); background: var(--rl-band-color, var(--rl-info));
}
.rl-qitem[data-severity="urgent"] .rl-qitem__sev { background: var(--rl-bad); }
.rl-qitem__main { flex: 1 1 280px; min-width: 0; }
.rl-qitem__title { font-weight: 600; color: var(--rl-ink); overflow-wrap: anywhere; }
.rl-qitem__sub { font-size: var(--rl-fs-sm); color: var(--rl-ink-3); overflow-wrap: anywhere; }
.rl-qitem__due { display: inline-block; font-size: var(--rl-fs-xs); font-weight: 600; color: var(--rl-warn); white-space: nowrap; }
.rl-qitem__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; }
.rl-qitem__more { flex: none; }
@media (max-width: 767px) {
  .rl-qitem__actions { margin-left: 0; width: 100%; }
}

/* ---- Snoozed list ---------------------------------------------------------------------------- */
.rl-hidden { margin-top: var(--rl-s-4); padding-top: var(--rl-s-3); border-top: 1px dashed var(--rl-border-strong); }
.rl-hidden__row {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--rl-s-2) var(--rl-s-3);
  padding: var(--rl-s-2) 0; border-bottom: 1px solid var(--rl-border); color: var(--rl-ink-2); font-size: var(--rl-fs-sm);
}
.rl-hidden__row > :first-child { flex: 1 1 220px; min-width: 0; }

/* ---- Money strip ------------------------------------------------------------------------------- */
.rl-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--rl-s-3); margin: 0 0 var(--rl-s-6); }
.rl-stat {
  display: block; min-width: 0; padding: var(--rl-s-3) var(--rl-s-4); color: inherit; text-decoration: none;
  background: var(--rl-surface); border: 1px solid var(--rl-border); border-radius: var(--rl-r-md); box-shadow: var(--rl-e1);
}
a.rl-stat:hover { border-color: var(--rl-border-strong); }
.rl-stat__label { font-size: var(--rl-fs-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--rl-ink-3); }
.rl-stat__value { margin-top: 4px; font-size: var(--rl-fs-2xl); font-weight: 700; line-height: var(--rl-lh-tight); color: var(--rl-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rl-stat__sub { font-size: var(--rl-fs-sm); color: var(--rl-ink-3); }
.rl-stat__bar { position: relative; height: 6px; margin-top: var(--rl-s-2); border-radius: var(--rl-r-pill); background: var(--rl-bar-track); overflow: hidden; }
.rl-stat__bar::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--rl-pct, 0%); max-width: 100%; background: var(--rl-bar); border-radius: inherit; }
.rl-stat__bar > * { display: block; height: 100%; max-width: 100%; background: var(--rl-bar); border-radius: inherit; }
@media (max-width: 767px) {
  .rl-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--rl-s-2); }
  .rl-stat__value { font-size: var(--rl-fs-xl); }
}

/* ---- Record page ------------------------------------------------------------------------------ */
.rl-record { display: grid; gap: var(--rl-s-5); grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "side" "main"; }
.rl-record__head { grid-area: head; min-width: 0; }
.rl-record__main { grid-area: main; min-width: 0; }
.rl-record__side { grid-area: side; min-width: 0; }
.rl-record__title { margin: 0; font-family: var(--rl-font-display); font-size: var(--rl-fs-2xl); font-weight: 600; line-height: var(--rl-lh-tight); color: var(--rl-ink); overflow-wrap: anywhere; }
.rl-record__title:focus { outline: none; }
.rl-record__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--rl-s-2); }
.rl-record__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--rl-s-3); margin-top: var(--rl-s-4); }
@media (min-width: 1100px) {
  .rl-record { grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "head head" "main side"; align-items: start; }
}

/* ---- Actions panel ------------------------------------------------------------------------------ */
.rl-actions { display: flex; flex-direction: column; gap: var(--rl-s-2); }
.rl-action { padding: var(--rl-s-3); background: var(--rl-surface); border: 1px solid var(--rl-border); border-radius: var(--rl-r-md); }
.rl-action__title { font-weight: 600; color: var(--rl-ink); overflow-wrap: anywhere; }
.rl-action__sub { font-size: var(--rl-fs-sm); color: var(--rl-ink-3); overflow-wrap: anywhere; }
.rl-action__btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--rl-s-2); }

/* ---- Timeline ------------------------------------------------------------------------------------ */
.rl-timeline { display: flex; flex-direction: column; gap: var(--rl-s-2); }
.rl-tl-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--rl-s-3); }
.rl-tl-filter button, .rl-tl-filter a {
  min-height: 30px; padding: 0 12px; border-radius: var(--rl-r-pill); border: 1px solid var(--rl-border-strong);
  background: var(--rl-surface); color: var(--rl-ink-2); font: 600 var(--rl-fs-xs)/1 var(--rl-font-ui); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center;
}
.rl-tl-filter [aria-pressed="true"], .rl-tl-filter [aria-selected="true"] { background: var(--rl-brand-soft); color: var(--rl-brand-soft-ink); border-color: transparent; }
.rl-tl-day { margin: var(--rl-s-3) 0 var(--rl-s-1); text-align: center; font-size: var(--rl-fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--rl-ink-3); }
.rl-tl-item { display: flex; align-items: flex-start; gap: var(--rl-s-2); align-self: center; max-width: 100%; min-width: 0; }
.rl-tl-item__icon {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--rl-sunken); color: var(--rl-ink-3);
}
.rl-tl-item__icon .rl-icon { width: 16px; height: 16px; }
.rl-tl-item__head { font-size: var(--rl-fs-sm); font-weight: 600; color: var(--rl-ink-2); }
.rl-tl-item__time { font-size: var(--rl-fs-xs); color: var(--rl-ink-3); font-weight: 400; }
.rl-tl-item__body { font-size: var(--rl-fs-sm); color: var(--rl-ink-3); white-space: pre-wrap; overflow-wrap: anywhere; }
.rl-tl-item__links { display: flex; flex-wrap: wrap; gap: var(--rl-s-2); margin-top: 2px; font-size: var(--rl-fs-xs); }
.rl-tl-item__links a { color: var(--rl-link); }
.rl-tl-item--in, .rl-tl-item--out { max-width: min(85%, 640px); }
.rl-tl-item--in { align-self: flex-start; }
.rl-tl-item--out { align-self: flex-end; flex-direction: row-reverse; text-align: right; }
.rl-tl-item--in .rl-tl-item__body, .rl-tl-item--out .rl-tl-item__body {
  margin-top: 2px; padding: var(--rl-s-2) var(--rl-s-3); border-radius: var(--rl-r-lg); color: var(--rl-ink); font-size: var(--rl-fs-md); text-align: left;
}
.rl-tl-item--in .rl-tl-item__body { background: var(--rl-surface-2); border: 1px solid var(--rl-border); border-top-left-radius: 4px; }
.rl-tl-item--out .rl-tl-item__body { background: var(--rl-brand-soft); color: var(--rl-brand-soft-ink); border-top-right-radius: 4px; }
.rl-tl-item--out .rl-tl-item__links { justify-content: flex-end; }
.rl-tl-item:not(.rl-tl-item--in):not(.rl-tl-item--out) { text-align: center; justify-content: center; }
.rl-tl-item--payment .rl-tl-item__icon, .rl-tl-item--credit .rl-tl-item__icon { background: var(--rl-ok-bg); color: var(--rl-ok); }
.rl-tl-item--charge .rl-tl-item__icon, .rl-tl-item--deposit .rl-tl-item__icon { background: var(--rl-neutral-bg); color: var(--rl-neutral); }
.rl-tl-item--ticket .rl-tl-item__icon, .rl-tl-item--inspection .rl-tl-item__icon { background: var(--rl-info-bg); color: var(--rl-info); }
.rl-tl-item--contract .rl-tl-item__icon { background: var(--rl-brand-soft); color: var(--rl-brand-soft-ink); }
.rl-tl-item--notice .rl-tl-item__icon, .rl-tl-item--voicemail .rl-tl-item__icon, .rl-tl-item--call .rl-tl-item__icon { background: var(--rl-warn-bg); color: var(--rl-warn); }
.rl-tl-item--text .rl-tl-item__icon, .rl-tl-item--email .rl-tl-item__icon { background: var(--rl-brand-soft); color: var(--rl-brand-soft-ink); }
.rl-composer { display: flex; align-items: flex-end; gap: var(--rl-s-2); margin-top: var(--rl-s-3); padding-top: var(--rl-s-3); border-top: 1px solid var(--rl-border); }
.rl-composer textarea, .rl-composer .rl-textarea { flex: 1 1 auto; min-height: 44px; }
@media (max-width: 767px) {
  .rl-tl-item--in, .rl-tl-item--out { max-width: 92%; }
  .rl-composer { flex-wrap: wrap; }
}

/* ---- Layers: scrim, drawer, sheet, palette, menu --------------------------------------------------- */
.rl-scrim { position: fixed; inset: 0; z-index: var(--rl-z-layer); background: var(--rl-scrim); animation: rl-fade var(--rl-dur) var(--rl-ease); }
.rl-drawer, .rl-sheet, .rl-palette, .rl-menu { color: var(--rl-ink); font-family: var(--rl-font-ui); font-size: var(--rl-fs-md); line-height: var(--rl-lh); }
.rl-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--rl-z-layer);
  width: min(var(--rl-drawer-w), 100vw); display: flex; flex-direction: column;
  background: var(--rl-surface); box-shadow: var(--rl-e2);
  border-radius: var(--rl-r-lg) 0 0 var(--rl-r-lg);
  animation: rl-slide-in calc(var(--rl-dur) * 1.4) var(--rl-ease);
}
.rl-sheet {
  position: fixed; top: 50%; left: 50%; z-index: var(--rl-z-layer); transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 64px); display: flex; flex-direction: column;
  background: var(--rl-surface); border-radius: var(--rl-r-lg); box-shadow: var(--rl-e3);
  animation: rl-fade var(--rl-dur) var(--rl-ease);
}
.rl-drawer:focus, .rl-sheet:focus, .rl-palette:focus { outline: none; }
.rl-drawer__head, .rl-sheet__head { display: flex; align-items: flex-start; gap: var(--rl-s-3); padding: var(--rl-s-4) var(--rl-s-5); border-bottom: 1px solid var(--rl-border); }
.rl-drawer__titles, .rl-sheet__titles { flex: 1 1 auto; min-width: 0; padding-top: 4px; }
.rl-drawer__title, .rl-sheet__title { margin: 0; font-size: var(--rl-fs-lg); font-weight: 600; line-height: var(--rl-lh-tight); color: var(--rl-ink); overflow-wrap: anywhere; }
.rl-drawer__subtitle, .rl-sheet__subtitle { margin: 2px 0 0; font-size: var(--rl-fs-sm); color: var(--rl-ink-3); }
.rl-drawer__close, .rl-sheet__close { flex: none; color: var(--rl-ink-3); }
.rl-drawer__body, .rl-sheet__body { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: var(--rl-s-4) var(--rl-s-5); min-height: 0; }
.rl-drawer__foot, .rl-sheet__foot {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--rl-s-2);
  padding: var(--rl-s-3) var(--rl-s-5) calc(var(--rl-s-3) + env(safe-area-inset-bottom)); border-top: 1px solid var(--rl-border);
}
.rl-dialog__text { margin: 0; white-space: pre-line; color: var(--rl-ink-2); }
@media (max-width: 767px) {
  .rl-drawer { width: 100vw; border-radius: 0; }
  .rl-sheet {
    top: auto; bottom: 0; left: 0; right: 0; transform: none; width: 100%; max-height: 92vh;
    border-radius: var(--rl-r-lg) var(--rl-r-lg) 0 0; animation: rl-rise calc(var(--rl-dur) * 1.4) var(--rl-ease);
  }
  .rl-drawer__head, .rl-sheet__head, .rl-drawer__body, .rl-sheet__body { padding-left: var(--rl-s-4); padding-right: var(--rl-s-4); }
  .rl-drawer__foot, .rl-sheet__foot { padding-left: var(--rl-s-4); padding-right: var(--rl-s-4); }
  .rl-drawer__foot .rl-btn, .rl-sheet__foot .rl-btn { flex: 1 1 auto; }
}

.rl-palette {
  position: fixed; top: 10vh; left: 50%; z-index: var(--rl-z-layer); transform: translateX(-50%);
  width: min(640px, calc(100vw - 32px)); max-height: 72vh; display: flex; flex-direction: column; overflow: hidden;
  background: var(--rl-surface); border: 1px solid var(--rl-border); border-radius: var(--rl-r-lg); box-shadow: var(--rl-e2);
  animation: rl-fade var(--rl-dur) var(--rl-ease);
}
.rl-palette__bar { display: flex; align-items: center; gap: var(--rl-s-2); padding: 0 var(--rl-s-2) 0 var(--rl-s-4); border-bottom: 1px solid var(--rl-border); }
.rl-palette__glyph { color: var(--rl-ink-3); display: inline-flex; }
.rl-palette__input {
  flex: 1 1 auto; min-width: 0; height: 56px; border: 0; outline: none; background: transparent;
  color: var(--rl-ink); font: 400 var(--rl-fs-lg)/1.2 var(--rl-font-ui);
}
.rl-palette__input::placeholder { color: var(--rl-ink-3); opacity: 1; }
:is(#rlShell, #rlLayerClassic) .rl-palette__input:focus-visible { outline: none; }
.rl-palette__bar:focus-within { box-shadow: inset 0 -2px 0 var(--rl-focus); }
.rl-palette__status:empty { display: none; }
.rl-palette__status { padding: var(--rl-s-2) var(--rl-s-4) 0; }
.rl-palette__status .rl-banner { margin: 0 0 var(--rl-s-2); }
.rl-palette__hint { margin: var(--rl-s-1) 0 var(--rl-s-2); font-size: var(--rl-fs-sm); color: var(--rl-ink-3); }
.rl-palette__list { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: var(--rl-s-1) var(--rl-s-2) var(--rl-s-2); min-height: 0; }
.rl-palette__group { padding-top: var(--rl-s-1); }
.rl-palette__group-label { padding: var(--rl-s-2) var(--rl-s-2) var(--rl-s-1); font-size: var(--rl-fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--rl-ink-3); }
.rl-palette__item { display: flex; align-items: center; gap: var(--rl-s-3); padding: var(--rl-s-2); border-radius: var(--rl-r-sm); cursor: pointer; min-height: 44px; }
.rl-palette__item[aria-selected="true"] { background: var(--rl-selected); }
.rl-palette__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.rl-palette__label { font-weight: 600; color: var(--rl-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-palette__sub { font-size: var(--rl-fs-sm); color: var(--rl-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-palette__kind { flex: none; padding: 1px 8px; border-radius: var(--rl-r-pill); border: 1px solid var(--rl-border); font-size: var(--rl-fs-xs); color: var(--rl-ink-3); }
.rl-palette__foot { display: flex; gap: var(--rl-s-4); padding: var(--rl-s-2) var(--rl-s-4); border-top: 1px solid var(--rl-border); font-size: var(--rl-fs-xs); color: var(--rl-ink-3); }
.rl-palette__foot kbd { margin-right: 2px; }
@media (max-width: 767px) {
  .rl-palette { top: 0; left: 0; transform: none; width: 100vw; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
  .rl-palette__foot { display: none; }
}

.rl-menu {
  position: fixed; z-index: var(--rl-z-layer); min-width: 220px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow-y: auto;
  padding: 6px; background: var(--rl-surface); border: 1px solid var(--rl-border); border-radius: var(--rl-r-md); box-shadow: var(--rl-e2);
  animation: rl-fade var(--rl-dur) var(--rl-ease);
}
.rl-menu__item {
  display: flex; align-items: center; gap: var(--rl-s-2); width: 100%; min-height: 38px; padding: 6px 10px;
  border: 0; border-radius: var(--rl-r-sm); background: transparent; color: var(--rl-ink);
  font: 500 var(--rl-fs-sm)/1.3 var(--rl-font-ui); text-align: left; text-decoration: none; cursor: pointer;
}
.rl-menu__item:hover, .rl-menu__item:focus { background: var(--rl-hover); }
.rl-menu__item:focus { outline: none; }
.rl-menu__item:focus-visible { outline: 2px solid var(--rl-focus); outline-offset: -2px; }
.rl-menu__item:disabled { color: var(--rl-disabled-ink); cursor: not-allowed; background: transparent; }
.rl-menu__item--danger { color: var(--rl-bad); }
.rl-menu__label { flex: 1 1 auto; min-width: 0; }
.rl-menu__hint { flex: none; font-size: var(--rl-fs-xs); color: var(--rl-ink-3); }
.rl-menu__check { flex: none; color: var(--rl-brand-text); display: inline-flex; }
.rl-menu__sep { height: 1px; margin: 6px 4px; background: var(--rl-border); }
.rl-menu__heading--plain { text-transform: none !important; letter-spacing: 0 !important; font-size: var(--rl-fs-sm) !important; color: var(--rl-ink) !important; }
.rl-menu__heading { padding: 8px 10px 4px; font-size: var(--rl-fs-xs); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--rl-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 767px) { .rl-menu__item { min-height: 48px; font-size: var(--rl-fs-md); } }

/* ---- Toasts ----------------------------------------------------------------------------------------- */
.rl-toasts {
  position: fixed; left: var(--rl-s-4); bottom: var(--rl-s-4); z-index: var(--rl-z-toast);
  display: flex; flex-direction: column; gap: var(--rl-s-2); width: min(420px, calc(100vw - 32px)); pointer-events: none;
}
.rl-toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: var(--rl-s-2);
  padding: var(--rl-s-3) var(--rl-s-2) var(--rl-s-3) var(--rl-s-3);
  background: var(--rl-surface); color: var(--rl-ink); border: 1px solid var(--rl-border); border-left: 4px solid var(--rl-info);
  border-radius: var(--rl-r-md); box-shadow: var(--rl-e2); font: 500 var(--rl-fs-sm)/1.4 var(--rl-font-ui);
  animation: rl-rise var(--rl-dur) var(--rl-ease);
}
.rl-toast__icon { flex: none; display: inline-flex; margin-top: 1px; color: var(--rl-info); }
.rl-toast__msg { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; padding-top: 1px; }
.rl-toast__side { flex: none; display: flex; align-items: center; gap: 2px; margin-top: -4px; }
.rl-toast__action {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 8px; border: 0; border-radius: var(--rl-r-sm);
  background: transparent; color: var(--rl-brand-text); font: 700 var(--rl-fs-sm)/1 var(--rl-font-ui); text-decoration: none; cursor: pointer;
}
.rl-toast__action:hover { background: var(--rl-hover); text-decoration: underline; }
.rl-toast__close {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: var(--rl-r-sm);
  background: transparent; color: var(--rl-ink-3); cursor: pointer;
}
.rl-toast__close:hover { background: var(--rl-hover); color: var(--rl-ink); }
.rl-toast--ok { border-left-color: var(--rl-ok); }
.rl-toast--ok .rl-toast__icon { color: var(--rl-ok); }
.rl-toast--bad { border-left-color: var(--rl-bad); }
.rl-toast--bad .rl-toast__icon { color: var(--rl-bad); }
.rl-toast--working { border-left-color: var(--rl-brand); }
.rl-toast--working .rl-toast__icon { color: var(--rl-brand-text); }
@media (min-width: 1100px) { html.rl-shell .rl-toasts { left: calc(var(--rl-rail-w) + var(--rl-s-4)); } }
@media (min-width: 768px) and (max-width: 1099px) { html.rl-shell .rl-toasts { left: calc(var(--rl-rail-w-compact) + var(--rl-s-4)); } }
@media (max-width: 767px) {
  .rl-toasts { left: var(--rl-s-4); right: var(--rl-s-4); width: auto; }
  html.rl-shell .rl-toasts { bottom: calc(var(--rl-bottombar-h) + env(safe-area-inset-bottom) + var(--rl-s-2)); }
}

/* ---- Empty state, skeleton, banner -------------------------------------------------------------------- */
.rl-empty { padding: var(--rl-s-10) var(--rl-s-4); text-align: center; color: var(--rl-ink-3); }
.rl-empty > .rl-icon { color: var(--rl-ink-3); margin-bottom: var(--rl-s-2); }
.rl-empty__title { margin: 0; font-size: var(--rl-fs-lg); font-weight: 600; color: var(--rl-ink-2); }
.rl-empty__body { margin: var(--rl-s-1) 0 0; font-size: var(--rl-fs-sm); }
.rl-empty__action { margin: var(--rl-s-4) 0 0; }

.rl-skel { display: flex; flex-direction: column; gap: var(--rl-s-4); padding: var(--rl-s-2) 0; }
.rl-skel__row { display: flex; align-items: center; gap: var(--rl-s-3); }
.rl-skel__lines { flex: 1 1 auto; display: flex; flex-direction: column; gap: var(--rl-s-2); }
.rl-skel__line, .rl-skel__block {
  background-color: var(--rl-skel-base);
  background-image: linear-gradient(90deg, transparent 0, var(--rl-skel-shine) 50%, transparent 100%);
  background-size: 200% 100%; background-repeat: no-repeat;
  animation: rl-shimmer 1.4s ease-in-out infinite; border-radius: var(--rl-r-sm);
}
.rl-skel__block { flex: none; width: 40px; height: 40px; border-radius: var(--rl-r-md); }
.rl-skel__line { height: 12px; width: 70%; }
.rl-skel__line + .rl-skel__line { width: 45%; }
.rl-skel__row:nth-child(2n) .rl-skel__line:first-child { width: 58%; }
.rl-skel__row:nth-child(3n) .rl-skel__line:first-child { width: 80%; }
.rl-still-loading { margin: var(--rl-s-2) 0 0; font-size: var(--rl-fs-sm); color: var(--rl-ink-3); }

.rl-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--rl-s-2) var(--rl-s-3);
  padding: var(--rl-s-3) var(--rl-s-4); margin: 0 0 var(--rl-s-4); border-radius: var(--rl-r-md);
  background: var(--rl-info-bg); color: var(--rl-info); font-size: var(--rl-fs-sm); font-weight: 500;
}
.rl-banner--warn { background: var(--rl-warn-bg); color: var(--rl-warn); }
.rl-banner--bad { background: var(--rl-bad-bg); color: var(--rl-bad); }
.rl-banner--info { background: var(--rl-info-bg); color: var(--rl-info); }
.rl-banner a:not(.rl-btn) { color: inherit; font-weight: 700; text-decoration: underline; }
.rl-banner__text { flex: 1 1 240px; min-width: 0; }
.rl-banner__actions { display: flex; flex-wrap: wrap; gap: var(--rl-s-2); margin-left: auto; }

/* ---- Stepper ---------------------------------------------------------------------------------------- */
.rl-stepper { display: flex; list-style: none; margin: 0; padding: 0; }
.rl-step { position: relative; flex: 1 1 0; min-width: 0; padding: 24px 4px 0; text-align: center; font-size: var(--rl-fs-xs); color: var(--rl-ink-3); }
.rl-step::before {
  content: ""; position: absolute; top: 4px; left: 50%; z-index: 1; width: 14px; height: 14px; margin-left: -7px;
  border-radius: 50%; background: var(--rl-surface); border: 2px solid var(--rl-border-strong);
}
.rl-step::after { content: ""; position: absolute; top: 10px; left: calc(-50% + 9px); right: calc(50% + 9px); height: 2px; background: var(--rl-border-strong); }
.rl-step:first-child::after { display: none; }
.rl-step--done { color: var(--rl-ink-2); }
.rl-step--done::before { background: var(--rl-ok); border-color: var(--rl-ok); }
.rl-step--done::after, .rl-step--current::after { background: var(--rl-ok); }
.rl-step--current { color: var(--rl-ink); font-weight: 700; }
.rl-step--current::before { background: var(--rl-brand); border-color: var(--rl-brand); box-shadow: 0 0 0 4px var(--rl-brand-soft); }
.rl-step--skipped { color: var(--rl-disabled-ink); text-decoration: line-through; }
.rl-step--skipped::before { border-style: dashed; }
@media (max-width: 767px) {
  .rl-stepper { flex-direction: column; }
  .rl-step { flex: none; padding: 0 0 var(--rl-s-4) 28px; text-align: left; }
  .rl-step::before { top: 2px; left: 0; margin-left: 0; }
  .rl-step::after { top: auto; bottom: calc(100% - 4px); left: 6px; right: auto; width: 2px; height: calc(100% - 4px); }
}

/* ---- Units grid ---------------------------------------------------------------------------------------- */
.rl-units { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--rl-s-3); }
.rl-unit {
  display: block; min-width: 0; padding: var(--rl-s-3); color: inherit; text-decoration: none;
  background: var(--rl-surface-2); border: 1px solid var(--rl-border); border-top: 3px solid var(--rl-unit-color, var(--rl-border-strong));
  border-radius: var(--rl-r-md);
}
a.rl-unit:hover { border-color: var(--rl-border-strong); border-top-color: var(--rl-unit-color, var(--rl-border-strong)); }
.rl-unit--occupied { --rl-unit-color: var(--rl-ok); }
.rl-unit--notice { --rl-unit-color: var(--rl-warn); }
.rl-unit--vacant { --rl-unit-color: var(--rl-n-400); }
.rl-unit--late { --rl-unit-color: var(--rl-bad); }
@media (max-width: 767px) { .rl-units { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--rl-s-2); } }

/* ---- Work board ------------------------------------------------------------------------------------------ */
.rl-board { display: flex; align-items: flex-start; gap: var(--rl-s-3); overflow-x: auto; padding-bottom: var(--rl-s-2); scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.rl-col { flex: 0 0 272px; display: flex; flex-direction: column; gap: var(--rl-s-2); padding: var(--rl-s-2); background: var(--rl-sunken); border-radius: var(--rl-r-md); scroll-snap-align: start; }
.rl-col__head { display: flex; justify-content: space-between; align-items: center; gap: var(--rl-s-2); padding: 4px 6px; font-size: var(--rl-fs-sm); font-weight: 700; color: var(--rl-ink-2); }
.rl-tcard {
  display: block; padding: 10px 12px; color: inherit; text-decoration: none; overflow-wrap: anywhere;
  background: var(--rl-surface); border: 1px solid var(--rl-border); border-radius: var(--rl-r-sm); box-shadow: var(--rl-e1);
}
a.rl-tcard:hover { border-color: var(--rl-border-strong); }

/* ===== Motion ============================================================== */
@keyframes rl-spin { to { transform: rotate(360deg); } }
@keyframes rl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rl-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rl-slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rl-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@media (prefers-reduced-motion: reduce) {
  .rl-skel__line, .rl-skel__block { animation: none; }
  .rl-scrim, .rl-drawer, .rl-sheet, .rl-palette, .rl-menu, .rl-toast { animation: none; }
  .rl-spinner, .rl-btn[aria-busy="true"]::before { animation-duration: 2.4s; }
}

/* ===== First paint for a returning user of the new console (js/rl/boot.js) ===== */
/* boot.js marks <html> rl-booting before anything is drawn; the old page header
   and "Loading…" give way to this skeleton until the shell takes over
   (html.rl-shell) or sign-in shows (shell.js clears the mark). */
.rl-boot { display: none; }
html.rl-booting:not(.rl-shell) body > header.header,
html.rl-booting:not(.rl-shell) section.page-header,
html.rl-booting:not(.rl-shell) footer.footer,
html.rl-booting:not(.rl-shell) #loading { display: none !important; }
html.rl-booting:not(.rl-shell) .rl-boot { display: flex; position: fixed; inset: 0; z-index: var(--rl-z-layer); background: var(--rl-bg); }
.rl-boot__rail { flex: none; width: var(--rl-rail-w); background: var(--rl-rail-bg); }
.rl-boot__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.rl-boot__top { flex: none; height: var(--rl-topbar-h); border-bottom: 1px solid var(--rl-border); background: var(--rl-surface); }
.rl-boot__body { padding: var(--rl-s-6) var(--rl-gutter); max-width: var(--rl-content-max); width: 100%; box-sizing: border-box; }
.rl-boot__strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--rl-s-3); margin-bottom: var(--rl-s-6); }
.rl-boot__strip .rl-skel__block { width: auto; height: 84px; }
@media (max-width: 767px) {
  .rl-boot__rail { display: none; }
  .rl-boot__strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ===== Leases & documents in the shell: the issued list first ============== */
.rl-docs-tools { display: none; }
html.rl-shell #docsView:not(.hidden) { display: flex; flex-direction: column; }
html.rl-shell #docsView > .rl-docs-tools { display: flex; flex-wrap: wrap; gap: var(--rl-s-2); order: 0; margin: 0 0 var(--rl-s-4); }
html.rl-shell #docsView > [data-rl-doc="send"],
html.rl-shell #docsView > [data-rl-doc="upload"] { display: none; order: 1; }
html.rl-shell #docsView > [data-rl-doc].rl-doc-open { display: block; }
html.rl-shell #docsView > [data-rl-doc="list-head"] { order: 2; }
html.rl-shell #docsView > #docsList { order: 3; }

/* ===== Rent roll: rare actions behind "More" ================================= */
.rl-roll-more { display: inline-block; position: relative; float: right; margin-left: var(--rl-s-2); }
.rl-roll-more > summary { list-style: none; cursor: pointer; }
.rl-roll-more > summary::-webkit-details-marker { display: none; }
.rl-roll-more__menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 2; padding: var(--rl-s-2); background: var(--rl-surface); border: 1px solid var(--rl-border); border-radius: var(--rl-r-md); box-shadow: var(--rl-e2); white-space: nowrap; }
.rl-roll-more__menu #rebuildLedger { float: none !important; margin: 0 !important; }

/* ===== Unit tile: a lease that starts in the future ========================= */
.rl-unit--moving_in { --rl-unit-color: var(--rl-info); }
