/*
 * Purpose: Owner dashboard - listings, wizard, availability, leads.
 * Builds on account.css, which is always loaded alongside it.
 */

/* ------------------------------------------------------------------ TABS */

.rh-owner-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-20);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--rh-border);
  overflow-x: auto;
}

.rh-owner-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  min-height: 36px;
  padding: var(--space-4) var(--space-12);
  border-radius: var(--r-pill);
  color: var(--rh-text-secondary);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.rh-owner-tab:hover {
  background-color: var(--rh-surface);
  color: var(--rh-teal);
  text-decoration: none;
}

.rh-owner-tab.is-active {
  background-color: var(--rh-teal-12);
  color: var(--rh-teal);
}

.rh-owner-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding-inline: var(--space-4);
  border-radius: var(--r-pill);
  background-color: var(--rh-surface);
  color: var(--rh-text-secondary);
  font-size: var(--fs-12);
}

.rh-owner-tab.is-active .rh-owner-tab__count {
  background-color: var(--rh-white);
  color: var(--rh-teal);
}

/* -------------------------------------------------------------- LISTINGS */

.rh-owner-list {
  display: grid;
  gap: var(--space-12);
}

.rh-owner-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: var(--space-16);
  padding: var(--space-12);
  border: 1px solid var(--rh-border);
  border-radius: var(--r-card);
  background-color: var(--rh-white);
}

@media (min-width: 768px) {
  .rh-owner-item {
    grid-template-columns: 104px minmax(0, 1fr) auto;
    align-items: center;
  }
}

.rh-owner-item__media {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-sm);
  overflow: hidden;
  background-color: var(--rh-surface);
}

.rh-owner-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rh-owner-item__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--rh-border-strong);
}

.rh-owner-item__title {
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
}

.rh-owner-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-8);
  margin-top: var(--space-4);
  font-size: var(--fs-caption);
  color: var(--rh-text-secondary);
}

.rh-owner-item__note {
  margin-top: var(--space-4);
  font-size: var(--fs-caption);
  color: var(--rh-text-secondary);
}

.rh-owner-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .rh-owner-item__actions {
    grid-column: auto;
  }
}

/* ---------------------------------------------------------------- ALERTS */

.rh-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
  padding: var(--space-16);
  border-radius: var(--r-card);
  margin-bottom: var(--space-24);
}

.rh-alert--warning {
  border: 1px solid var(--rh-warning);
  background-color: var(--rh-lime-light);
}

.rh-alert .rh-icon {
  flex-shrink: 0;
  color: var(--rh-warning-text);
}

.rh-alert__title {
  font-weight: var(--fw-semibold);
}

.rh-alert__text {
  margin-block: var(--space-4) var(--space-12);
  font-size: var(--fs-small);
  color: var(--rh-text-secondary);
}

/* ---------------------------------------------------------------- WIZARD */

.rh-wizard__progress {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  margin-bottom: var(--space-24);
  padding-bottom: var(--space-8);
  list-style: none;
}

.rh-wizard__progress-item {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  padding: var(--space-4) var(--space-12);
  border-radius: var(--r-pill);
  font-size: var(--fs-caption);
  color: var(--rh-text-secondary);
  white-space: nowrap;
}

.rh-wizard__progress-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  background-color: var(--rh-surface);
  font-weight: var(--fw-bold);
}

.rh-wizard__progress-item.is-current {
  background-color: var(--rh-teal-light);
  color: var(--rh-teal);
}

.rh-wizard__progress-item.is-current .rh-wizard__progress-number {
  background-color: var(--rh-teal);
  color: var(--rh-text-inverse);
}

.rh-wizard__progress-item.is-done .rh-wizard__progress-number {
  background-color: var(--rh-success);
  color: var(--rh-text-inverse);
}

/* Comfortable reading width - a full-bleed form is miserable to fill in. */
.rh-wizard__form {
  max-width: 760px;
}

.rh-wizard__title {
  font-size: var(--fs-h4);
  margin-bottom: var(--space-8);
}

.rh-wizard__intro {
  margin-bottom: var(--space-20);
  font-size: var(--fs-small);
  color: var(--rh-text-secondary);
  line-height: var(--lh-relaxed);
}

.rh-wizard__step .rh-field + .rh-field,
.rh-wizard__step .rh-field + fieldset,
.rh-wizard__step fieldset + .rh-field,
.rh-wizard__step fieldset + fieldset {
  margin-top: var(--space-20);
}

