:root {
  --bg: #f5f3ed;
  --surface: #fffefa;
  --surface-soft: #f9f7f1;
  --ink: #17221c;
  --muted: #69736d;
  --line: #e3e0d7;
  --line-dark: #d4d0c5;
  --green: #176848;
  --green-deep: #0c4b34;
  --green-soft: #e7f1eb;
  --warm: #c66b3d;
  --warm-soft: #f9ece3;
  --danger: #aa3e3d;
  --danger-soft: #f9e9e6;
  --yellow: #9a761b;
  --yellow-soft: #f7f0d9;
  --shadow: 0 18px 50px rgba(34, 43, 37, 0.08);
  --shadow-soft: 0 8px 26px rgba(34, 43, 37, 0.06);
  --radius: 20px;
  --radius-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p {
  margin: 0;
}

svg {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

::selection {
  color: #fff;
  background: var(--green);
}

:focus-visible {
  outline: 3px solid rgba(23, 104, 72, 0.28);
  outline-offset: 2px;
}

.eyebrow {
  display: inline-block;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.17em;
  line-height: 1.3;
}

.eyebrow-light {
  color: #a8d5bd;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button svg {
  width: 18px;
  height: 18px;
}

.button-primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 8px 20px rgba(23, 104, 72, 0.18);
}

.button-primary:hover {
  background: var(--green-deep);
  box-shadow: 0 10px 24px rgba(23, 104, 72, 0.25);
}

.button-secondary {
  color: var(--ink);
  border-color: var(--line-dark);
  background: var(--surface);
}

.button-secondary:hover {
  border-color: #b8c1bc;
  background: #fff;
}

.button-dark {
  color: #fff;
  background: var(--ink);
}

.button-ghost {
  color: var(--muted);
}

.button-ghost:hover {
  color: var(--ink);
  background: #efede7;
}

.button-danger-ghost {
  color: var(--danger);
  background: var(--danger-soft);
}

.button-small {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
}

.button-wide {
  width: 100%;
}

.button[disabled] {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.panel {
  border: 1px solid rgba(221, 217, 207, 0.9);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.panel-heading h2 {
  margin-bottom: 4px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.panel-heading p {
  color: var(--muted);
  font-size: 13px;
}

.flash-stack {
  position: fixed;
  z-index: 50;
  top: 20px;
  right: 24px;
  display: grid;
  width: min(390px, calc(100vw - 32px));
  gap: 10px;
}

.flash {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(23, 34, 28, 0.16);
  font-size: 13px;
  animation: flash-in 220ms ease-out;
}

.flash-success {
  border-color: #b7d8c5;
}

.flash-error {
  color: #742e2c;
  border-color: #e5bbb6;
  background: #fff9f8;
}

.flash button {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: none;
  font-size: 19px;
  line-height: 1;
}

@keyframes flash-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--green);
}

.brand-mark svg {
  width: 25px;
  height: 25px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.brand-light {
  color: #fff;
}

.brand-light .brand-mark {
  color: var(--green-deep);
  background: #dcebdc;
}

.brand-light small {
  color: rgba(255, 255, 255, 0.64);
}

.brand-compact .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.brand-compact .brand-mark svg {
  width: 21px;
  height: 21px;
}

.brand-compact strong {
  font-size: 17px;
}

.tenant-brand-mark {
  overflow: hidden;
}

.tenant-brand-mark img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.tenant-brand-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.tenant-brand-copy strong,
.tenant-brand-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tenant-brand-copy strong {
  font-size: 17px;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.tenant-brand-copy small {
  color: #7d8982;
  font-size: 9px;
  line-height: 1.4;
}

/* Admin shell */

.admin-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 5%, rgba(194, 218, 203, 0.28), transparent 24rem),
    var(--bg);
}

.sidebar {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  width: 248px;
  flex-direction: column;
  padding: 26px 18px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 254, 250, 0.92);
  backdrop-filter: blur(18px);
}

.sidebar > .brand {
  padding: 0 8px 28px;
}

.main-nav {
  display: grid;
  gap: 6px;
}

.nav-link {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border-radius: 11px;
  color: #627069;
  font-size: 14px;
  font-weight: 650;
  transition: 160ms ease;
}

.nav-link svg {
  width: 20px;
  height: 20px;
}

.nav-link:hover {
  color: var(--ink);
  background: #f2f1eb;
}

.nav-link.active {
  color: var(--green-deep);
  background: var(--green-soft);
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 4px 17px;
  padding: 12px;
  border: 1px solid #d9e7df;
  border-radius: 12px;
  background: #f3f8f4;
}

.status-dot,
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #2a9b67;
  box-shadow: 0 0 0 4px rgba(42, 155, 103, 0.12);
}

.sidebar-note .status-dot {
  margin-top: 6px;
}

.sidebar-note strong,
.sidebar-note small {
  display: block;
}

.sidebar-note strong {
  font-size: 11px;
}

.sidebar-note small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.account {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 7px 0;
  border-top: 1px solid var(--line);
}

.avatar {
  display: grid;
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--green-deep);
  background: #dfece4;
  font-size: 13px;
  font-weight: 800;
}

.account-copy {
  min-width: 0;
  flex: 1;
}

.account-copy strong,
.account-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-copy strong {
  font-size: 12px;
}

.account-copy small {
  color: var(--muted);
  font-size: 10px;
}

.account form {
  display: flex;
}

.icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
}

