/* The account pages: one card on the home's tokens (home.css), the form and its states. */
.auth {
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: start center;
  padding-block: 40px 60px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px 28px 24px;
  box-shadow: var(--shadow);
}
.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}
.auth-card .lede {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 0.98rem;
}
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}
.field label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field input[type='email'],
.field input[type='password'],
.field input[type='text'] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: 500 1rem var(--body);
  padding: 12px 14px;
}
.field input:focus-visible {
  outline: 3px solid var(--teal-soft);
  border-color: var(--teal);
}
.field .hint {
  color: var(--muted);
  font-size: 0.85rem;
}
.pw {
  position: relative;
}
.pw input {
  padding-right: 84px;
}
.pw button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--teal-ink);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}
.roles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.role {
  display: flex;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  background: var(--bg);
}
.role:has(input:checked) {
  border-color: var(--teal);
  background: var(--teal-soft);
}
.role input {
  margin-top: 4px;
  accent-color: var(--teal);
}
.role b {
  display: block;
  font-size: 0.95rem;
}
.role span {
  color: var(--muted);
  font-size: 0.85rem;
}
.submit {
  width: 100%;
  border: 0;
  background: var(--teal);
  color: var(--on-teal);
  border-radius: 999px;
  padding: 13px 20px;
  font: 700 1rem var(--body);
  cursor: pointer;
  margin-top: 6px;
}
.submit:hover {
  filter: brightness(1.07);
}
.submit[disabled] {
  opacity: 0.6;
  cursor: wait;
}
.alert {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.93rem;
  margin-bottom: 14px;
  line-height: 1.45;
}
.alert.error {
  background: #fde8e8;
  color: #7f1d1d;
}
.alert.notice {
  background: var(--sun-soft);
}
.alert.ok {
  background: var(--teal-soft);
  color: var(--teal-ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .alert.error {
    background: #3b1515;
    color: #fecaca;
  }
}
:root[data-theme='dark'] .alert.error {
  background: #3b1515;
  color: #fecaca;
}
.switch {
  text-align: center;
  color: var(--muted);
  font-size: 0.93rem;
  margin: 18px 0 0;
}
.switch a {
  color: var(--teal-ink);
  font-weight: 600;
}
.fine {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 14px 0 0;
  text-align: center;
}
.signed {
  display: grid;
  gap: 12px;
}
.signed .who {
  font-weight: 600;
  word-break: break-all;
}
.linkbtn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  font: 600 0.95rem var(--body);
  cursor: pointer;
}
@media (max-width: 480px) {
  .roles {
    grid-template-columns: 1fr;
  }
  .auth-card {
    padding: 22px 18px;
    border-radius: 18px;
  }
}
/* The account page: a column of cards. */
.auth.account {
  place-items: start center;
}
.account-col {
  width: 100%;
  max-width: 640px;
  display: grid;
  gap: 16px;
}
.account-col h1 {
  font-size: 1.8rem;
  margin: 0;
}
.account-col > .lede {
  margin: -6px 0 4px;
}
.account-col .auth-card {
  max-width: none;
}
.auth-card h2 {
  font-size: 1.15rem;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0 0 14px;
}
.kv dt {
  color: var(--muted);
}
.kv dd {
  margin: 0;
  word-break: break-all;
}
.inline {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}
.inline .field {
  margin: 0;
  flex: 1 1 200px;
}
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: 500 1rem var(--body);
  padding: 12px 14px;
}
.terms-text {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  font: 0.92rem/1.5 var(--body);
  margin: 0 0 14px;
}
.bar .linkbtn {
  margin-left: auto;
}
.bar .pill-btn + .linkbtn {
  margin-left: 0;
}
@media (max-width: 480px) {
  .kv {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .kv dd {
    margin-bottom: 8px;
  }
}
.tag {
  display: inline-block;
  font: 600 0.72rem var(--body);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--teal-soft);
  color: var(--teal-ink);
  vertical-align: middle;
}
/* The bookings page: rows, one booking, its ledger, the payment card. */
.booking-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}
.booking-row + .booking-row {
  margin-top: 10px;
}
.booking-row:hover {
  border-color: var(--teal);
}
.row-right {
  text-align: right;
  flex: 0 0 auto;
  display: grid;
  gap: 4px;
  justify-items: end;
}
.small {
  font-size: 0.85rem;
}
.pill {
  display: inline-block;
  font: 600 0.72rem var(--body);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--line);
  color: var(--ink);
}
.pill.confirmed,
.pill.pay-paid,
.pill.pay-declared {
  background: var(--teal-soft);
  color: var(--teal-ink);
}
.pill.requested,
.pill.pay-due,
.pill.pay-requires_action,
.pill.pay-pending {
  background: var(--sun-soft);
}
.empty {
  text-align: center;
  padding: 30px 0;
  display: grid;
  gap: 14px;
  justify-items: center;
}
.one-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  flex-wrap: wrap;
}
.one-head h2 {
  font-size: 1.4rem;
  margin: 0;
}
.ledger-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}
.ledger-table td {
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.ledger-table td:last-child {
  text-align: right;
}
.ledger-table tr.zero td:last-child {
  color: var(--teal);
  font-weight: 800;
}
.ledger-table tr.total td {
  border: 0;
  font-weight: 800;
  font-size: 1.05rem;
  padding-top: 12px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.transfer {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.transfer summary {
  cursor: pointer;
  font-weight: 600;
}
#receipts-list {
  margin: 0;
  padding-left: 18px;
}
.back {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--teal-ink);
  font-weight: 600;
  text-decoration: none;
}
@media (max-width: 560px) {
  .booking-row {
    flex-direction: column;
  }
  .row-right {
    justify-items: start;
    text-align: left;
  }
}
/* The listing's page: what the host declared, the stay form, the price, the quote. */
.listing-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: start;
  width: 100%;
  max-width: 1040px;
}
.listing-head h1 {
  font-size: 1.7rem;
  margin: 0 0 4px;
}
.listing-cover {
  aspect-ratio: 16 / 9;
  margin: 14px 0;
}
.desc {
  white-space: normal;
}
.facts-list {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
}
.facts-list li::before {
  content: '✓ ';
  color: var(--teal);
}
.chips-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips-list li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.9rem;
}
.review {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.review p {
  margin: 4px 0 0;
}
.review .reply {
  color: var(--muted);
  padding-left: 14px;
  border-left: 2px solid var(--line);
  margin-top: 8px;
}
.stay-card {
  position: sticky;
  top: 80px;
}
.stay-card .two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.stay-card .field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: 500 1rem var(--body);
  padding: 11px 12px;
}
@media (max-width: 820px) {
  .listing-grid {
    grid-template-columns: 1fr;
  }
  .stay-card {
    position: static;
  }
}
.listing-grid > * {
  min-width: 0;
}
.stay-card .two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.stay-card .field input {
  min-width: 0;
}
/* The trust block: the signals, the rule, the report or the claim. */
.trust-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  display: grid;
  gap: 8px;
}
.trust-list li {
  padding-left: 26px;
  position: relative;
  line-height: 1.45;
}
.trust-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 800;
  color: var(--teal);
}
.trust-list li.no {
  color: var(--muted);
}
.trust-list li.no::before {
  content: '–';
  color: var(--muted);
}
.trust-rule {
  margin: 0 0 12px;
}
.report summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--teal-ink);
}
.report-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.report-form textarea,
.report-form select,
.report-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: 500 1rem var(--body);
  padding: 11px 12px;
}
/* My listings: the verification of each. */
.listing-card + .listing-card {
  margin-top: 16px;
}
.listing-card h2 {
  font-size: 1.2rem;
}
.verification {
  margin-top: 12px;
}
.docs {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}
.doc-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}
.doc-row > div:first-child {
  flex: 1 1 220px;
  min-width: 0;
}
.doc-form {
  display: grid;
  gap: 8px;
  flex: 0 1 260px;
}
.doc-form input[type='file'] {
  font-size: 0.9rem;
  max-width: 100%;
}
.doc-ok {
  color: var(--teal-ink);
  font-weight: 600;
  word-break: break-all;
}
.pill.ver-verified {
  background: var(--teal-soft);
  color: var(--teal-ink);
}
.pill.ver-pending {
  background: var(--sun-soft);
}
.pill.ver-refused {
  background: #fde8e8;
  color: #7f1d1d;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .pill.ver-refused {
    background: #3b1515;
    color: #fecaca;
  }
}
:root[data-theme='dark'] .pill.ver-refused {
  background: #3b1515;
  color: #fecaca;
}
/* The administrators' queue. */
.doc-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
}
.small-btn {
  padding: 4px 10px;
  font-size: 0.85rem;
  margin-left: 6px;
}
.viewer {
  margin: 10px 0;
}
.doc-frame {
  width: 100%;
  height: 480px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.doc-image {
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
}
/* Photos: the host's grid, the listing's gallery, the home's cover. */
.photo-grid {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.photo-grid li {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
}
.photo-grid li.cover {
  grid-column: span 2;
  grid-row: span 2;
}
.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-grid .badge {
  position: absolute;
  top: 8px;
  left: 8px;
}
.photo-actions {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: flex;
  gap: 4px;
}
.photo-actions button {
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #17201f;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-weight: 700;
}
.photo-add {
  display: grid;
  gap: 10px;
  margin: 10px 0 4px;
}
.gallery {
  margin: 14px 0;
  display: grid;
  gap: 8px;
}
.gallery-main img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}
.gallery-thumbs img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* A room type's page: the establishment above the type's name, and the total of several rooms. */
.kicker {
  margin: 0 0 4px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #5b6766);
}
.total-rooms {
  margin: 10px 0 0;
  text-align: right;
}

/* My establishments: a room type inside its establishment, its tools folded. */
.room-type {
  border-top: 1px solid var(--line, #e3e7e6);
  padding-top: 12px;
  margin-top: 12px;
}
.room-type h4 {
  margin: 0 0 4px;
}
.type-tools details,
.head-actions details {
  border: 1px solid var(--line, #e3e7e6);
  border-radius: 12px;
  padding: 10px 14px;
  margin: 8px 0;
}
.type-tools summary,
.head-actions summary {
  cursor: pointer;
}
.unit-items code {
  font-size: 0.75rem;
  word-break: break-all;
}