.rh-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-16);
}

.rh-field-grid .rh-field + .rh-field {
  margin-top: 0;
}

/*
 * A standalone field after a grid of fields had nothing above it, so the label
 * sat flush against the row of selects. Matching the grid's own gap keeps one
 * rhythm down the form.
 */
.rh-field-grid + .rh-field,
.rh-field-grid + .rh-field-grid {
  margin-top: var(--space-16);
}

.rh-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.rh-field--inline {
  display: flex;
  align-items: flex-end;
}

/* Room rows */
.rh-room-row {
  padding: var(--space-16);
  border: 1px solid var(--rh-border);
  border-radius: var(--r-card);
  background-color: var(--rh-surface);
}

.rh-room-row + .rh-room-row {
  margin-top: var(--space-12);
}

.rh-room-row__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-12);
}

.rh-room-row__grid .rh-field + .rh-field {
  margin-top: 0;
}

.rh-room-row .rh-link-btn {
  margin-top: var(--space-12);
  color: var(--rh-error-text);
}

.rh-rooms-editor {
  margin-bottom: var(--space-16);
}

/* Upload */
.rh-upload__drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  padding: var(--space-32);
  border: 2px dashed var(--rh-border-strong);
  border-radius: var(--r-card);
  background-color: var(--rh-surface);
  color: var(--rh-text-secondary);
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

.rh-upload__drop:hover {
  border-color: var(--rh-teal);
  color: var(--rh-teal);
}

.rh-upload__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-16);
}

.rh-upload__item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background-color: var(--rh-surface);
}

.rh-upload__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rh-upload__remove {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: var(--r-pill);
  background-color: rgba(3, 38, 34, 0.7);
  color: var(--rh-white);
  cursor: pointer;
}

/* Footer */
/*
 * Two groups: leaving on the left, progressing on the right.
 *
 * `margin-left: auto` on the primary button alone put whatever came before it
 * wherever there happened to be room, so Back, the saved indicator and Save and
 * exit drifted about depending on which of them was showing. Pushing the gap
 * after the leave-group instead keeps both sides put no matter what is hidden.
 */
.rh-wizard__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-12);
  margin-top: var(--space-32);
  padding-top: var(--space-20);
  border-top: 1px solid var(--rh-border);
}

.rh-wizard__foot .js-wizard-save {
  margin-right: auto;
}

@media (max-width: 639px) {
  /* Stacked, with the action you most likely want first. */
  .rh-wizard__foot {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .rh-wizard__foot .js-wizard-save {
    margin-right: 0;
  }

  .rh-wizard__foot .rh-btn {
    width: 100%;
  }
}

.rh-wizard__saved {
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  color: var(--rh-success);
}

.rh-wizard__review {
  margin-top: var(--space-20);
  padding: var(--space-16);
  border: 1px solid var(--rh-warning);
  border-radius: var(--r-card);
  background-color: var(--rh-lime-light);
}

.rh-wizard__review-title {
  font-size: var(--fs-small);
  margin-bottom: var(--space-8);
}

.rh-wizard__review-list {
  margin-left: var(--space-16);
  list-style: disc;
  font-size: var(--fs-small);
  color: var(--rh-text-secondary);
}

/* ---------------------------------------------------------- AVAILABILITY */

.rh-availability-list {
  display: grid;
  gap: var(--space-16);
}

.rh-availability-card {
  padding: var(--space-16);
  border: 1px solid var(--rh-border);
  border-radius: var(--r-card);
  background-color: var(--rh-white);
}

.rh-availability-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.rh-availability-card__title {
  font-size: var(--fs-body);
}

.rh-availability-card__state {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
  font-size: var(--fs-caption);
  color: var(--rh-text-secondary);
}

.rh-availability-card__state--fresh { color: var(--rh-success); }
.rh-availability-card__state--ageing { color: var(--rh-warning); }
.rh-availability-card__state--stale { color: var(--rh-error); }

.rh-availability-rooms {
  display: grid;
  gap: var(--space-8);
  padding-block: var(--space-12);
  border-top: 1px solid var(--rh-border);
}

.rh-availability-room {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
}

.rh-availability-room__info {
  display: flex;
  flex-direction: column;
}

.rh-availability-room__name {
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
}

.rh-availability-room__rent {
  font-size: var(--fs-caption);
  color: var(--rh-text-secondary);
}

.rh-availability-room__control {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.rh-availability-room__control .rh-field__label {
  margin: 0;
  font-size: var(--fs-caption);
  white-space: nowrap;
}

.rh-input--tiny {
  width: 72px;
  text-align: center;
}

.rh-availability-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-12);
  padding-top: var(--space-12);
  border-top: 1px solid var(--rh-border);
}