.icon-button:hover {
  color: var(--ink);
  background: #efede7;
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.main-content {
  min-height: 100vh;
  margin-left: 248px;
  padding: 43px clamp(28px, 4vw, 64px) 64px;
}

.main-content > * {
  max-width: 1320px;
  margin-right: auto;
  margin-left: auto;
}

.mobile-header,
.sidebar-scrim {
  display: none;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 28px;
}

.page-heading h1 {
  margin: 5px 0 5px;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.16;
}

.page-heading p {
  color: var(--muted);
  font-size: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.stat-featured {
  color: #fff;
  border-color: var(--green-deep);
  background:
    radial-gradient(circle at 90% 15%, rgba(255, 255, 255, 0.16), transparent 7rem),
    var(--green-deep);
}

.stat-featured::after {
  position: absolute;
  right: -28px;
  bottom: -60px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  content: "";
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.stat-featured .stat-top {
  color: rgba(255, 255, 255, 0.73);
}

.stat-icon {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 9px;
  color: var(--green);
  background: var(--green-soft);
}

.stat-featured .stat-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
}

.stat-icon-warm {
  color: var(--warm);
  background: var(--warm-soft);
}

.stat-icon-soft {
  color: #61726a;
  background: #eff1ed;
}

.stat-icon-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.stat-icon svg {
  width: 18px;
  height: 18px;
}

.stat-card > strong {
  display: block;
  margin-top: 20px;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.stat-card > small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}

.stat-featured > small {
  color: rgba(255, 255, 255, 0.62);
}

.bills-panel {
  overflow: hidden;
}

.bills-toolbar {
  padding: 22px 24px 18px;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px 16px;
  border-bottom: 1px solid var(--line);
}

.filter-tabs {
  display: flex;
  gap: 2px;
}

.filter-tabs a {
  padding: 7px 11px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.filter-tabs a:hover {
  color: var(--ink);
  background: #f3f1eb;
}

.filter-tabs a.active {
  color: var(--green-deep);
  background: var(--green-soft);
}

.search-form {
  position: relative;
  display: flex;
  width: min(320px, 100%);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.search-form > svg {
  width: 17px;
  height: 17px;
  margin-left: 11px;
  color: #8b948f;
}

.search-form input {
  width: 100%;
  height: 38px;
  min-width: 0;
  padding: 0 8px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.search-form button {
  align-self: stretch;
  padding: 0 11px;
  border: 0;
  border-left: 1px solid var(--line);
  color: var(--green);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.data-table th {
  padding: 12px 18px;
  color: #87908b;
  background: #faf9f5;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child {
  padding-left: 24px;
}

.data-table th:last-child,
.data-table td:last-child {
  padding-right: 24px;
}

.data-table td {
  padding: 16px 18px;
  border-top: 1px solid #eeebe3;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 130ms ease;
}

.data-table tbody tr:hover {
  background: #fcfbf7;
}

.table-title,
.table-main,
.table-subtitle,
.tenant-line {
  display: block;
}

.table-title {
  max-width: 330px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-title:hover {
  color: var(--green);
}

.table-subtitle {
  max-width: 330px;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-line {
  margin-top: 4px;
  color: #7e8782;
  font-size: 10px;
}

.table-main {
  font-weight: 620;
}

.nowrap {
  white-space: nowrap;
}

.amount {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.status-badge::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-pending {
  color: var(--yellow);
  background: var(--yellow-soft);
}

.status-paid {
  color: var(--green);
  background: var(--green-soft);
}

.status-cancelled {
  color: #69716e;
  background: #eeefec;
}

.status-expired {
  color: var(--danger);
  background: var(--danger-soft);
}

.row-action {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 10px;
  font-weight: 650;
}

.row-action:hover {
  color: var(--green);
  border-color: #b4cdbf;
}

.empty-state {
  padding: 60px 24px 64px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 17px;
  color: var(--green);
  background: var(--green-soft);
}

.empty-icon svg {
  width: 31px;
  height: 31px;
}

.empty-state h3 {
  font-size: 17px;
}

.empty-state p {
  max-width: 390px;
  margin: 6px auto 18px;
  color: var(--muted);
  font-size: 12px;
}

/* Forms */

.form-page-heading {
  align-items: flex-end;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.back-link:hover {
  color: var(--green);
}

.back-link svg {
  width: 17px;
  height: 17px;
}

.step-pill {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  background: var(--surface);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.bill-form {
  display: grid;
  max-width: 1040px;
  gap: 18px;
}

.form-section {
  padding: 27px clamp(20px, 3.4vw, 38px) 31px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.optional-label {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 0 7px;
  border-radius: 99px;
  color: #75817b;
  background: #efefe9;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.04em;
}

.section-number {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.form-grid {
  display: grid;
  gap: 16px;
  align-items: start;
}

.form-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-section .form-grid + .form-grid,
.form-section .field + .form-grid,
.form-section .form-grid + .field {
  margin-top: 17px;
}

.field {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.field > span {
  display: flex;
  min-height: 18px;
  align-items: center;
  flex-wrap: wrap;
  color: #44514a;
  font-size: 12px;
  font-weight: 680;
  line-height: 18px;
}

.field em {
  margin-left: 3px;
  color: var(--warm);
  font-size: 9px;
  font-style: normal;
}

.field small {
  color: #89918d;
  font-size: 10px;
}

.field input,
.field textarea,
.fee-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: #fcfbf7;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.field input {
  height: 44px;
  padding: 0 12px;
  font-size: 13px;
}

.field textarea {
  min-height: 100px;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.65;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.fee-row input:focus {
  border-color: #6eaa8e;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(23, 104, 72, 0.09);
}

.field input::placeholder,
.field textarea::placeholder,
.fee-row input::placeholder {
  color: #a9afab;
}

.input-suffix {
  position: relative;
}

.input-suffix input {
  padding-right: 34px;
}

.input-suffix span {
  position: absolute;
  top: 50%;
  right: 12px;
  color: #8c948f;
  font-size: 11px;
  transform: translateY(-50%);
}

.input-prefix {
  position: relative;
}

.input-prefix > span {
  position: absolute;
  top: 50%;
  left: 12px;
  color: #7e8882;
  font-size: 12px;
  transform: translateY(-50%);
}

.input-prefix input {
  padding-left: 30px;
}

.rent-fields {
  margin-top: 17px;
}

.fee-editor {
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px dashed var(--line-dark);
}

.fee-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.fee-editor-head h3 {
  font-size: 14px;
}

.fee-editor-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.fee-labels,
.fee-row {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1.4fr 32px;
  gap: 9px;
}

.fee-labels {
  margin: 15px 0 7px;
  padding: 0 1px;
  color: #858e89;
  font-size: 9px;
  font-weight: 700;
}

.fee-rows {
  display: grid;
  gap: 8px;
}

.fee-row input {
  height: 41px;
  padding: 0 11px;
  font-size: 12px;
}

.remove-fee {
  width: 31px;
  height: 31px;
  align-self: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #909894;
  background: transparent;
  font-size: 18px;
  line-height: 1;
}

.remove-fee:hover {
  color: var(--danger);
  border-color: #f0d2cf;
  background: var(--danger-soft);
}

.fee-total {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 17px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.fee-total span {
  color: var(--muted);
  font-size: 11px;
}

.fee-total strong {
  color: var(--green-deep);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.section-optional-note {
  margin-top: 15px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #6f7c75;
  background: #f5f6f2;
  font-size: 9px;
  line-height: 1.6;
}

.bill-brand-toggle {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #faf9f5;
  cursor: pointer;
}

.bill-brand-toggle > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-track {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  margin-top: 1px;
  border-radius: 99px;
  background: #cbd0cc;
  transition: background 160ms ease;
}

.toggle-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(23, 34, 28, 0.2);
  content: "";
  transition: transform 160ms ease;
}

.bill-brand-toggle > input:checked + .toggle-track {
  background: var(--green);
}

.bill-brand-toggle > input:checked + .toggle-track::after {
  transform: translateX(16px);
}

.bill-brand-toggle strong,
.bill-brand-toggle small {
  display: block;
}

.bill-brand-toggle strong {
  font-size: 12px;
}

.bill-brand-toggle small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.bill-brand-fields {
  display: grid;
  gap: 16px;
  margin-top: 17px;
  padding: 17px;
  border: 1px solid #e4ebdf;
  border-radius: 13px;
  background: #fbfcf8;
}

.compact-file {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fcfbf7;
}

.compact-file input {
  width: 1px;
  height: 1px;
  opacity: 0;
  position: absolute;
}

.compact-file > span {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.compact-file small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bill-theme-row {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.theme-auto-check {
  color: var(--muted);
}

.upload-zone {
  position: relative;
  display: grid;
  min-height: 160px;
  place-items: center;
  align-content: center;
  gap: 5px;
  padding: 26px;
  border: 1.5px dashed #c9d1cc;
  border-radius: 15px;
  background:
    radial-gradient(circle at 50% 20%, rgba(227, 240, 231, 0.6), transparent 10rem),
    #fbfaf6;
  text-align: center;
  cursor: pointer;
  transition: 160ms ease;
}

.upload-zone:hover,
.upload-zone.dragging {
  border-color: #6a9c81;
  background: #f6faf7;
}

.upload-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  place-items: center;
  border-radius: 13px;
  color: var(--green);
  background: var(--green-soft);
}

.upload-icon svg {
  width: 27px;
  height: 27px;
}

.upload-zone strong {
  font-size: 13px;
}

.upload-zone small {
  color: var(--muted);
  font-size: 10px;
}

.upload-previews {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 13px;
}

.upload-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 11px;
  background: #ebe9e2;
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  overflow: hidden;
  padding: 4px 6px;
  border-radius: 5px;
  color: #fff;
  background: rgba(12, 27, 20, 0.62);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.validity-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.compact-heading {
  margin: 0;
}

.validity-field {
  width: min(420px, 100%);
  flex: 0 0 auto;
}

.expiry-presets {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.expiry-presets button {
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 10px;
  font-weight: 650;
}

.expiry-presets button:hover,
.expiry-presets button.active {
  color: var(--green-deep);
  border-color: #afd0be;
  background: var(--green-soft);
}

.expiry-help {
  display: block;
  margin-top: 6px;
  color: #8d9691;
  font-size: 9px;
}

.validity-field .field {
  margin: 0;
}

/* Tenant page branding */

.settings-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #d7e5dc;
  border-radius: 99px;
  color: var(--green);
  background: #f4f9f5;
  font-size: 10px;
  font-weight: 680;
  white-space: nowrap;
}

.settings-layout {
  display: grid;
  max-width: 1080px;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 20px;
}

.settings-form {
  padding: 27px clamp(20px, 3.4vw, 36px);
}

.brand-settings-fields {
  display: grid;
  gap: 22px;
  margin-top: 26px;
}

.logo-upload {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px;
  border: 1px dashed #cbd2cd;
  border-radius: 13px;
  background: #faf9f5;
  cursor: pointer;
  transition: 150ms ease;
}

.logo-upload:hover {
  border-color: #76a68b;
  background: #f7faf7;
}

.logo-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.logo-upload-preview {
  display: grid;
  overflow: hidden;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: var(--green);
}

.logo-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-upload-preview svg {
  width: 32px;
  height: 32px;
}

.logo-upload-copy strong,
.logo-upload-copy small {
  display: block;
}

.logo-upload-copy strong {
  font-size: 12px;
}

.logo-upload-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  color: var(--danger);
  font-size: 10px;
}

.inline-check input {
  accent-color: var(--danger);
}

.theme-color-control {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #faf9f5;
}

.theme-color-control input[type="color"] {
  width: 48px;
  height: 42px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.theme-color-control > span {
  flex: 1;
}

.theme-color-control strong,
.theme-color-control small {
  display: block;
}

.theme-color-control strong {
  font-size: 11px;
}

.theme-color-control small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.theme-color-control code {
  color: #59675f;
  font-size: 10px;
}

.settings-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.settings-submit > span {
  color: var(--muted);
  font-size: 9px;
}

.settings-preview-wrap {
  position: sticky;
  top: 24px;
}

.preview-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 5px 10px;
}

.preview-label span {
  font-size: 11px;
  font-weight: 700;
}

.preview-label small {
  color: var(--muted);
  font-size: 9px;
}

.settings-phone {
  min-height: 460px;
  padding: 17px 15px;
  border: 7px solid #26352d;
  border-radius: 35px;
  background:
    radial-gradient(circle at 70% 0, rgba(210, 230, 216, 0.85), transparent 13rem),
    #f7f5ef;
  box-shadow: 0 22px 50px rgba(25, 37, 30, 0.18);
}

.settings-phone-top {
  width: 68px;
  height: 5px;
  margin: 0 auto 20px;
  border-radius: 99px;
  background: #d0cdc4;
}

.settings-brand-preview {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 4px 0 14px;
  border-bottom: 1px solid #e4e1d8;
}

.settings-brand-preview .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.settings-brand-preview .brand-mark svg {
  width: 21px;
  height: 21px;
}

.settings-brand-preview .tenant-brand-copy strong {
  font-size: 13px;
}

.settings-brand-preview .tenant-brand-copy small {
  font-size: 7px;
}

.settings-preview-secure {
  padding: 8px 0;
  color: #819089;
  font-size: 7px;
  text-align: right;
}

.settings-preview-hero {
  height: 112px;
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent),
    #dce8df;
}

.settings-preview-title {
  width: 58%;
  height: 13px;
  margin: 16px 0 7px;
  border-radius: 99px;
  background: #c6c9c3;
}

.settings-preview-line {
  width: 83%;
  height: 6px;
  margin-top: 7px;
  border-radius: 99px;
  background: #dfddd6;
}

.settings-preview-line.short {
  width: 51%;
}

.settings-preview-card {
  height: 108px;
  margin-top: 17px;
  border: 1px solid #e2dfd6;
  border-radius: 12px;
  background: #fffefa;
}

.preview-help {
  margin: 12px 7px 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.form-submit-bar {
  position: sticky;
  z-index: 10;
  bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px 14px 22px;
  border: 1px solid rgba(208, 205, 195, 0.85);
  border-radius: 16px;
  background: rgba(255, 254, 250, 0.9);
  box-shadow: 0 16px 42px rgba(23, 34, 28, 0.15);
  backdrop-filter: blur(18px);
}

.form-submit-bar > div:first-child span,
.form-submit-bar > div:first-child strong {
  display: block;
}

.form-submit-bar > div:first-child span {
  color: var(--muted);
  font-size: 10px;
}

.form-submit-bar > div:first-child strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.submit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Detail */

.detail-heading {
  align-items: flex-end;
}

.detail-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-title-line h1 span {
  color: #75807a;
  font-weight: 500;
}

.heading-actions {
  display: flex;
  gap: 9px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 19px;
}

.detail-main,
.detail-side {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.detail-side {
  position: sticky;
  top: 22px;
}

.gallery-card {
  overflow: hidden;
  padding: 7px;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 220px 80px;
  gap: 6px;
}

.detail-gallery a {
  overflow: hidden;
  border-radius: 11px;
  background: #ece9e2;
}

.detail-gallery a:hover img {
  transform: scale(1.025);
}

.detail-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.detail-gallery .hero {
  grid-column: span 4;
  grid-row: 1;
}

.detail-gallery .thumb {
  grid-row: 2;
}

.detail-gallery .thumb:nth-child(n + 6) {
  display: none;
}

.detail-card {
  padding: 25px;
}

.address-block {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 20px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-soft);
}

.pin-icon {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
}

.pin-icon svg {
  width: 18px;
  height: 18px;
}

.address-block strong,
.address-block span {
  display: block;
}

.address-block strong {
  font-size: 13px;
}

.address-block span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.property-facts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.property-facts > div {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.property-facts span {
  color: #8a928e;
  font-size: 9px;
}

.property-facts strong {
  font-size: 10px;
}

.description-box {
  margin-top: 17px;
  padding: 14px 16px;
  border-left: 3px solid #b9d6c5;
  color: #4d5a53;
  background: #f8faf7;
  font-size: 12px;
  line-height: 1.75;
  white-space: pre-line;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--line);
}

.info-grid > div {
  padding: 13px;
  background: #fff;
}

.info-grid span,
.info-grid strong {
  display: block;
}

.info-grid span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.info-grid strong {
  font-size: 11px;
}

.fee-summary-list {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.fee-summary-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 1px;
  border-bottom: 1px solid #eeeae2;
}

.fee-index {
  color: #a1a8a4;
  font-size: 9px;
  font-weight: 700;
}

.fee-summary-row > div {
  flex: 1;
}

.fee-summary-row strong,
.fee-summary-row small {
  display: block;
}

.fee-summary-row strong {
  font-size: 12px;
}

.fee-summary-row small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.fee-summary-row b {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.grand-total {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 20px;
  padding-top: 18px;
}

.grand-total span {
  color: var(--muted);
  font-size: 11px;
}

.grand-total strong {
  color: var(--green-deep);
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.timeline {
  display: grid;
  gap: 0;
  margin-top: 18px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  padding: 0 0 18px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  position: absolute;
  top: 10px;
  bottom: -3px;
  left: 4px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 3px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #86ab97;
  box-shadow: 0 0 0 1px #b5c9bd;
}

.timeline-item strong,
.timeline-item div span {
  display: block;
}

.timeline-item strong {
  font-size: 11px;
}

.timeline-item div span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.timeline-item time {
  color: #929995;
  font-size: 9px;
  white-space: nowrap;
}

.share-card {
  padding: 19px;
}

.qr-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
}

.qr-heading strong {
  margin-left: auto;
  color: #8a928e;
  font-size: 8px;
  font-weight: 600;
}

.qr-frame {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(23, 104, 72, 0.025) 50%, transparent 50%) 0 0 / 14px 14px,
    #fff;
}

.qr-frame img {
  width: 100%;
  height: 100%;
}

.qr-brand {
  position: absolute;
  right: 11px;
  bottom: 9px;
  padding: 2px 4px;
  color: #97a09b;
  background: #fff;
  font-size: 7px;
  letter-spacing: 0.08em;
}

.qr-amount {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.qr-amount span {
  color: var(--muted);
  font-size: 10px;
}

.qr-amount strong {
  color: var(--green-deep);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.qr-tip {
  margin: 12px 1px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.share-actions {
  display: grid;
  gap: 8px;
}

.qr-invalid {
  padding: 14px 2px 6px;
  text-align: center;
}

.invalid-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 17px;
  color: #8b7164;
  background: #f5efea;
}

.invalid-icon svg {
  width: 32px;
  height: 32px;
}

.qr-invalid h2 {
  font-size: 18px;
}

.qr-invalid > p {
  margin: 7px 4px 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.paid-receipt {
  padding: 15px;
  border-radius: 12px;
  background: var(--green-soft);
}

.paid-receipt span,
.paid-receipt strong,
.paid-receipt small {
  display: block;
}

.paid-receipt span {
  color: var(--muted);
  font-size: 9px;
}

.paid-receipt strong {
  margin: 3px 0;
  color: var(--green-deep);
  font-size: 25px;
}

.paid-receipt small {
  color: #718079;
  font-size: 8px;
}

.manage-card {
  overflow: hidden;
}

.manage-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  font-size: 11px;
  font-weight: 680;
  list-style: none;
  cursor: pointer;
}

.manage-card summary::-webkit-details-marker {
  display: none;
}

.manage-card summary svg {
  width: 16px;
  height: 16px;
  transition: transform 150ms ease;
}

.manage-card details[open] summary svg {
  transform: rotate(180deg);
}

.manage-actions {
  display: grid;
  gap: 7px;
  padding: 0 12px 12px;
}

.share-tip-card {
  display: flex;
  gap: 10px;
  padding: 15px;
  color: #53635a;
  border-color: #d4e2d9;
  background: #f2f7f3;
  box-shadow: none;
}

.tip-icon {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #a9c7b5;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: italic;
}

.share-tip-card h3 {
  margin-bottom: 3px;
  font-size: 10px;
}

.share-tip-card p {
  color: #728078;
  font-size: 9px;
  line-height: 1.6;
}

/* Auth */

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(420px, 1.1fr) minmax(420px, 0.9fr);
  background: #fbfaf6;
}

.auth-art {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(34, 101, 73, 0.12), rgba(0, 30, 20, 0.52)),
    radial-gradient(circle at 15% 85%, #4b7d65 0, transparent 36%),
    #173f31;
}

.auth-art::before {
  position: absolute;
  right: -10%;
  bottom: 3%;
  width: 64%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 9vw rgba(255, 255, 255, 0.025),
    0 0 0 18vw rgba(255, 255, 255, 0.018);
  content: "";
}

.auth-art::after {
  position: absolute;
  top: 14%;
  right: 13%;
  width: 110px;
  height: 160px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 55px 55px 10px 10px;
  content: "";
  transform: rotate(12deg);
}

.auth-art-inner {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: clamp(30px, 5vw, 64px);
}

.auth-message {
  max-width: 600px;
  margin: auto 0;
  padding: 70px 0;
}

.auth-message h1 {
  margin: 16px 0 20px;
  font-size: clamp(36px, 4.2vw, 62px);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1.15;
}

.auth-message p {
  max-width: 450px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 15px;
  line-height: 1.8;
}

.auth-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-proof > div {
  padding: 21px 18px 4px 0;
}

.auth-proof strong,
.auth-proof span {
  display: block;
}

.auth-proof strong {
  color: #c5decf;
  font-size: 15px;
}

.auth-proof span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.47);
  font-size: 9px;
}

.auth-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 34px;
}

.auth-form-wrap {
  width: min(430px, 100%);
}

.auth-panel .flash-stack {
  position: static;
  width: 100%;
  margin-bottom: 18px;
}

.auth-heading {
  margin-bottom: 30px;
}

.auth-heading h2 {
  margin: 9px 0 7px;
  font-size: 32px;
  letter-spacing: -0.045em;
}

.auth-heading p {
  color: var(--muted);
  font-size: 13px;
}

.stack-form {
  display: grid;
  gap: 17px;
}

.auth-footnote {
  margin-top: 22px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  color: #8b938f;
  font-size: 10px;
  line-height: 1.7;
}

.auth-footnote code {
  color: #5c6861;
}

.center-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 20%, rgba(208, 226, 214, 0.5), transparent 20rem),
    var(--bg);
}

.error-card {
  width: min(460px, 100%);
  padding: 45px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.error-code {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.error-card h1 {
  font-size: 26px;
}

.error-card p {
  margin: 10px 0 24px;
  color: var(--muted);
  font-size: 13px;
}

/* Public payment page */

.public-shell {
  --page-accent: #176848;
  --page-accent-ink: #ffffff;
  min-height: 100vh;
  color: #18221d;
  background:
    radial-gradient(circle at 50% -8rem, rgba(217, 230, 219, 0.7), transparent 36rem),
    #f6f4ee;
}

.public-shell .brand-mark,
.settings-phone .brand-mark {
  color: var(--page-accent-ink);
  background: var(--page-accent);
}

.public-shell .eyebrow,
.public-shell .tenant-greeting,
.public-shell .public-address svg,
.public-shell .date-arrow {
  color: var(--page-accent);
}

.public-shell .button-primary {
  color: var(--page-accent-ink);
  background: var(--page-accent);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--page-accent) 25%, transparent);
}

.public-shell .button-primary:hover {
  background: color-mix(in srgb, var(--page-accent) 86%, #000);
}

.public-shell .fee-dot {
  background: color-mix(in srgb, var(--page-accent) 58%, #fff);
}

.public-shell .public-total strong,
.public-shell .public-paybar > div strong {
  color: var(--page-accent);
}

.public-shell .shield-icon {
  color: var(--page-accent);
  background: color-mix(in srgb, var(--page-accent) 12%, #fff);
}

.public-shell .placeholder-art {
  color: color-mix(in srgb, var(--page-accent) 72%, #6f8c7c);
}

.public-shell .manual-payment {
  background: color-mix(in srgb, var(--page-accent) 10%, #fff);
}

.public-shell .payment-card {
  border-color: color-mix(in srgb, var(--page-accent) 20%, #e1ded5);
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--page-accent) 12%, transparent), transparent 12rem),
    #fbfdf9;
}

.public-shell .unavailable-paid {
  color: var(--page-accent);
  background: color-mix(in srgb, var(--page-accent) 12%, #fff);
}

.public-shell .public-demo-banner {
  color: #785926;
}

.public-header {
  position: relative;
  z-index: 10;
  display: flex;
  width: min(100% - 32px, 820px);
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto;
}

.secure-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #65736b;
  font-size: 10px;
  font-weight: 650;
}

.secure-label svg {
  width: 15px;
  height: 15px;
}

.public-demo-banner {
  display: flex;
  width: min(100% - 32px, 820px);
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 5px auto 18px;
  padding: 8px 13px;
  border: 1px solid #ead9be;
  border-radius: 9px;
  color: #785926;
  background: #fbf5e9;
  font-size: 9px;
  text-align: center;
}

.public-demo-banner strong {
  flex: 0 0 auto;
  font-size: 9px;
}

.public-main {
  width: min(100% - 32px, 820px);
  margin: 0 auto;
  padding-bottom: 115px;
}

.public-gallery {
  overflow: hidden;
  border-radius: 22px;
  background: #e8e5dc;
  box-shadow: 0 16px 40px rgba(32, 45, 37, 0.08);
}

.gallery-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-height: 460px;
  background: #ddd9cf;
}

.gallery-stage > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 200ms ease;
}

.gallery-stage > img.active {
  opacity: 1;
}

.gallery-stage > img:not(.active) {
  position: absolute;
  inset: 0;
}

.gallery-stage::after {
  position: absolute;
  inset: auto 0 0;
  height: 35%;
  background: linear-gradient(transparent, rgba(12, 22, 16, 0.16));
  content: "";
  pointer-events: none;
}

.gallery-count {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border-radius: 99px;
  color: #fff;
  background: rgba(14, 25, 18, 0.62);
  font-size: 9px;
  backdrop-filter: blur(5px);
}

.gallery-count b {
  font-weight: 700;
}

.gallery-strip {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 8px;
  background: #fff;
  scrollbar-width: none;
}

.gallery-strip::-webkit-scrollbar {
  display: none;
}

.gallery-strip button {
  overflow: hidden;
  width: 62px;
  height: 46px;
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #dedbd2;
  opacity: 0.66;
}

.gallery-strip button.active {
  border-color: var(--green);
  opacity: 1;
}

.gallery-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.placeholder-gallery {
  display: grid;
  aspect-ratio: 16 / 7;
  min-height: 230px;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.28), transparent),
    #dfe8e0;
}

.placeholder-art {
  color: #6f8c7c;
  text-align: center;
}

.placeholder-art svg {
  width: 90px;
  height: 72px;
  margin: 0 auto 10px;
}

.placeholder-art span {
  font-size: 10px;
}

.public-content {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.listing-intro {
  padding: 13px 5px 8px;
}

.public-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 8px 0;
}

.public-title-row h1 {
  font-size: clamp(27px, 5vw, 39px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.public-title-row h1 span {
  margin-left: 7px;
  color: #728078;
  font-size: 0.58em;
  font-weight: 540;
  letter-spacing: -0.01em;
}

.tenant-greeting {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
}

.public-address {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  color: #5d6a63;
  font-size: 12px;
}

.public-address svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: -2px;
  color: #7a8d82;
}

.public-facts {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin-top: 16px;
  padding-bottom: 1px;
  scrollbar-width: none;
}

.public-facts::-webkit-scrollbar {
  display: none;
}

.public-facts > span {
  min-width: 84px;
  padding: 10px 12px;
  border: 1px solid #dedbd2;
  border-radius: 11px;
  background: rgba(255, 254, 250, 0.7);
}

.public-facts small,
.public-facts b {
  display: block;
}

.public-facts small {
  margin-bottom: 2px;
  color: #8a928d;
  font-size: 8px;
}

.public-facts b {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-description {
  margin-top: 14px;
  color: #59665f;
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-line;
}

.public-card {
  padding: 21px;
  border: 1px solid #e1ded5;
  border-radius: 17px;
  background: #fffefa;
  box-shadow: 0 7px 23px rgba(35, 44, 38, 0.045);
}

.public-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 17px;
}

.public-section-title > span {
  font-size: 14px;
  font-weight: 730;
}

.public-section-title small {
  color: #89918d;
  font-size: 9px;
}

.lease-dates {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 13px;
}

.lease-dates > div {
  padding: 13px;
  border-radius: 11px;
  background: #f7f5ef;
}

.lease-dates span,
.lease-dates strong {
  display: block;
}

.lease-dates div span {
  color: #8b938f;
  font-size: 8px;
}

.lease-dates strong {
  margin-top: 3px;
  font-size: 12px;
}

.date-arrow {
  color: #8da096;
}

.date-arrow svg {
  width: 20px;
  height: 20px;
}

.due-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ece9e1;
  font-size: 10px;
}

.due-line span {
  color: #7e8883;
}

.due-line strong {
  color: #39463f;
}

.public-fees {
  display: grid;
}

.public-fee-row {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 11px 0;
  border-bottom: 1px solid #efede6;
}

.fee-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #95ad9f;
}

.public-fee-row strong,
.public-fee-row small {
  display: block;
}

.public-fee-row strong {
  font-size: 12px;
}

.public-fee-row small {
  margin-top: 2px;
  color: #8a938e;
  font-size: 9px;
}

.public-fee-row b {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.public-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 18px;
}

.public-total span {
  color: #68746d;
  font-size: 11px;
  font-weight: 600;
}

.public-total strong {
  color: var(--green-deep);
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
}

.payment-card {
  margin-top: 3px;
  padding: 24px;
  border-color: #cfddd4;
  background:
    radial-gradient(circle at 100% 0, rgba(213, 230, 219, 0.6), transparent 12rem),
    #fbfdf9;
}

.payment-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 17px;
}

.shield-icon {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--green-soft);
}

.shield-icon svg {
  width: 24px;
  height: 24px;
}

.payment-title strong,
.payment-title small {
  display: block;
}

.payment-title strong {
  font-size: 13px;
}

.payment-title small {
  margin-top: 2px;
  color: #7c8781;
  font-size: 9px;
}

.demo-note {
  display: grid;
  gap: 2px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #eadbbf;
  border-radius: 9px;
  color: #75582c;
  background: #fbf5e9;
  font-size: 9px;
  line-height: 1.5;
}

.demo-note strong {
  font-size: 10px;
}

.button-pay {
  min-height: 52px;
  font-size: 14px;
}

.payment-policy {
  margin-top: 13px;
  color: #7e8983;
  font-size: 8px;
  line-height: 1.6;
  text-align: center;
}

.manual-payment {
  display: grid;
  gap: 12px;
  padding: 15px;
  border-radius: 11px;
  background: var(--green-soft);
}

.manual-payment p {
  color: #53645b;
  font-size: 11px;
  line-height: 1.7;
}

.public-paybar {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px max(16px, calc((100vw - 820px) / 2)) calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(220, 217, 207, 0.9);
  background: rgba(255, 254, 250, 0.93);
  box-shadow: 0 -10px 35px rgba(24, 34, 27, 0.08);
  backdrop-filter: blur(16px);
}

.public-paybar > div span,
.public-paybar > div strong {
  display: block;
}

.public-paybar > div span {
  color: #7e8983;
  font-size: 9px;
}

.public-paybar > div strong {
  color: var(--green-deep);
  font-size: 22px;
  letter-spacing: -0.04em;
}

.public-paybar .button {
  min-width: 130px;
}

.public-footer {
  display: flex;
  width: min(100% - 42px, 780px);
  justify-content: space-between;
  gap: 16px;
  margin: 28px auto 110px;
  color: #919893;
  font-size: 8px;
}

/* Unavailable */

.unavailable-main {
  display: grid;
  width: min(100% - 32px, 600px);
  min-height: calc(100vh - 70px);
  align-content: center;
  margin: 0 auto;
  padding: 30px 0 55px;
}

.unavailable-card {
  padding: clamp(28px, 7vw, 50px);
  border: 1px solid #dedbd2;
  border-radius: 24px;
  background: #fffefa;
  box-shadow: var(--shadow);
  text-align: center;
}

.unavailable-icon {
  display: grid;
  width: 74px;
  height: 74px;
  margin: 0 auto 20px;
  place-items: center;
  border-radius: 22px;
}

.unavailable-icon svg {
  width: 43px;
  height: 43px;
}

.unavailable-paid {
  color: var(--green);
  background: var(--green-soft);
}

.unavailable-cancelled,
.unavailable-expired {
  color: #896c60;
  background: #f6eee9;
}

.unavailable-card h1 {
  margin: 8px 0 9px;
  font-size: clamp(24px, 5vw, 32px);
  letter-spacing: -0.04em;
}

.unavailable-card > p {
  max-width: 420px;
  margin: 0 auto;
  color: #6d7872;
  font-size: 12px;
  line-height: 1.75;
}

.unavailable-receipt {
  display: grid;
  gap: 1px;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid #e6e2d9;
  border-radius: 12px;
  background: #e6e2d9;
  text-align: left;
}

.unavailable-receipt > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 14px;
  background: #faf9f5;
  font-size: 10px;
}

.unavailable-receipt span {
  color: #7f8983;
}

.unavailable-receipt strong {
  font-variant-numeric: tabular-nums;
}

.unavailable-help {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #ece9e1;
  color: #7c8680;
  font-size: 10px;
}

.unavailable-help a {
  color: var(--green);
  font-weight: 700;
}

.unavailable-footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 22px;
  color: #8e9691;
  font-size: 9px;
}

.unavailable-footer-brand .brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
}

.unavailable-footer-brand .brand-mark svg {
  width: 15px;
  height: 15px;
}

.unavailable-footer-brand .tenant-brand-copy strong {
  font-size: 9px;
}

.unavailable-footer-brand .tenant-brand-copy small {
  max-width: 260px;
  font-size: 7px;
}

@media (max-width: 1120px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-form {
    width: 100%;
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .settings-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    width: 264px;
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }

  body.menu-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 25;
    inset: 0;
    background: rgba(10, 20, 14, 0.34);
  }

  body.menu-open .sidebar-scrim {
    display: block;
  }

  .mobile-header {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    height: 64px;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 254, 250, 0.9);
    backdrop-filter: blur(15px);
  }

  .main-content {
    margin-left: 0;
    padding: 27px 22px 50px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-art {
    min-height: 320px;
  }

  .auth-art-inner {
    min-height: 320px;
    padding: 28px;
  }

  .auth-message {
    padding: 45px 0 34px;
  }

  .auth-message h1 {
    font-size: 34px;
  }

  .auth-proof {
    display: none;
  }

  .auth-panel {
    min-height: auto;
    padding: 40px 24px 60px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .share-card {
    grid-row: span 2;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-preview-wrap {
    position: static;
    width: min(330px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .main-content {
    padding: 23px 15px 42px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
  }

  .dashboard-heading > .button {
    width: 100%;
  }

  .page-heading h1 {
    font-size: 29px;
  }

  .stats-grid {
    gap: 9px;
  }

  .stat-card {
    min-height: 132px;
    padding: 15px;
  }

  .stat-card > strong {
    margin-top: 15px;
    font-size: 22px;
  }

  .bills-toolbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 19px 17px 14px;
  }

  .bills-toolbar .button {
    width: 100%;
  }

  .filter-row {
    padding: 0 17px 14px;
  }

  .filter-tabs {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .data-table th {
    display: none;
  }

  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 15px 17px;
    border-top: 1px solid var(--line);
  }

  .data-table td {
    padding: 3px 0;
    border: 0;
  }

  .data-table td:first-child {
    grid-column: 1 / -1;
    padding-left: 0;
  }

  .data-table td:nth-child(2) {
    grid-column: 1;
    margin-top: 8px;
  }

  .data-table td:nth-child(3) {
    grid-column: 1;
    margin-top: 7px;
  }

  .data-table td:nth-child(4) {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .data-table td:nth-child(5) {
    grid-column: 1;
  }

  .data-table td:nth-child(6) {
    grid-column: 2;
    grid-row: 5 / 7;
    align-self: end;
    padding-right: 0;
  }

  .table-title,
  .table-subtitle {
    max-width: calc(100vw - 70px);
  }

  .form-page-heading {
    gap: 14px;
  }

  .step-pill {
    display: none;
  }

  .form-section {
    padding: 21px 16px 24px;
  }

  .section-heading {
    gap: 10px;
  }

  .section-number {
    width: 32px;
    height: 32px;
  }

  .form-grid-2,
  .form-grid-3,
  .form-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid > .field:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .fee-labels {
    display: none;
  }

  .fee-editor-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .fee-editor-head .button {
    width: 100%;
  }

  .fee-rows {
    gap: 10px;
    margin-top: 15px;
  }

  .fee-row {
    grid-template-columns: 1fr 1fr 30px;
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #faf9f5;
  }

  .fee-row input:first-child {
    grid-column: 1 / 3;
  }

  .fee-row input:nth-child(2) {
    grid-column: 1;
  }

  .fee-row input:nth-child(3) {
    grid-column: 2;
  }

  .fee-row .remove-fee {
    grid-column: 3;
    grid-row: 1;
  }

  .upload-previews {
    grid-template-columns: repeat(2, 1fr);
  }

  .validity-section {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .validity-field {
    width: 100%;
  }

  .settings-form {
    padding: 21px 16px 24px;
  }

  .settings-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-submit .button {
    width: 100%;
  }

  .settings-phone {
    min-height: 420px;
  }

  .form-submit-bar {
    bottom: 8px;
  }

  .form-submit-bar > div:first-child {
    display: none;
  }

  .submit-actions {
    width: 100%;
  }

  .submit-actions .button-primary {
    flex: 1;
  }

  .detail-heading {
    gap: 17px;
  }

  .heading-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .detail-gallery {
    grid-template-rows: 210px 64px;
  }

  .detail-card {
    padding: 20px 16px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    grid-template-columns: 1fr;
  }

  .share-card {
    grid-row: auto;
  }

  .qr-frame {
    width: min(300px, 100%);
    margin: 0 auto;
  }

  .timeline-item {
    grid-template-columns: 12px 1fr;
  }

  .timeline-item time {
    grid-column: 2;
  }

  .auth-art {
    min-height: 260px;
  }

  .auth-art-inner {
    min-height: 260px;
    padding: 24px;
  }

  .auth-message {
    padding: 35px 0 20px;
  }

  .auth-message h1 {
    margin: 11px 0;
    font-size: 29px;
  }

  .auth-message p {
    font-size: 12px;
  }

  .auth-panel {
    padding: 32px 20px 45px;
  }

  .auth-form-wrap .form-grid-2 {
    grid-template-columns: 1fr;
  }

  .public-header {
    min-height: 61px;
  }

  .public-main {
    width: min(100% - 20px, 820px);
  }

  .public-demo-banner {
    width: min(100% - 20px, 820px);
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
    margin-top: 0;
    text-align: left;
  }

  .public-gallery {
    border-radius: 17px;
  }

  .gallery-stage {
    aspect-ratio: 4 / 3;
  }

  .placeholder-gallery {
    aspect-ratio: 4 / 2.4;
    min-height: 180px;
  }

  .public-content {
    margin-top: 15px;
  }

  .listing-intro {
    padding: 10px 4px 4px;
  }

  .public-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .public-title-row h1 {
    font-size: 27px;
  }

  .public-card {
    padding: 17px;
    border-radius: 15px;
  }

  .lease-dates {
    gap: 7px;
  }

  .lease-dates > div {
    padding: 10px;
  }

  .public-total strong {
    font-size: 27px;
  }

  .payment-card {
    padding: 18px;
  }

  .public-paybar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .public-paybar .button {
    min-width: 122px;
  }

  .public-footer {
    align-items: center;
    flex-direction: column;
    margin-bottom: 105px;
  }

  .unavailable-main {
    width: min(100% - 22px, 600px);
  }

  .unavailable-card {
    border-radius: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