.rh-record--lead .rh-record__actions {
  flex-wrap: wrap;
}

.rh-dashboard__head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}

/* ------------------------------------------------------------ OPERATIONS */

.rh-queue {
  display: grid;
  gap: var(--space-16);
}

.rh-queue-item {
  padding: var(--space-20);
  border: 1px solid var(--rh-border);
  border-radius: var(--r-card);
  background-color: var(--rh-white);
}

.rh-queue-item__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-12);
}

.rh-queue-item__title {
  font-size: var(--fs-h5);
}

.rh-queue-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-8);
  margin-top: var(--space-4);
  font-size: var(--fs-caption);
  color: var(--rh-text-secondary);
}

.rh-record__status--flagged {
  background-color: var(--rh-lime-light);
  color: var(--rh-error-text);
}

.rh-queue-item__rooms {
  margin-top: var(--space-12);
  padding: var(--space-12);
  border-radius: var(--r-sm);
  background-color: var(--rh-surface);
  font-size: var(--fs-caption);
  color: var(--rh-text-secondary);
  display: grid;
  gap: var(--space-4);
}

.rh-queue-item__checks {
  margin-top: var(--space-16);
  padding: var(--space-12) var(--space-16);
  border: 1px solid var(--rh-border);
  border-radius: var(--r-card);
}

.rh-queue-item__checks legend {
  padding-inline: var(--space-8);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  color: var(--rh-text-secondary);
}

.rh-queue-item__checks .rh-choice {
  display: inline-flex;
  margin-right: var(--space-16);
}

.rh-queue-item__decision {
  margin-top: var(--space-16);
}

.rh-queue-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-12);
}

.rh-record__detail {
  margin-top: var(--space-8);
  padding: var(--space-8) var(--space-12);
  border-left: 3px solid var(--rh-border);
  font-size: var(--fs-small);
  color: var(--rh-text-secondary);
}

/* ------------------------------------------------------- PLAN AND BOOSTS */

.rh-plan-current {
  display: grid;
  gap: var(--space-16);
  padding: var(--space-20);
  border: 1px solid var(--rh-border);
  border-radius: var(--r-card);
  background-color: var(--rh-surface);
  margin-bottom: var(--space-24);
}

@media (min-width: 640px) {
  .rh-plan-current {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.rh-plan-current__label {
  font-size: var(--fs-caption);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--rh-text-secondary);
}

.rh-plan-current__name {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  margin-top: var(--space-4);
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
}

.rh-plan-current__meta {
  margin-top: var(--space-4);
  font-size: var(--fs-caption);
  color: var(--rh-text-secondary);
}

.rh-plan-current__meta--warn {
  color: var(--rh-warning-text);
  font-weight: var(--fw-semibold);
}

.rh-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-16);
}

.rh-plan-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-20);
  border: 1px solid var(--rh-border);
  border-radius: var(--r-card);
  background-color: var(--rh-white);
}

.rh-plan-card.is-highlighted {
  border-color: var(--rh-teal);
  box-shadow: var(--shadow-md);
}

.rh-plan-card.is-current {
  background-color: var(--rh-teal-light);
  border-color: var(--rh-teal);
}

.rh-plan-card__name {
  font-size: var(--fs-h5);
}

.rh-plan-card__price {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.rh-plan-card__price strong {
  font-size: var(--fs-h3);
}

.rh-plan-card__price span {
  font-size: var(--fs-caption);
  color: var(--rh-text-secondary);
}

.rh-plan-card__summary {
  margin-top: var(--space-8);
  font-size: var(--fs-small);
  color: var(--rh-text-secondary);
}

.rh-plan-card__features {
  display: grid;
  gap: var(--space-8);
  margin-block: var(--space-16);
  font-size: var(--fs-small);
}

.rh-plan-card__features li {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.rh-plan-card__features .rh-icon {
  color: var(--rh-success);
  flex-shrink: 0;
}

.rh-plan-card .rh-btn {
  margin-top: auto;
}

.rh-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16);
  margin-top: var(--space-16);
}

.rh-boost-list {
  display: grid;
  gap: var(--space-12);
}

.rh-boost-card {
  padding: var(--space-16);
  border: 1px solid var(--rh-border);
  border-radius: var(--r-card);
  background-color: var(--rh-white);
}

.rh-boost-card__title {
  font-size: var(--fs-body);
}

.rh-boost-card__active {
  margin-top: var(--space-4);
  font-size: var(--fs-caption);
  color: var(--rh-teal);
  font-weight: var(--fw-semibold);
}

.rh-boost-card__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-8);
  margin-top: var(--space-12);
}

/* ----------------------------------------------------------------- TABLE */

.rh-table-wrap {
  overflow-x: auto;
}

.rh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-small);
}

.rh-table th,
.rh-table td {
  padding: var(--space-12);
  border-bottom: 1px solid var(--rh-border);
  text-align: left;
}

.rh-table thead th {
  font-size: var(--fs-caption);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--rh-text-secondary);
}

/* Below 640px the table becomes stacked cards - a wide analytics table on a
   phone is unreadable, and hiding columns would drop real information. */
@media (max-width: 639px) {
  .rh-table thead {
    display: none;
  }

  .rh-table tr {
    display: block;
    margin-bottom: var(--space-12);
    border: 1px solid var(--rh-border);
    border-radius: var(--r-card);
    padding: var(--space-8);
  }

  .rh-table td,
  .rh-table th {
    display: flex;
    justify-content: space-between;
    gap: var(--space-12);
    border-bottom: 0;
    padding: var(--space-8);
  }

  .rh-table td::before {
    content: attr(data-label);
    font-size: var(--fs-caption);
    color: var(--rh-text-secondary);
  }
}

/* --------------------------------------------------- OWNER VERIFICATION */

/*
 * The screen an unverified account sees in place of the owner tools. Narrow
 * measure: this is a form plus an explanation, not a dashboard.
 */
/*
 * The application screen is a single task on an otherwise empty page, so it is
 * laid out as one column of a deliberate width rather than as running text in
 * the site's reading container. Everything - heading, status, form panel -
 * shares that width so the left and right edges line up down the whole page.
 */
.rh-verify {
  --rh-verify-width: 560px;

  padding-block: var(--space-32) var(--space-64);
}

@media (min-width: 768px) {
  .rh-verify {
    padding-block: var(--space-48) var(--space-80);
  }
}

.rh-verify .rh-container {
  max-width: calc(var(--rh-verify-width) + (var(--container-pad) * 2));
}

.rh-verify__head {
  margin-bottom: var(--space-24);
}

@media (min-width: 768px) {
  .rh-verify__head {
    margin-bottom: var(--space-32);
  }
}

.rh-verify__eyebrow {
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--rh-teal);
}

.rh-verify__title {
  margin-top: var(--space-8);
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
}

.rh-verify__intro {
  margin-top: var(--space-12);
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
  color: var(--rh-text-secondary);
}

/* Current state of an application already in progress. */
.rh-verify__status {
  padding: var(--space-20);
  margin-bottom: var(--space-32);
  border: 1px solid var(--rh-border);
  border-left: 3px solid var(--rh-border-strong);
  border-radius: var(--r-card);
  background-color: var(--rh-surface);
}

.rh-verify__status--submitted {
  border-left-color: var(--rh-teal);
}

.rh-verify__status--more_info {
  border-left-color: var(--rh-warning);
}

.rh-verify__status--rejected {
  border-left-color: var(--rh-error);
}

.rh-verify__status--approved {
  border-left-color: var(--rh-success);
}

.rh-verify__status-label {
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--rh-text-secondary);
}

.rh-verify__status-text {
  margin-top: var(--space-8);
  line-height: var(--lh-relaxed);
}

.rh-verify__note {
  margin-top: var(--space-16);
  padding: var(--space-12) var(--space-16);
  border-radius: var(--r-input);
  background-color: var(--rh-white);
}

.rh-verify__note-label {
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  color: var(--rh-text-secondary);
  margin-bottom: var(--space-4);
}

/*
 * The form is a panel, so the task has an edge. Before this it was a run of
 * fields on bare white with nothing holding them together.
 */
.rh-verify__form {
  gap: var(--space-24);
  max-width: none;
  padding: var(--space-24);
  border: 1px solid var(--rh-border);
  border-radius: var(--r-card);
  background-color: var(--rh-white);
}

@media (min-width: 768px) {
  .rh-verify__form {
    padding: var(--space-32);
  }
}

/*
 * .rh-form already spaces its children with a flex gap. This block added a
 * margin on top of that gap, so consecutive fields sat 44px apart while
 * everything else on the page sat 20px apart, and the form read as a set of
 * unrelated pieces. The gap above is the single source of that rhythm now.
 */

/* Confirms a document is already held, so it need not be sent again. */
.rh-verify__have {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  color: var(--rh-success);
}

/*
 * The foot of the form. It is separated by a rule rather than by more empty
 * space, so the gap between the last question and the submit control reads as a
 * boundary instead of as a missing field.
 */
.rh-verify__foot {
  display: grid;
  gap: var(--space-20);
  margin-top: var(--space-8);
  padding-top: var(--space-24);
  border-top: 1px solid var(--rh-border);
}

.rh-verify__privacy {
  display: flex;
  align-items: flex-start;
  gap: var(--space-12);
  padding: var(--space-16);
  border-radius: var(--r-input);
  background-color: var(--rh-teal-light);
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
  color: var(--rh-text-primary);
}

.rh-verify__privacy .rh-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--rh-teal);
}

.rh-verify__actions {
  display: grid;
  gap: var(--space-12);
  justify-items: start;
}

.rh-verify__timing {
  font-size: var(--fs-caption);
  color: var(--rh-text-secondary);
}

@media (max-width: 639px) {
  .rh-verify__actions .rh-btn {
    width: 100%;
  }

  .rh-verify__actions {
    justify-items: stretch;
  }
}

/* ------------------------------------------------ OWNER APPLICATION QUEUE */

.rh-kyc-record__docs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-top: var(--space-8);
}

.rh-kyc-record__doc {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-8);
  border: 1px solid var(--rh-border);
  border-radius: var(--r-pill);
  font-size: var(--fs-12);
  font-weight: var(--fw-semibold);
  color: var(--rh-teal);
}

.rh-kyc-record__doc:hover {
  border-color: var(--rh-teal);
  background-color: var(--rh-teal-light);
  text-decoration: none;
}

.rh-kyc-record__missing {
  padding: var(--space-4) var(--space-8);
  border-radius: var(--r-pill);
  background-color: var(--rh-surface);
  font-size: var(--fs-12);
  color: var(--rh-error-text);
}

.rh-kyc-record__purged {
  font-style: italic;
}

.rh-kyc-record__actions {
  display: grid;
  gap: var(--space-8);
  min-width: 260px;
}

.rh-kyc-record__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.rh-kyc-record__message {
  font-size: var(--fs-caption);
}

.rh-kyc-record__message.is-ok {
  color: var(--rh-success);
}

.rh-kyc-record__message.is-error {
  color: var(--rh-error-text);
}

/* -------------------------------------------------- OPERATIONS SECTIONS

   Shared shell for every screen inside /operations/. These classes were used by
   the review queue and application markup but never defined anywhere.
   ------------------------------------------------------------------------ */

.rh-ops-section {
  display: grid;
  gap: var(--space-20);
}

.rh-ops-section__head .rh-dashboard__section-title {
  margin-bottom: var(--space-4);
}

.rh-ops-section__head .rh-dashboard__section-note {
  margin-bottom: 0;
  max-width: 68ch;
}

.rh-ops-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
}

.rh-ops-section__count {
  font-size: var(--fs-caption);
  color: var(--rh-text-secondary);
}

/* ------------------------------------------------------------- ROSTERS */

/*
 * The owner and member tables. Each cell stacks a headline figure over the
 * detail behind it, so a row can be read at a glance and still answer a
 * follow-up question without opening anything.
 */
.rh-table--roster th[scope="row"] {
  font-weight: var(--fw-regular);
}

.rh-roster__name {
  display: block;
  font-weight: var(--fw-semibold);
  color: var(--rh-text-primary);
}

.rh-roster__figure {
  display: block;
  font-weight: var(--fw-semibold);
  color: var(--rh-text-primary);
}

.rh-roster__meta {
  display: block;
  font-size: var(--fs-caption);
  color: var(--rh-text-secondary);
}

.rh-roster__link {
  display: inline-block;
  margin-top: var(--space-4);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  color: var(--rh-teal);
}

/*
 * In the stacked phone view the cells become label-and-value rows, so the
 * stacked spans need to sit right-aligned against the label rather than
 * starting a new block on the left.
 */
@media (max-width: 639px) {
  .rh-table--roster td,
  .rh-table--roster th[scope="row"] {
    align-items: flex-start;
  }

  .rh-table--roster td > span,
  .rh-table--roster th[scope="row"] > span {
    text-align: right;
  }
}

/*
 * A status message that follows a block in plain flow needs its own gap - it is
 * hidden most of the time, so it is the element that gets forgotten. Scoped to
 * the two places a message sits outside a flex or grid container, rather than
 * given a blanket margin that would double up wherever a gap already applies.
 */
.rh-renewal + .rh-form__message {
  margin-top: var(--space-12);
}

/* A roster figure that needs attention, such as an owner over their allowance. */
.rh-roster__meta--warn {
  color: var(--rh-warning-text);
  font-weight: var(--fw-semibold);
}

/* ---------------------------------------------------------------- CHECKOUT

   One task on an otherwise empty page, laid out as a single column of a
   deliberate width - the same treatment as the verification screen.
   ------------------------------------------------------------------------ */

.rh-checkout {
  --rh-checkout-width: 560px;

  padding-block: var(--space-32) var(--space-64);
}

@media (min-width: 768px) {
  .rh-checkout {
    padding-block: var(--space-48) var(--space-80);
  }
}

.rh-checkout .rh-container {
  max-width: calc(var(--rh-checkout-width) + (var(--container-pad) * 2));
}

.rh-checkout__head {
  margin-bottom: var(--space-24);
}

.rh-checkout__eyebrow {
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--rh-teal);
}

.rh-checkout__title {
  margin-top: var(--space-8);
  font-size: var(--fs-h2);
  line-height: var(--lh-snug);
}

.rh-checkout__intro {
  margin-top: var(--space-12);
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
  color: var(--rh-text-secondary);
}

.rh-checkout__cycles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  margin-bottom: var(--space-20);
}

.rh-checkout__panel {
  padding: var(--space-24);
  border: 1px solid var(--rh-border);
  border-radius: var(--r-card);
  background-color: var(--rh-white);
}

@media (min-width: 768px) {
  .rh-checkout__panel {
    padding: var(--space-32);
  }
}

/* The amount is the one number on the page that must not be skimmed past. */
.rh-checkout__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-16);
  margin-top: var(--space-24);
  padding-top: var(--space-16);
  border-top: 1px solid var(--rh-border);
  font-size: var(--fs-small);
  color: var(--rh-text-secondary);
}

.rh-checkout__total strong {
  font-size: var(--fs-h4);
  color: var(--rh-text-primary);
}

.rh-checkout__tax {
  margin-top: var(--space-8);
  font-size: var(--fs-caption);
  color: var(--rh-text-secondary);
}

.rh-checkout__changes {
  margin-top: var(--space-32);
}

.rh-checkout__subtitle {
  margin-bottom: var(--space-12);
  font-size: var(--fs-h5);
}

.rh-checkout__foot {
  display: grid;
  gap: var(--space-16);
  justify-items: start;
  margin-top: var(--space-32);
  padding-top: var(--space-24);
  border-top: 1px solid var(--rh-border);
}

.rh-checkout__foot .rh-form__message {
  justify-self: stretch;
}

.rh-checkout__note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-8);
  font-size: var(--fs-caption);
  line-height: var(--lh-relaxed);
  color: var(--rh-text-secondary);
}

.rh-checkout__note .rh-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--rh-teal);
}

@media (max-width: 639px) {
  .rh-checkout__foot {
    justify-items: stretch;
  }

  .rh-checkout__foot .rh-btn {
    width: 100%;
  }
}

/* ---------------------------------------------------------------- RENEWAL */

/*
 * Text on the left, the control on the right, both centred against each other.
 * When there is not enough width the control takes its own row and lines up
 * with the text above it rather than floating loose under one corner.
 */
.rh-renewal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12) var(--space-24);
  margin-top: var(--space-16);
  padding: var(--space-20);
  border: 1px solid var(--rh-border);
  border-radius: var(--r-card);
  background-color: var(--rh-white);
}

.rh-renewal__text {
  min-width: 0;
  flex: 1 1 320px;
}

.rh-renewal .js-renewal {
  flex-shrink: 0;
}

.rh-renewal__title {
  font-weight: var(--fw-semibold);
}

.rh-renewal__meta {
  margin-top: var(--space-4);
  max-width: 60ch;
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
  color: var(--rh-text-secondary);
}

@media (max-width: 639px) {
  .rh-renewal .rh-btn {
    width: 100%;
  }

  /* A text link should stay a text link, not stretch to a full-width block. */
  .rh-renewal .rh-link-btn {
    align-self: flex-start;
  }
}
