:root {
  color-scheme: light;
  --green: #25d264;
  --green-2: #20c768;
  --teal: #00c1a5;
  --ink: #272c2f;
  --text: #111827;
  --muted: #66717f;
  --soft: #f7faf9;
  --surface: #ffffff;
  --line: #e4e9ee;
  --line-2: #d7dee6;
  --success: #20c768;
  --info: #3082f6;
  --warning: #f5a608;
  --danger: #f04444;
  --draft: #9ca3af;
  --entity-green: #16c768;
  --entity-green-dark: #0fa958;
  --entity-green-soft: #ecfdf3;
  --entity-text: #111827;
  --entity-muted: #64748b;
  --entity-line: #e6ebf0;
  --entity-gray-soft: #f1f5f9;
  --shadow: 0 20px 60px rgba(17, 24, 39, 0.08);
  --shadow-soft: 0 10px 30px rgba(17, 24, 39, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --h1: 48px;
  --h2: 36px;
  --h3: 24px;
  --body: 16px;
  --small: 13px;
  font-family: Inter, Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 360px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 360px;
  color: var(--ink);
  background: var(--soft);
  font-size: var(--body);
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.compact-select {
  min-height: 40px;
  max-width: 260px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 8px 36px 8px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
  font-size: var(--small);
  font-weight: 700;
}

.compact-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(37, 210, 100, 0.14);
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  color: var(--text);
  letter-spacing: 0;
}

h1 {
  font-size: var(--h1);
  line-height: 1.18;
  font-weight: 850;
}

h2 {
  font-size: var(--h2);
  line-height: 1.22;
  font-weight: 820;
}

h3 {
  font-size: var(--h3);
  line-height: 1.18;
  font-weight: 800;
}

p {
  line-height: 1.5;
}

small,
.small {
  font-size: var(--small);
  line-height: 1.54;
}

.icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  flex: 0 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #fff;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--green), var(--teal));
  clip-path: polygon(50% 0, 94% 25%, 94% 72%, 52% 100%, 8% 75%, 8% 25%);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 6px;
  height: 18px;
  border-radius: 60% 60% 42% 42%;
  background: var(--surface);
  opacity: 0.96;
  transform: rotate(9deg);
}

.brand-mark .icon {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
}

.brand-title {
  display: grid;
  gap: 2px;
  min-width: 0;
  text-align: left;
}

.brand-name {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.brand-name b {
  color: var(--green);
}

.brand-title small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.button,
.primary,
.secondary,
.text-button,
.icon-button,
.chip,
.nav-btn,
.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 16px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
  max-width: 100%;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--green), var(--teal));
  box-shadow: 0 14px 30px rgba(32, 199, 104, 0.28);
}

.primary:hover,
.secondary:hover,
.text-button:hover,
.icon-button:hover,
.chip:hover,
.tab:hover {
  transform: translateY(-1px);
}

.secondary {
  border-color: var(--line);
  background: #fff;
}

.text-button {
  color: var(--green-2);
  min-height: 36px;
  padding: 6px 0;
  text-align: left;
}

.icon-button {
  position: relative;
  width: 44px;
  min-width: 44px;
  padding: 0;
  border-color: var(--line);
  background: #fff;
  overflow: visible;
  white-space: nowrap;
}

.icon-button:has(.nav-badge) {
  width: 52px;
  min-width: 52px;
}

.chip.active {
  color: var(--green-2);
  border-color: var(--green);
  background: #f0fbf5;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  min-height: 88px;
  padding: 14px 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
}

.site-nav,
.header-actions,
.row,
.tabs,
.chips,
.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  min-width: 0;
}

.site-nav {
  justify-content: center;
}

.site-nav button {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  padding: 10px 12px;
  line-height: 1.25;
}

.cabinet-menu {
  position: relative;
}

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  display: none;
  width: 260px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
}

.cabinet-menu.open .dropdown {
  display: grid;
  gap: 8px;
}

.dropdown button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 10px;
  background: transparent;
  text-align: left;
}

.dropdown button span {
  min-width: 0;
}

.dropdown button:hover {
  background: #f2fbf6;
}

.dropdown small {
  display: block;
  color: var(--muted);
  font-weight: 500;
}

.public-hero {
  position: relative;
  overflow: hidden;
  padding: 42px 64px 18px;
  background:
    radial-gradient(circle at 76% 22%, rgba(37, 210, 100, 0.18), transparent 28%),
    linear-gradient(180deg, #fff 0%, #f8fbfa 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(380px, 0.86fr);
  align-items: center;
  max-width: 1380px;
  margin: 0 auto;
  gap: 28px;
}

.hero-copy h1 {
  margin: 18px 0 0;
  max-width: 820px;
}

.hero-copy p {
  max-width: 700px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}

.hero-badge,
.badge,
.status,
.counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: var(--small);
  font-weight: 800;
  white-space: nowrap;
}

.hero-badge {
  color: #079747;
  background: #e9f9f0;
}

.hero-visual {
  position: relative;
  min-height: 300px;
}

.hero-visual img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 0 0 120px 120px;
  filter: saturate(0.98);
}

.floating-note {
  position: absolute;
  left: 6%;
  bottom: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.floating-note > span:last-child {
  min-width: 0;
}

.floating-note strong,
.floating-note > span:last-child {
  display: block;
}

.floating-note strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.32;
}

.floating-note > span:last-child {
  color: var(--muted);
  font-size: var(--small);
  line-height: 1.46;
}

.search-panel {
  max-width: 1260px;
  margin: -8px auto 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.search-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr 0.9fr 1.35fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: var(--small);
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px 13px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.file-field {
  border: 1px dashed #b8e6cc;
  border-radius: 14px;
  padding: 14px;
  background: #f4fbf7;
}

.file-field input[type="file"] {
  padding: 10px;
  background: #fff;
  cursor: pointer;
}

.file-field small {
  display: block;
  margin-top: 8px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(37, 210, 100, 0.14);
}

.price-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.public-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  max-width: 1380px;
  margin: 18px auto 0;
  padding: 0 64px 44px;
  gap: 24px;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.listing-card,
.card,
.panel,
.metric,
.side-card,
.table-card,
.ticket-card,
.notification-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.02);
}

.listing-card {
  overflow: hidden;
  min-width: 0;
}

.listing-image {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: #eef4f2;
}

.listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.heart {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  backdrop-filter: blur(10px);
}

.listing-body {
  padding: 14px;
}

.price {
  font-size: 22px;
  font-weight: 850;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.price small {
  color: var(--muted);
  font-size: var(--small);
  line-height: 1.54;
  font-weight: 700;
}

.listing-body h3,
.panel h2,
.panel h3,
.side-card h3,
.table-card h3 {
  margin: 0;
}

.listing-body h3 {
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.35;
  min-height: 44px;
}

.listing-agent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  min-width: 0;
}

.listing-agent > .row {
  flex: 1 1 160px;
}

.listing-agent > .row > span:last-child {
  min-width: 0;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e9f9f0, #e4f8f6);
  color: var(--green-2);
  font-weight: 850;
  overflow: hidden;
}

.avatar.dark {
  background: #17212a;
  color: #fff;
}

.side-stack {
  display: grid;
  gap: 16px;
}

.side-card {
  padding: 22px;
  min-width: 0;
}

.benefit {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 18px;
}

.benefit-icon,
.round-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--green-2);
  background: #e8f9ef;
}

.feature-row {
  max-width: 1000px;
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
}

.feature {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.status {
  min-width: 72px;
  max-width: 100%;
  background: #eef2f6;
  color: #5d6674;
}

.status.paid,
.status.active,
.status.success,
.status.signed,
.status.resolved,
.status.confirmed {
  color: #059447;
  background: #e6f9ed;
}

.status.pending,
.status.matched,
.status.waiting,
.status.transfer,
.status.work,
.status.forming,
.status.sent,
.status.payout,
.status.invited,
.status.opened,
.status.requested,
.status.scheduled,
.status.escalated,
.status.kyc {
  color: #1675e0;
  background: #e9f3ff;
}

.status.warning,
.status.searching,
.status.attention,
.status.hold {
  color: #c56a00;
  background: #fff3df;
}

.status.overdue,
.status.danger,
.status.cancelled,
.status.rejected {
  color: #db2222;
  background: #ffe6e6;
}

.status.draft {
  color: #6b7280;
  background: #eef0f3;
}

.status.new {
  color: #059447;
  background: #e6f9ed;
}

.status.processing,
.status.pending_review,
.status.manual_review,
.status.partial,
.status.requires-action,
.status.moderation,
.status.collection {
  color: #c56a00;
  background: #fff3df;
}

.status.disputed,
.status.reversed,
.status.expired,
.status.error {
  color: #db2222;
  background: #ffe6e6;
}

.status.closed-aid,
.status.read,
.status.acknowledged,
.status.closed,
.status.approved,
.status.registered,
.status.published {
  color: #059447;
  background: #e6f9ed;
}

.badge.warning {
  color: #c56a00;
  background: #fff3df;
}

.app-shell {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  min-height: 100svh;
  background: #fbfcfd;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px 22px;
  border-right: 1px solid var(--line);
  background: #fff;
  overflow-y: auto;
}

.sidebar.dark {
  color: #eef6f5;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 210, 100, 0.16), transparent 26%),
    linear-gradient(180deg, #10202a, #07131b);
}

.sidebar.dark .brand,
.sidebar.dark .brand-title small,
.sidebar.dark .nav-btn,
.sidebar.dark .sidebar-section,
.sidebar.dark .user-card span {
  color: #dbe9e7;
}

.sidebar.dark .brand-name {
  color: #fff;
}

.sidebar.dark .nav-btn.active,
.sidebar.dark .nav-btn:hover,
.sidebar.dark .user-card {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-section {
  margin: 8px 0 2px;
  color: var(--muted);
  font-size: var(--small);
  font-weight: 800;
}

.side-nav {
  display: grid;
  gap: 8px;
}

.nav-btn {
  justify-content: flex-start;
  width: 100%;
  min-height: 46px;
  border: 0;
  color: var(--ink);
  font-weight: 750;
  text-align: left;
}

.nav-btn.active,
.nav-btn:hover {
  color: var(--green-2);
  background: linear-gradient(90deg, rgba(37, 210, 100, 0.14), rgba(0, 193, 165, 0.05));
}

.nav-badge {
  margin-left: auto;
  min-width: 24px;
  min-height: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: var(--small);
  line-height: 1;
}

.icon-button .nav-badge {
  position: absolute;
  top: -8px;
  right: 2px;
  margin-left: 0;
  min-width: 20px;
  min-height: 20px;
  padding: 2px 6px;
  font-size: 12px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  min-width: 0;
}

.user-card > span:last-child {
  min-width: 0;
}

.user-card strong,
.user-card span {
  display: block;
}

.user-card span {
  color: var(--muted);
  font-size: var(--small);
}

.workspace {
  min-width: 0;
  padding: 28px 30px 42px;
}

.app-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
  margin-bottom: 24px;
}

.title-block h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.22;
}

.title-block p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.top-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.search {
  position: relative;
  width: min(420px, 42vw);
}

.search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px 10px 44px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.search .icon {
  position: absolute;
  left: 14px;
  top: 13px;
  color: var(--muted);
}

.balance-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.balance-pill span {
  display: block;
  color: var(--muted);
  font-size: var(--small);
  min-width: 0;
}

.balance-pill strong {
  color: var(--text);
  font-size: 17px;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 20px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.admin-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.metric {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 22px;
  min-width: 0;
}

.metric.compact {
  min-height: 126px;
}

.metric span {
  color: var(--muted);
  font-weight: 650;
}

.metric strong {
  display: block;
  margin-top: 10px;
  padding-right: 42px;
  color: var(--text);
  font-size: 30px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.metric small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

.metric .round-icon {
  position: absolute;
  right: 18px;
  top: 18px;
}

.spark,
.bars,
.line-chart {
  width: 100%;
  height: 58px;
  margin-top: 12px;
}

.panel,
.table-card {
  padding: 22px;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  min-width: 0;
}

.panel-head h2,
.panel-head h3 {
  min-width: 0;
  font-size: 20px;
  line-height: 1.3;
}

.panel h3,
.side-card h3,
.table-card h3,
.card h3,
.ticket-card h3 {
  font-size: 18px;
  line-height: 1.3;
}

.tenant-hero h2 {
  font-size: 24px;
  line-height: 1.25;
}

.panel > h2 {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.16;
}

.modal-panel h2 {
  font-size: 24px;
  line-height: 1.25;
}

.tabs {
  gap: 22px;
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 42px;
  border: 0;
  border-radius: 0;
  padding: 10px 0;
  color: var(--muted);
}

.tab.active {
  color: var(--green-2);
  box-shadow: inset 0 -2px var(--green-2);
}

.counter {
  min-width: 24px;
  min-height: 24px;
  padding: 1px 7px;
  color: #5d6674;
  background: #eef2f6;
  font-size: var(--small);
  line-height: 1.4;
}

.table-wrap {
  overflow-x: auto;
  margin-inline: -22px;
}

table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: var(--small);
  font-weight: 760;
}

tr:last-child td {
  border-bottom: 0;
}

.object-cell {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.thumb {
  width: 74px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: #eef4f2;
}

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

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.list {
  display: grid;
  gap: 12px;
}

.list-row,
.payment-row,
.doc-row,
.reminder-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.list-row > span:not(.status),
.payment-row > span:not(.status),
.doc-row > span:not(.status),
.reminder-row > span:not(.status),
.ticket-card,
.card {
  min-width: 0;
}

.list-row:last-child,
.payment-row:last-child,
.doc-row:last-child,
.reminder-row:last-child {
  border-bottom: 0;
}

.ticket-card {
  padding: 14px;
  overflow: hidden;
}

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

.donut {
  --p1: 64%;
  --p2: 22%;
  width: 156px;
  height: 156px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--green) 0 var(--p1), var(--warning) var(--p1) calc(var(--p1) + var(--p2)), #c6ccd5 0 100%);
}

.donut::before {
  content: attr(data-label);
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
  text-align: center;
  white-space: pre-line;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  height: 150px;
  padding-top: 14px;
}

.bar {
  position: relative;
  min-height: 8px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, rgba(37, 210, 100, 0.95), rgba(37, 210, 100, 0.34));
}

.bar label {
  position: absolute;
  bottom: -26px;
  left: 50%;
  color: var(--muted);
  font-size: var(--small);
  transform: translateX(-50%);
}

.tenant-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  min-width: 0;
}

.tenant-hero > div {
  min-width: 0;
}

.tenant-hero img {
  width: 100%;
  height: 178px;
  border-radius: 16px;
  object-fit: cover;
}

.tenant-page {
  align-items: start;
}

.tenant-alert {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid #f7dfb8;
  border-radius: 16px;
  background: #fffaf0;
  color: var(--ink);
}

.tenant-alert > .icon {
  color: var(--warning);
  margin-top: 4px;
}

.tenant-hero.compact {
  grid-template-columns: 210px minmax(0, 1fr);
}

.tenant-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.lease-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.lease-card.active {
  border-color: rgba(32, 199, 104, 0.42);
  background: linear-gradient(180deg, rgba(32, 199, 104, 0.08), #fff 42%);
  box-shadow: 0 16px 34px rgba(32, 199, 104, 0.12);
}

.lease-card .thumb {
  width: 92px;
  height: 76px;
}

.lease-card h3 {
  margin: 0;
  font-size: 18px;
}

.payment-focus,
.emergency-panel,
.aid-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: center;
}

.payment-focus h2,
.aid-hero h2 {
  margin: 10px 0 6px;
  font-size: 38px;
  line-height: 1.12;
}

.method-grid,
.contact-grid,
.service-grid,
.profile-grid,
.settings-grid,
.rule-grid {
  display: grid;
  gap: 14px;
}

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

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

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

.method-card,
.contact-card,
.rule-card,
.settings-card,
.tenant-action-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.method-card > .icon,
.rule-card > .icon {
  color: var(--green-2);
}

.method-card h3,
.contact-card h3,
.rule-card h3,
.settings-card h3 {
  margin: 10px 0 8px;
}

.tenant-table {
  min-width: 920px;
}

.tenant-doc-row,
.ticket-row {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

button.notification-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

button.notification-item:hover,
.tenant-doc-row:hover,
.ticket-row:hover {
  background: rgba(32, 199, 104, 0.05);
}

.tenant-doc-row {
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  padding: 14px 0;
}

.ticket-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto minmax(160px, auto);
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.ticket-row:last-child {
  border-bottom: 0;
}

.owner-page {
  align-items: start;
}

.owner-table {
  min-width: 980px;
}

.payments-owner-table {
  min-width: 1180px;
}

.owner-table th,
.owner-table td {
  font-size: 14px;
}

.owner-table td {
  vertical-align: top;
}

.owner-table .object-cell {
  grid-template-columns: 64px minmax(0, 1fr);
  min-width: 250px;
}

.owner-table .thumb {
  width: 64px;
  height: 50px;
  border-radius: 10px;
}

.owner-table .secondary {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 13px;
}

.report-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.report-card .panel-head {
  align-items: flex-start;
  gap: 12px;
}

.realtor-page {
  align-items: start;
}

.realtor-table {
  min-width: 1040px;
}

.realtor-table th,
.realtor-table td {
  padding-block: 14px;
  font-size: 14px;
  vertical-align: top;
}

.realtor-table .object-cell {
  grid-template-columns: 64px minmax(0, 1fr);
  min-width: 250px;
}

.realtor-table .thumb {
  width: 64px;
  height: 50px;
  border-radius: 10px;
}

.realtor-table .secondary,
.realtor-table .primary {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 13px;
}

.tenant-action-card {
  display: grid;
  gap: 10px;
}

.emergency-panel {
  border-color: #ffd6d6;
  background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
}

.profile-hero {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.profile-hero .avatar {
  width: 72px;
  height: 72px;
  font-size: 22px;
}

.profile-hero h2 {
  margin: 0;
}

.settings-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 740;
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.aid-progress {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.aid-progress strong {
  font-size: 30px;
  line-height: 1.1;
}

.progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef2;
}

.progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--green), var(--teal));
}

.timeline-list {
  display: grid;
  gap: 4px;
}

.tenant-aid-card .detail-grid {
  margin-bottom: 14px;
}

.payment-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
  margin-top: 18px;
}

.payment-step {
  position: relative;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.payment-step::before {
  content: "";
  width: 20px;
  height: 20px;
  border: 3px solid var(--line-2);
  border-radius: 50%;
  background: #fff;
}

.payment-step.done::before {
  border-color: var(--green);
  background: var(--green);
  box-shadow: inset 0 0 0 4px #fff;
}

.payment-step.active::before {
  border-color: var(--green);
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
}

.admin-grid .three-col {
  gap: 14px;
}

.admin-grid .three-col .panel {
  padding: 18px;
}

.city-table table {
  min-width: 720px;
}

.crm-page {
  gap: 18px;
}

.crm-control-panel {
  background:
    radial-gradient(circle at 92% 0%, rgba(37, 210, 100, 0.12), transparent 28%),
    #fff;
}

.crm-control-panel .panel-head {
  align-items: flex-start;
}

.crm-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.crm-state-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.crm-state-line span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.crm-state-line .icon {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.crm-inline-search {
  flex: 1 1 320px;
  width: auto;
  min-width: min(320px, 100%);
}

.crm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.crm-kpi {
  display: grid;
  justify-items: start;
  gap: 8px;
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: left;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.035);
}

.crm-kpi span {
  color: var(--muted);
  font-size: var(--small);
  font-weight: 760;
}

.crm-kpi strong {
  color: var(--text);
  font-size: 26px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.crm-source {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.danger-chip {
  border-color: rgba(239, 68, 68, 0.22);
  color: var(--danger);
  background: #fff7f7;
}

.success-text {
  color: var(--success);
}

.warning-text {
  color: var(--warning);
}

.danger-text {
  color: var(--danger);
}

.crm-table-wrap {
  border-top: 1px solid var(--line);
}

.crm-table {
  min-width: 1080px;
}

.crm-table th,
.crm-table td {
  padding-block: 14px;
  font-size: 14px;
}

.crm-table td {
  vertical-align: top;
}

.crm-table .object-cell {
  grid-template-columns: 58px minmax(0, 1fr);
  min-width: 260px;
}

.crm-table .thumb {
  width: 58px;
  height: 48px;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #fbfdfc;
}

.table-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: var(--small);
  font-weight: 760;
  text-align: left;
}

.table-sort.active {
  color: var(--green);
}

.table-sort .icon {
  width: 16px;
  height: 16px;
}

.icon-button:disabled,
.chip:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.crm-actions {
  flex-wrap: nowrap;
  gap: 8px;
}

.crm-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}

.crm-support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.crm-info-panel {
  min-height: 100%;
}

.crm-check-row,
.crm-audit-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.crm-check-row:last-child,
.crm-audit-row:last-child {
  border-bottom: 0;
}

.crm-check-row > .icon {
  margin-top: 2px;
  color: var(--green-2);
}

.state-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.detail-grid > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfd;
}

.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: var(--small);
  font-weight: 740;
}

.detail-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.crm-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
}

.crm-detail-main,
.crm-detail-side {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.crm-detail-main .object-cell {
  margin-bottom: 14px;
}

.crm-detail-side h3 {
  margin: 0 0 12px;
}

.crm-modal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.modal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.crm-tab-panels {
  display: grid;
  gap: 14px;
}

.crm-tab-panel {
  min-width: 0;
  padding-top: 2px;
}

.crm-tab-panel h3 {
  margin: 0;
}

.inner-panel {
  margin-top: 16px;
  padding: 16px;
  box-shadow: none;
}

.check-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-weight: 740;
  color: inherit;
  text-align: left;
}

.check-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.check-card.is-required {
  background: #f7fbf9;
}

.crm-column-list {
  display: grid;
  gap: 10px;
}

.crm-column-item {
  justify-content: space-between;
}

.crm-column-item label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.crm-column-item span:first-child {
  overflow-wrap: anywhere;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-action {
  min-height: 86px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}

.notification-center {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100vw - 44px));
}

.notification-toast {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  min-width: 0;
}

.notification-toast > span:nth-child(2) {
  min-width: 0;
}

.notification-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.notification-item > span:nth-child(2) {
  min-width: 0;
}

.notification-toast.warning {
  border-left-color: var(--warning);
}

.notification-toast.danger {
  border-left-color: var(--danger);
}

.empty {
  display: grid;
  place-items: center;
  min-height: 130px;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(7px);
}

.modal-panel {
  width: min(640px, 100%);
  max-height: min(760px, calc(100svh - 42px));
  overflow-y: auto;
  padding: 26px;
  border: 1px solid var(--entity-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.modal-panel.wide {
  width: min(980px, 100%);
}

.modal-panel h2 {
  margin: 0 0 14px;
}

.modal-panel > .panel-head h2 {
  margin: 0;
}

body.modal-open {
  overflow: hidden;
}

.entity-modal-overlay {
  padding: 20px 24px;
}

.modal-panel.entity-modal {
  display: flex;
  flex-direction: column;
  width: min(1200px, calc(100vw - 48px));
  max-height: calc(100svh - 40px);
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  color: var(--entity-text);
  animation: entity-modal-in 180ms ease-out both;
}

.entity-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex: 0 0 auto;
  padding: 22px 28px 20px;
  border-bottom: 1px solid var(--entity-line);
  background: #fff;
}

.entity-modal-heading {
  min-width: 0;
}

.entity-modal-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  min-width: 0;
}

.entity-modal-title-row h2 {
  min-width: 0;
  margin: 0;
  color: var(--entity-text);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.entity-modal-state {
  display: inline-flex;
  min-width: 0;
}

.entity-modal-state .status {
  min-width: 0;
  min-height: 27px;
  padding: 4px 10px;
  font-size: 12px;
}

.entity-modal-meta {
  margin: 5px 0 0;
  color: var(--entity-muted);
  font-size: 14px;
  line-height: 1.45;
}

.entity-modal-close {
  flex: 0 0 44px;
  border-color: var(--entity-line);
  border-radius: 12px;
  color: #475569;
  background: #fff;
}

.entity-modal-close:hover {
  color: var(--entity-green-dark);
  border-color: rgba(22, 199, 104, 0.42);
  background: var(--entity-green-soft);
}

.entity-modal-body {
  min-width: 0;
  min-height: 0;
  padding: 22px 28px 28px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.entity-modal .crm-detail {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}

.entity-modal .crm-detail-main,
.entity-modal .crm-detail-side {
  min-width: 0;
}

.entity-modal .crm-detail-main {
  padding: 0;
  border: 0;
  background: transparent;
}

.entity-modal .crm-detail-side {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--entity-line);
  border-radius: 16px;
  background: #f8fafc;
}

.entity-modal .crm-detail-side > h3,
.entity-side-section > h3,
.entity-summary > h3 {
  margin: 0 0 12px;
  color: var(--entity-text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.entity-side-section {
  min-width: 0;
}

.entity-side-section + .entity-side-section {
  padding-top: 16px;
  border-top: 1px solid var(--entity-line);
}

.entity-modal .tenant-hero.compact.entity-overview {
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.entity-media {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--entity-line);
  border-radius: 16px;
  background: var(--entity-gray-soft);
}

.entity-modal .entity-media img {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
}

.entity-photo-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(6px);
  font-size: 12px;
  font-weight: 700;
}

.entity-photo-count .icon {
  width: 16px;
  height: 16px;
}

.entity-summary {
  min-width: 0;
}

.entity-modal .detail-grid {
  gap: 10px;
  margin-top: 0;
}

.entity-modal .detail-grid > div {
  min-height: 76px;
  padding: 13px 14px;
  border-color: var(--entity-line);
  border-radius: 14px;
  background: #fff;
}

.entity-modal .detail-grid span,
.entity-facts span,
.entity-contact small {
  color: var(--entity-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.entity-modal .detail-grid strong {
  margin-top: 6px;
  color: var(--entity-text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.entity-modal .inner-panel {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--entity-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.entity-modal .inner-panel .panel-head {
  margin-bottom: 12px;
}

.entity-modal .inner-panel h3,
.entity-modal .crm-tab-panel h3 {
  font-size: 17px;
  font-weight: 700;
}

.entity-modal .quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.entity-modal .quick-action {
  min-width: 0;
  min-height: 92px;
  gap: 9px;
  padding: 12px 7px;
  border-color: var(--entity-line);
  border-radius: 14px;
  color: #334155;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
}

.entity-modal .quick-action:hover {
  color: var(--entity-green-dark);
  border-color: rgba(22, 199, 104, 0.5);
  background: var(--entity-green-soft);
  box-shadow: 0 8px 20px rgba(15, 169, 88, 0.1);
}

.entity-modal .quick-action > .icon {
  width: 24px;
  height: 24px;
  color: var(--entity-green-dark);
}

.entity-contact-list {
  display: grid;
  gap: 10px;
}

.entity-contact {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.entity-contact > span:last-child {
  display: grid;
  min-width: 0;
}

.entity-contact strong,
.entity-contact small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.entity-contact strong {
  color: var(--entity-text);
  font-size: 14px;
  line-height: 1.35;
}

.entity-facts {
  display: grid;
  gap: 9px;
}

.entity-facts > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.entity-facts strong {
  min-width: 0;
  color: var(--entity-text);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
  overflow-wrap: anywhere;
}

.entity-modal .crm-modal-head {
  padding: 12px 14px;
  border: 1px solid var(--entity-line);
  border-radius: 14px;
  background: #f8fafc;
}

.payment-review-warning {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #f4c7c7;
  border-radius: 14px;
  color: #8f1f1f;
  background: #fff6f6;
}

.payment-review-warning.neutral {
  border-color: #cfe5da;
  color: #16643c;
  background: #f2fbf6;
}

.payment-review-warning > .icon {
  width: 28px;
  height: 28px;
}

.payment-review-warning strong,
.payment-review-warning small {
  overflow-wrap: anywhere;
}

.payment-review-warning small {
  color: inherit;
  opacity: 0.82;
}

.entity-modal .detail-grid > .detail-alert {
  border-color: #efb9b9;
  background: #fff6f6;
}

.entity-modal .detail-grid > .detail-alert strong {
  color: #b42323;
}

.payment-integrity-card .inner-panel {
  margin-top: 16px;
}

.payment-action-reason {
  margin: 0;
  padding-top: 4px;
  line-height: 1.45;
}

.modal-form-actions {
  flex-wrap: wrap;
  margin-top: 2px;
}

.danger-action,
.primary.danger-action {
  border-color: #dc3535;
  color: #fff;
  background: #dc3535;
}

.danger-action:hover,
.primary.danger-action:hover {
  border-color: #b92424;
  background: #b92424;
}

.entity-modal .quick-action:disabled {
  cursor: not-allowed;
  color: #7d8795;
  border-color: var(--entity-line);
  background: #f3f5f7;
  box-shadow: none;
}

.entity-modal .quick-action:disabled > .icon {
  color: #9aa3af;
}

.entity-modal .modal-tabs {
  margin-top: 16px;
}

.entity-modal .crm-audit-row,
.entity-modal .payment-row,
.entity-modal .doc-row {
  min-width: 0;
}

.entity-modal button.doc-row,
.entity-modal button.crm-audit-row,
.entity-modal button.payment-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--entity-line);
  border-radius: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.entity-modal button.doc-row:last-child,
.entity-modal button.crm-audit-row:last-child,
.entity-modal button.payment-row:last-child {
  border-bottom: 0;
}

.entity-modal--lease .crm-detail-main > .object-cell {
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 16px;
}

.entity-modal--lease .crm-detail-main > .object-cell .thumb {
  width: 110px;
  height: 82px;
  border: 1px solid var(--entity-line);
  border-radius: 14px;
}

.entity-modal .crm-audit-row:has(> .status) {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.entity-modal :is(button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid rgba(47, 128, 237, 0.28);
  outline-offset: 2px;
}

@keyframes entity-modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.form-grid > .full,
.row.full,
.setting-row.full {
  grid-column: 1 / -1;
}

.field.full {
  grid-column: 1 / -1;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 64px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.amount-large {
  margin-top: 22px;
  font-size: 38px;
  line-height: 1.12;
}

@media (max-width: 1240px) {
  .site-header,
  .public-hero,
  .public-main,
  .footer {
    padding-inline: 36px;
  }

  .public-main,
  .content-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  .crm-support-grid,
  .crm-detail {
    grid-template-columns: 1fr;
  }

  .payment-focus,
  .emergency-panel,
  .aid-hero {
    grid-template-columns: 1fr;
  }

  .method-grid,
  .contact-grid,
  .rule-grid,
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .site-header,
  .hero-grid,
  .tenant-hero {
    grid-template-columns: 1fr;
  }

  .site-nav {
    justify-content: flex-start;
  }

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .top-tools {
    justify-content: flex-start;
  }

  .search {
    width: 100%;
  }

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

  .side-stack,
  .feature-row,
  .ticket-grid,
  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .crm-control-panel .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-control-panel .panel-head .row,
  .crm-table-footer {
    width: 100%;
  }

  .crm-table-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .tenant-card-grid,
  .profile-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .profile-hero > button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  :root {
    --h1: 34px;
    --h2: 26px;
    --h3: 20px;
  }

  .site-header,
  .public-hero,
  .public-main,
  .workspace,
  .footer {
    padding-inline: 16px;
  }

  .listing-grid,
  .metric-grid,
  .side-stack,
  .feature-row,
  .two-col,
  .three-col,
  .ticket-grid,
  .quick-grid,
  .crm-kpi-grid,
  .state-grid,
  .detail-grid,
  .method-grid,
  .contact-grid,
  .service-grid,
  .rule-grid,
  .form-grid,
  .side-nav {
    grid-template-columns: 1fr;
  }

  .header-actions,
  .row,
  .chips,
  .tabs {
    width: 100%;
  }

  .primary,
  .secondary,
  .chip,
  .tab {
    width: 100%;
  }

  .site-header {
    gap: 16px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }

  .brand-name {
    font-size: 24px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .search-grid,
  .price-range,
  .payment-timeline {
    grid-template-columns: 1fr;
  }

  .metric strong {
    font-size: 27px;
  }

  .amount-large {
    font-size: 34px;
  }

  .title-block h1 {
    font-size: 26px;
  }

  .panel-head h2,
  .panel-head h3,
  .panel h3,
  .side-card h3,
  .table-card h3,
  .card h3,
  .ticket-card h3 {
    font-size: 18px;
  }

  .tenant-hero h2 {
    font-size: 22px;
  }

  .app-top {
    grid-template-columns: 1fr;
  }

  .object-cell,
  .list-row,
  .payment-row,
  .doc-row,
  .reminder-row {
    grid-template-columns: 1fr;
  }

  .crm-inline-search {
    flex-basis: 100%;
    min-width: 100%;
  }

  .crm-table {
    min-width: 920px;
  }

  .crm-table .object-cell {
    grid-template-columns: 50px minmax(0, 1fr);
    min-width: 220px;
  }

  .crm-table .thumb {
    width: 50px;
    height: 42px;
  }

  .crm-actions .icon-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
  }

  .modal {
    padding: 12px;
  }

  .modal-panel {
    padding: 18px;
    border-radius: 18px;
  }

  .modal-panel > .panel-head {
    align-items: center;
    flex-direction: row;
  }

  .modal-panel > .panel-head .icon-button {
    flex: 0 0 44px;
    margin-left: auto;
  }

  .tenant-hero img {
    height: 210px;
  }

  .tenant-hero.compact,
  .lease-card,
  .ticket-row,
  .tenant-doc-row,
  .profile-hero {
    grid-template-columns: 1fr;
  }

  .lease-card .thumb {
    width: 100%;
    height: 160px;
  }

  .payment-focus h2,
  .aid-hero h2 {
    font-size: 30px;
  }

  .tenant-table {
    min-width: 760px;
  }

  .panel-head,
  .listing-agent,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .listing-body h3 {
    min-height: 0;
  }
}

@media (max-width: 1199px) {
  .modal-panel.entity-modal {
    width: min(980px, calc(100vw - 32px));
  }

  .entity-modal .crm-detail {
    grid-template-columns: 1fr;
  }

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

  .entity-modal .tenant-hero.compact.entity-overview {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .entity-modal-overlay {
    place-items: stretch;
    padding: 0;
  }

  .modal-panel.entity-modal {
    width: 100%;
    max-height: none;
    height: 100svh;
    padding: 0;
    border: 0;
    border-radius: 0;
  }

  .entity-modal-head {
    padding: 16px;
  }

  .entity-modal-title-row {
    align-items: flex-start;
  }

  .entity-modal-title-row h2 {
    flex-basis: 100%;
    font-size: 24px;
  }

  .entity-modal-meta {
    font-size: 13px;
  }

  .entity-modal-body {
    padding: 16px 16px 24px;
    scrollbar-gutter: auto;
  }

  .entity-modal .tenant-hero.compact.entity-overview {
    grid-template-columns: 1fr;
  }

  .entity-media {
    aspect-ratio: 16 / 10;
  }

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

  .entity-modal .quick-action {
    min-height: 88px;
    padding-inline: 10px;
    font-size: 13px;
  }

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

  .entity-modal .crm-detail-side,
  .entity-modal .inner-panel {
    padding: 16px;
  }
}

@media (max-width: 479px) {
  .entity-modal-head {
    gap: 12px;
    padding: 14px;
  }

  .entity-modal-title-row h2 {
    font-size: 22px;
  }

  .entity-modal-close {
    flex-basis: 42px;
    width: 42px;
    min-width: 42px;
    min-height: 42px;
  }

  .entity-modal-body {
    padding: 14px 14px 22px;
  }

  .entity-modal-body > .detail-grid,
  .entity-modal .crm-detail-main > .detail-grid,
  .entity-modal .crm-detail-side > .detail-grid {
    grid-template-columns: 1fr;
  }

  .entity-modal .entity-overview .detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entity-modal .detail-grid > div {
    min-height: 72px;
    padding: 12px;
  }

  .entity-modal .detail-grid strong {
    font-size: 15px;
  }

  .entity-modal .crm-detail-side,
  .entity-modal .inner-panel {
    padding: 14px;
  }

  .payment-review-warning {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 12px;
  }

  .modal-form-actions > button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal-panel.entity-modal {
    animation: none;
  }
}

/* MVP remediation: preserve the visual system while preventing clipped controls. */
.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.admin-metrics {
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
}

.crm-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.metric strong,
.crm-kpi strong,
.balance-pill strong,
.amount-large,
.price,
.payments-owner-table strong {
  white-space: nowrap;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
}

.payment-row > strong {
  white-space: nowrap;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
}

.payment-row > span:not(.status) strong {
  white-space: normal;
  overflow-wrap: anywhere;
}

.primary,
.secondary {
  width: auto;
  min-width: max-content;
  overflow: visible;
  text-overflow: clip;
}

.table-sort {
  width: 100%;
  min-height: 40px;
  padding: 8px 4px;
}

.text-button {
  min-height: 40px;
  padding: 8px 6px;
}

.crm-actions .icon-button,
.icon-button,
button.heart {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
}

:is(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid rgba(48, 130, 246, 0.28);
  outline-offset: 2px;
}

.user-logout {
  margin-left: auto;
  flex: 0 0 44px;
}

.sidebar.dark .user-logout {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.form-error {
  margin: 12px 0 0;
  color: #c71f1f;
  font-size: 14px;
  font-weight: 700;
}

.auth-form {
  margin-top: 8px;
}

.auth-note {
  margin: 0;
  text-align: center;
}

.invitation-page {
  min-height: 100vh;
  background: #f7faf9;
}

.invitation-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.invitation-main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.invitation-panel,
.invitation-aside {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 16px 48px rgba(28, 45, 38, 0.07);
}

.invitation-heading {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 30px;
}

.invitation-heading h1,
.invitation-state h1 {
  margin: 10px 0 6px;
  font-size: 32px;
  line-height: 1.2;
}

.invitation-heading p,
.invitation-aside p,
.invitation-state p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.invitation-role-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--entity-green-soft);
  color: var(--green);
}

.invitation-form {
  margin-top: 0;
}

.invitation-form .field input[aria-invalid="true"] {
  border-color: #e5484d;
  background: #fffafa;
}

.field-error {
  display: block;
  margin-top: 6px;
  color: #c71f1f;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
}

.invitation-error-summary {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #f1b8bb;
  border-radius: 6px;
  background: #fff5f5;
  color: #9f1d22;
}

.invitation-error-summary small {
  font-weight: 500;
}

.invitation-password-hint {
  margin: -4px 0 2px;
}

.invitation-context {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: -10px 0 24px;
  padding: 14px 16px;
  border: 1px solid #cde8dc;
  border-radius: 8px;
  background: #f4fbf8;
  color: #1d4938;
}

.invitation-context small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.invitation-session-warning {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin: -10px 0 24px;
  padding: 14px 16px;
  border: 1px solid #f0d19d;
  border-radius: 8px;
  background: #fffaf1;
  color: #6f4810;
}

.invitation-session-warning small {
  display: block;
  margin-top: 3px;
  color: #806846;
  line-height: 1.45;
}

.invitation-session-warning .secondary {
  white-space: nowrap;
}

.invitation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.realtor-invite-result-actions {
  align-items: stretch;
}

.realtor-invite-result-actions > button {
  min-height: 44px;
}

.danger-text {
  color: #b4232a;
  border-color: #efc4c6;
}

.danger-text:hover {
  background: #fff5f5;
  border-color: #e39a9e;
}

.invitation-aside {
  background: #eef8f4;
  box-shadow: none;
}

.invitation-aside > .round-icon {
  margin-bottom: 18px;
}

.invitation-aside h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.invitation-facts {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.invitation-facts span {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: #25463a;
  font-weight: 700;
}

.invitation-state {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.invitation-state .secondary {
  margin-top: 24px;
}

.mfa-recovery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mfa-recovery-grid code {
  min-width: 0;
  overflow-wrap: anywhere;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 10px 12px;
  background: var(--soft);
  color: var(--ink);
  font: 700 14px/1.3 var(--mono, ui-monospace, monospace);
  text-align: center;
}

@media (max-width: 520px) {
  .mfa-recovery-grid {
    grid-template-columns: 1fr;
  }
}

/* Team leaderboard, dashboard split metrics and persisted notification state. */
.team-summary-controls {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-metric-grid.five,
.metric-grid.metric-grid-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.team-metric.rank {
  border-color: #eadfb8;
  background: #fffdf6;
}

.team-metric-grid.five .team-metric {
  min-height: 176px;
}

.team-metric-grid.five .team-metric > strong,
.metric-grid.metric-grid-five .metric > strong {
  font-size: 22px;
  overflow-wrap: normal;
  white-space: nowrap;
}

.team-metric-grid.five .team-metric > .text-button {
  align-self: end;
  justify-self: start;
  margin-top: auto;
}

.team-loading-skeleton {
  pointer-events: none;
}

.team-loading-skeleton .team-skeleton-intro,
.team-loading-skeleton .team-skeleton-ranking {
  display: grid;
  min-height: 176px;
  gap: 14px;
}

.team-loading-skeleton span,
.team-loading-skeleton strong,
.team-loading-skeleton small,
.team-loading-skeleton i {
  display: block;
  min-height: 16px;
  border-radius: 6px;
  background: #e9f1ed;
  animation: team-skeleton-pulse 1.2s ease-in-out infinite alternate;
}

.team-loading-skeleton .team-skeleton-intro > span:first-child,
.team-loading-skeleton .team-skeleton-ranking > span {
  width: min(260px, 65%);
  min-height: 26px;
}

.team-loading-skeleton .team-skeleton-intro > span:nth-child(2) {
  width: min(540px, 90%);
}

.team-loading-skeleton .team-skeleton-intro > span:last-child {
  width: min(420px, 75%);
  min-height: 44px;
}

.team-loading-skeleton .team-metric {
  align-content: start;
}

.team-loading-skeleton .team-metric strong {
  width: 72%;
  min-height: 28px;
}

.team-loading-skeleton .team-metric small {
  width: 90%;
}

.team-loading-skeleton .team-skeleton-ranking > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.team-loading-skeleton .team-skeleton-ranking i {
  min-height: 136px;
}

@keyframes team-skeleton-pulse {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

.segmented-control {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(112px, auto);
  min-width: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f6f7;
}

.segmented-control button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  padding: 7px 12px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.segmented-control button.active {
  color: #087b42;
  background: #fff;
  box-shadow: 0 1px 4px rgba(22, 44, 35, 0.1);
}

.team-leaderboard-panel {
  min-width: 0;
}

.team-ranking-podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.team-podium-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 202px;
  justify-items: center;
  align-content: start;
  gap: 5px;
  padding: 20px 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.team-podium-card.gold {
  order: 2;
  min-height: 220px;
  border-color: #f4c64e;
  background: #fff8dd;
}

.team-podium-card.silver {
  order: 1;
  border-color: #aeb9c5;
  background: #f4f6f8;
}

.team-podium-card.bronze {
  order: 3;
  border-color: #c7834f;
  background: #fff0e5;
}

.team-podium-card.is-current,
.team-ranking-row.is-current {
  border-color: #7ad7a2;
  background: #effaf4;
}

.team-podium-place {
  position: absolute;
  top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  left: 12px;
  display: grid;
  min-width: 64px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  padding-inline: 8px;
  color: #5c4a12;
  background: #f3dd86;
  font-size: 13px;
  font-weight: 800;
}

.team-podium-place .icon {
  width: 14px;
  height: 14px;
}

.team-podium-card.silver .team-podium-place {
  color: #46515c;
  background: #dbe1e6;
}

.team-podium-card.bronze .team-podium-place {
  color: #72431e;
  background: #eac19c;
}

.team-podium-card .avatar {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

.team-podium-card h3,
.team-podium-card p,
.team-podium-card strong,
.team-podium-card small {
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
}

.team-podium-card h3 {
  font-size: 15px;
  line-height: 1.35;
}

.team-podium-card p,
.team-podium-card small {
  color: var(--muted);
  font-size: 12px;
}

.team-podium-card > strong {
  margin-top: 5px;
  color: var(--text);
  font-size: 21px;
}

.team-podium-card > .text-button {
  margin-top: auto;
}

.team-ranking-list,
.team-ranking-own {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.team-ranking-own {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.team-ranking-own > small {
  color: var(--muted);
  font-weight: 700;
}

.team-ranking-row {
  display: grid;
  grid-template-columns: 72px 38px minmax(180px, 1fr) auto minmax(120px, auto);
  min-width: 0;
  min-height: 64px;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

button.team-ranking-row {
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
}

.team-ranking-place {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.team-ranking-row .avatar {
  width: 38px;
  height: 38px;
  font-size: 12px;
}

.team-ranking-person {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.team-ranking-person strong,
.team-ranking-person small {
  overflow-wrap: anywhere;
}

.team-ranking-person small,
.team-ranking-gap {
  color: var(--muted);
}

.team-ranking-revenue {
  font-size: 16px;
  white-space: nowrap;
}

.team-ranking-gap {
  text-align: right;
}

.team-ranking-more,
.notification-load-more {
  width: 100%;
  margin-top: 14px;
}

.team-ranking-city-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 11px 12px;
  border: 1px solid #d7e4ef;
  border-radius: 8px;
  color: #315c7b;
  background: #f5f9fc;
  font-size: 13px;
}

.team-ranking-city-note > .text-button {
  margin-left: auto;
  white-space: nowrap;
}

.notification-v2 {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.notification-v2-toolbar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-v2-list {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.notification-v2-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 10px 20px;
  min-width: 0;
  min-height: 76px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  font: inherit;
  text-align: left;
}

.notification-v2-row:hover {
  border-color: #abdcc0;
  background: #fbfefc;
}

.notification-v2-row.is-unread {
  border-color: #bfe8cf;
  background: #f4fbf7;
}

.notification-v2-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.notification-v2-copy strong,
.notification-v2-copy small {
  overflow-wrap: anywhere;
}

.notification-v2-copy small,
.notification-v2-copy time {
  color: var(--muted);
  font-size: 12px;
}

.notification-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-2);
}

.notification-count-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.notification-count-grid > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-left: 2px solid #bfe8cf;
}

.notification-count-grid strong {
  font-size: 20px;
}

.notification-count-grid span {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

@media (max-width: 1280px) {
  .team-metric-grid.five,
  .metric-grid.metric-grid-five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-metric-grid.five .team-metric > strong,
  .metric-grid.metric-grid-five .metric > strong {
    font-size: 20px;
  }
}

@media (max-width: 900px) {
  .team-metric-grid.five,
  .metric-grid.metric-grid-five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-ranking-row {
    grid-template-columns: 62px 38px minmax(150px, 1fr) auto;
  }

  .team-ranking-gap {
    display: none;
  }
}

@media (max-width: 767px) {
  #app.mobile-mode .team-summary-controls,
  #app.mobile-mode .team-leaderboard-panel .panel-head,
  #app.mobile-mode .notification-v2-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  #app.mobile-mode .team-summary-controls .team-period-control {
    width: 100%;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    overflow: visible;
  }

  #app.mobile-mode .team-summary-controls .team-period-control .chip {
    min-height: 44px;
    flex: 1 1 120px;
  }

  #app.mobile-mode .team-summary-controls > .icon-button {
    align-self: flex-end;
  }

  #app.mobile-mode .team-metric-grid.five,
  #app.mobile-mode .metric-grid.metric-grid-five {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app.mobile-mode .team-metric-grid.five > .team-metric:last-child {
    grid-column: 1 / -1;
  }

  #app.mobile-mode .team-metric-grid.five .team-metric > strong,
  #app.mobile-mode .metric-grid.metric-grid-five .metric > strong {
    font-size: 18px;
  }

  #app.mobile-mode .team-ranking-podium {
    grid-template-columns: 1fr;
  }

  #app.mobile-mode .team-loading-skeleton .team-skeleton-ranking > div {
    grid-template-columns: 1fr;
  }

  #app.mobile-mode .team-podium-card {
    order: initial;
    min-height: 0;
  }

  #app.mobile-mode .segmented-control {
    width: 100%;
    grid-auto-columns: minmax(0, 1fr);
  }

  #app.mobile-mode .segmented-control button {
    min-height: 44px;
    white-space: normal;
  }

  #app.mobile-mode .team-ranking-row {
    grid-template-columns: 54px 36px minmax(0, 1fr);
    gap: 8px;
  }

  #app.mobile-mode .team-ranking-revenue {
    grid-column: 2 / -1;
    white-space: normal;
  }

  #app.mobile-mode .realtor-team-page .team-table-wrap {
    overflow: visible;
  }

  #app.mobile-mode .realtor-team-page .team-table {
    display: block;
    min-width: 0;
  }

  #app.mobile-mode .realtor-team-page .team-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  #app.mobile-mode .realtor-team-page .team-table tbody,
  #app.mobile-mode .realtor-team-page .team-table tr,
  #app.mobile-mode .realtor-team-page .team-table td {
    display: grid;
    width: 100%;
    min-width: 0;
  }

  #app.mobile-mode .realtor-team-page .team-table tbody {
    gap: 10px;
  }

  #app.mobile-mode .realtor-team-page .team-table tr {
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  #app.mobile-mode .realtor-team-page .team-table td {
    gap: 3px;
    padding: 0;
    border: 0;
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  #app.mobile-mode .realtor-team-page .team-table td:first-child {
    grid-column: 1 / -1;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
  }

  #app.mobile-mode .realtor-team-page .team-table td:nth-child(2)::before { content: "Статус"; }
  #app.mobile-mode .realtor-team-page .team-table td:nth-child(3)::before { content: "Объекты"; }
  #app.mobile-mode .realtor-team-page .team-table td:nth-child(4)::before { content: "Комиссия сервиса"; }
  #app.mobile-mode .realtor-team-page .team-table td:nth-child(5)::before { content: "Комиссия участника"; }
  #app.mobile-mode .realtor-team-page .team-table td:nth-child(6)::before { content: "Ваш бонус"; }
  #app.mobile-mode .realtor-team-page .team-table td:nth-child(7)::before { content: "Активность"; }

  #app.mobile-mode .realtor-team-page .team-table td:nth-child(n + 2):nth-child(-n + 7)::before {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
  }

  #app.mobile-mode .realtor-team-page .team-table .status {
    width: fit-content;
    min-width: 72px;
    overflow-wrap: normal;
    white-space: nowrap;
  }

  #app.mobile-mode .realtor-team-page .team-table td:last-child {
    grid-column: 1 / -1;
    justify-items: end;
  }

  #app.mobile-mode .realtor-team-page .team-table td:last-child .icon-button {
    width: 44px;
    height: 44px;
  }

  #app.mobile-mode .notification-v2-row {
    grid-template-columns: 38px minmax(0, 1fr) 8px;
    min-height: 84px;
    padding: 11px;
  }

  #app.mobile-mode .notification-v2-row > .icon:last-child {
    display: none;
  }

  #app.mobile-mode .notification-count-grid {
    grid-template-columns: 1fr;
  }

  #app.mobile-mode .notification-center-modal {
    width: calc(100vw - 20px);
  }
}

.field-label {
  color: var(--muted);
  font-size: var(--small);
  font-weight: 700;
}

.utility-compact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.utility-inline-note {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}

.utility-line {
  display: grid;
  grid-template-columns: minmax(128px, 1.15fr) minmax(150px, 1.35fr) repeat(3, minmax(76px, 0.68fr)) minmax(108px, 0.9fr) 44px;
  gap: 8px;
  margin-bottom: 8px;
}

.utility-line :is(input, select) {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
}

.utility-remove-row {
  width: 44px;
  min-width: 44px;
  height: 42px;
  min-height: 42px;
  color: #c13a3a;
}

.utility-add-row {
  margin-top: 4px;
}

.utility-lines-head .row {
  flex-wrap: nowrap;
}

.payment-order-items,
.payout-accrual-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.payment-order-item,
.payout-accrual-row {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.payment-order-choice,
.payout-accrual-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
}

.payment-order-choice {
  cursor: pointer;
}

.payment-order-choice > span,
.payout-accrual-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.payment-order-choice > span > span,
.payout-accrual-main {
  min-width: 0;
}

.payment-order-choice small,
.payout-accrual-main small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.payment-order-choice strong,
.payout-accrual-row > strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.payment-order-choice > strong,
.payout-accrual-row > strong:last-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.payment-order-choice input,
.payout-accrual-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.payment-order-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  border-top: 1px solid var(--line);
  padding: 14px 2px 0;
}

.payment-order-total strong {
  white-space: nowrap;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 0;
  padding: 4px 0;
  background: transparent;
  color: var(--green-2);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.inline-link .icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

.payment-order-doc-link,
.utility-document-actions {
  margin: 0 14px 10px 44px;
}

.utility-document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
}

.payout-accrual-field {
  min-width: 0;
}

.payout-accrual-main {
  display: block;
}

.payout-breakdown .payout-accrual-row {
  grid-template-columns: 36px minmax(0, 1fr) auto;
}

.crm-order-item .payment-order-choice {
  cursor: default;
}

.empty-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.listing-grid > .empty {
  grid-column: 1 / -1;
}

.system-state {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f7faf9;
}

.system-state > section {
  width: min(520px, 100%);
  text-align: center;
}

.system-state h1 {
  margin: 18px 0 8px;
  font-size: 32px;
}

.system-state p {
  margin: 0 auto 20px;
  color: var(--muted);
}

.system-state-icon {
  display: inline-grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid #ccebd9;
  border-radius: 18px;
  background: #e9f9f0;
  color: var(--green-2);
}

.system-state-icon .icon {
  width: 28px;
  height: 28px;
}

.system-state-icon [data-lucide="loader-circle"] {
  animation: system-spin 0.9s linear infinite;
}

@keyframes system-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 14px;
    height: auto;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }

  .sidebar > .brand {
    grid-column: 1;
    width: max-content;
    max-width: 100%;
  }

  .sidebar .side-nav {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    width: 100%;
    padding-bottom: 2px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .sidebar .sidebar-section {
    display: none;
  }

  .sidebar .nav-btn {
    flex: 0 0 auto;
    width: auto;
    min-height: 42px;
    padding: 9px 12px;
    white-space: nowrap;
  }

  .sidebar .nav-badge {
    margin-left: 4px;
  }

  .sidebar .user-card {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .sidebar .user-card > .avatar,
  .sidebar .user-card > span {
    display: none;
  }

  .sidebar .user-logout {
    margin: 0;
  }

  .sidebar.dark .user-card {
    background: transparent;
  }
}

@media (max-width: 680px) {
  .primary,
  .secondary {
    min-width: 0;
  }

  .utility-compact-panel {
    grid-template-columns: 1fr;
  }

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

  .utility-line > select,
  .utility-line > input:nth-of-type(1),
  .utility-line > input:nth-of-type(5) {
    grid-column: 1 / -1;
  }

  .utility-remove-row {
    grid-column: 2;
    justify-self: end;
  }

  .utility-lines-head {
    align-items: flex-start;
  }

  .utility-lines-head .row {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .payment-order-choice,
  .payout-accrual-row,
  .payout-breakdown .payout-accrual-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .payment-order-choice > strong,
  .payout-accrual-row > strong:last-child {
    grid-column: 2;
    justify-self: start;
  }

  .payment-order-doc-link,
  .utility-document-actions {
    margin-left: 44px;
  }

  .payment-order-total {
    align-items: flex-start;
  }

}

@media (max-width: 820px) {
  .invitation-main {
    width: min(100% - 24px, 680px);
    grid-template-columns: 1fr;
    padding: 24px 0;
  }

  .invitation-aside {
    order: -1;
  }

  .invitation-header {
    min-height: 72px;
    padding: 12px 16px;
  }
}

@media (max-width: 520px) {
  .invitation-panel,
  .invitation-aside {
    padding: 22px 18px;
  }

  .invitation-heading {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }

  .invitation-role-icon {
    width: 44px;
    height: 44px;
  }

  .invitation-heading h1,
  .invitation-state h1 {
    font-size: 26px;
  }

  .invitation-actions > button,
  .realtor-invite-result-actions > button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .system-state-icon [data-lucide="loader-circle"] {
    animation: none;
  }
}

/* Final launch: invitation-only entry and scoped realtor catalog. */
.login-page,
.catalog-page {
  min-height: 100vh;
  background: #fff;
}

.login-page {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.login-header,
.catalog-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(24px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}

.login-header .brand,
.catalog-header .brand {
  cursor: pointer;
}

.login-main {
  width: min(100% - 40px, 1040px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(260px, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 84px);
  padding: clamp(40px, 8vh, 96px) 0;
}

.login-card {
  min-width: 0;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.login-mark,
.catalog-state-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eafaf1;
  color: var(--green-2);
}

.login-mark .icon,
.catalog-state-icon .icon {
  width: 26px;
  height: 26px;
}

.login-heading {
  margin: 22px 0 28px;
}

.login-heading h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 3vw, 38px);
  line-height: 1.2;
}

.login-heading p,
.login-assurance p {
  margin: 0;
  color: var(--muted);
}

.login-form {
  grid-template-columns: 1fr;
}

.login-submit {
  min-height: 48px;
}

.password-input,
.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  min-width: 0;
}

.password-input input,
.copy-field input {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 0;
  padding-right: 52px;
}

.password-input .icon-button,
.copy-field .icon-button {
  grid-column: 2;
  grid-row: 1;
  z-index: 1;
  justify-self: center;
}

.login-access-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.login-access-note .icon {
  width: 16px;
  height: 16px;
  color: var(--green-2);
}

.login-assurance {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5faf7;
}

.login-assurance > img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
}

.login-assurance > div {
  padding: 24px;
}

.login-assurance h2 {
  max-width: 420px;
  margin: 14px 0 10px;
  font-size: 30px;
  line-height: 1.25;
}

.login-assurance ul {
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 18px;
  list-style: none;
}

.login-assurance li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.login-assurance li > .icon {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 50%;
  color: var(--green-2);
  background: #eafaf1;
}

.login-assurance li span {
  min-width: 0;
}

.login-assurance li strong,
.login-assurance li small,
.catalog-agent strong,
.catalog-agent small,
.catalog-contact strong,
.catalog-contact small {
  display: block;
  overflow-wrap: anywhere;
}

.login-assurance li small,
.catalog-agent small,
.catalog-contact small {
  margin-top: 2px;
  color: var(--muted);
}

.login-footer {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(24px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.catalog-page {
  display: flex;
  flex-direction: column;
}

.catalog-agent,
.catalog-contact {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.catalog-agent > span:last-child,
.catalog-contact > span:nth-child(2) {
  min-width: 0;
}

.catalog-agent .avatar,
.catalog-contact .avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.catalog-main {
  width: min(100% - 40px, 1280px);
  flex: 1;
  margin: 0 auto;
  padding: 46px 0 64px;
}

.catalog-intro {
  max-width: 760px;
}

.catalog-intro h1 {
  margin: 16px 0 12px;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.18;
}

.catalog-intro p {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.catalog-filters {
  margin: 34px 0;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.catalog-filters .field {
  min-width: 0;
}

.catalog-filters .primary {
  min-height: 44px;
  white-space: nowrap;
}

.catalog-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
}

.catalog-summary h2 {
  margin: 0;
  font-size: 24px;
}

.catalog-summary > span {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 14px;
  background: #eafaf1;
  color: #0d9f4d;
  font-size: 13px;
  font-weight: 800;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.catalog-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
}

.catalog-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #edf2f1;
}

.catalog-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.catalog-card-media .status {
  position: absolute;
  top: 12px;
  left: 12px;
}

.catalog-card-body {
  padding: 18px;
}

.catalog-card-body h3 {
  min-height: 48px;
  margin: 8px 0 2px;
  font-size: 18px;
  line-height: 1.35;
}

.catalog-card-body p {
  min-height: 22px;
  margin: 0;
  font-size: 13px;
}

.catalog-price,
.catalog-object-price {
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 850;
}

.catalog-price small,
.catalog-object-price small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.catalog-specs {
  min-height: 42px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 14px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.catalog-state {
  width: min(100% - 40px, 620px);
  min-height: calc(100vh - 88px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 0;
  text-align: center;
}

.catalog-state h1 {
  margin: 22px 0 10px;
  font-size: 32px;
}

.catalog-state p {
  max-width: 520px;
  margin: 0 0 20px;
  color: var(--muted);
}

.catalog-object-modal {
  display: grid;
  gap: 22px;
}

.catalog-object-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.catalog-object-gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  object-fit: cover;
  border-radius: 6px;
  background: #edf2f1;
}

.catalog-object-gallery img:only-child {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 8;
}

.catalog-contact {
  padding: 16px;
  border: 1px solid #d8efe2;
  border-radius: 8px;
  background: #f4fcf7;
}

.catalog-contact .primary {
  margin-left: auto;
  white-space: nowrap;
}

.payout-review-panel {
  margin-top: 20px;
}

.payout-review-panel .table-wrap {
  min-width: 0;
}

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

  .catalog-filters .primary {
    grid-column: 1 / -1;
  }

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

@media (max-width: 820px) {
  .login-main {
    width: min(100% - 32px, 560px);
    grid-template-columns: 1fr;
    padding: 36px 0 48px;
  }

  .login-assurance {
    padding: 8px 12px;
  }

  .catalog-header {
    align-items: flex-start;
  }

  .catalog-agent {
    max-width: 250px;
  }

  .catalog-main {
    width: min(100% - 32px, 720px);
    padding-top: 32px;
  }
}

@media (max-width: 600px) {
  .login-header,
  .catalog-header {
    min-height: 72px;
    padding: 12px 16px;
  }

  .login-header .brand-title small,
  .catalog-header .brand-title small {
    display: none;
  }

  .login-header .brand-mark,
  .catalog-header .brand-mark {
    width: 42px;
    height: 42px;
  }

  .login-header .brand-name,
  .catalog-header .brand-name {
    font-size: 22px;
  }

  .login-card {
    padding: 24px 18px;
  }

  .login-heading h1,
  .catalog-intro h1,
  .catalog-state h1 {
    font-size: 28px;
  }

  .login-assurance h2 {
    font-size: 24px;
  }

  .login-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .catalog-header {
    align-items: center;
  }

  .catalog-agent .avatar {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .catalog-agent strong {
    max-width: 130px;
    font-size: 13px;
  }

  .catalog-agent small {
    display: none;
  }

  .catalog-filters,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .catalog-filters .primary {
    grid-column: auto;
  }

  .catalog-card-body h3,
  .catalog-card-body p,
  .catalog-specs {
    min-height: 0;
  }

  .catalog-object-gallery {
    grid-template-columns: 1fr;
  }

  .catalog-object-gallery img,
  .catalog-object-gallery img:only-child {
    grid-column: auto;
    aspect-ratio: 16 / 10;
  }

  .catalog-contact {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .catalog-contact .primary {
    width: 100%;
    margin-left: 0;
  }
}

.meter-status-card {
  display: grid;
  gap: 16px;
  border-left: 3px solid var(--green);
}

.meter-status-card > .primary,
.meter-status-card > .secondary {
  width: max-content;
  max-width: 100%;
}

.meter-status-title,
.meter-reading-head,
.meter-document-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.meter-status-title > div,
.meter-reading-head > span:nth-child(2),
.meter-document-summary > span:nth-child(2) {
  min-width: 0;
}

.meter-status-title h3,
.meter-reading-head strong,
.meter-document-summary strong {
  margin: 0;
  overflow-wrap: anywhere;
}

.meter-status-title p,
.meter-reading-head small,
.meter-document-summary small {
  display: block;
  margin: 2px 0 0;
}

.meter-document-summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  padding: 14px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.meter-reading-form,
.meter-config-form {
  align-items: start;
}

.meter-reading-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.meter-reading-row {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.meter-reading-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.meter-reading-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

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

.meter-file-field {
  grid-column: span 2;
}

.meter-file-field small {
  min-height: 18px;
  overflow-wrap: anywhere;
}

.meter-add-button {
  width: max-content;
  max-width: 100%;
}

.meter-submit-bar {
  position: sticky;
  bottom: -24px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 -24px -24px;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 22px rgba(16, 24, 40, 0.05);
  backdrop-filter: blur(10px);
}

.meter-reading-fields label,
.meter-config-fields label {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: var(--small);
  font-weight: 700;
}

.meter-reading-fields input,
.meter-reading-fields select,
.meter-config-fields input,
.meter-config-fields select {
  width: 100%;
  min-width: 0;
}

.meter-review-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.meter-review-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(82px, 0.55fr)) 40px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.meter-review-row > span {
  display: grid;
  min-width: 0;
}

.meter-review-row small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.utility-meter-reference,
.crm-meter-detail {
  min-width: 0;
}

.utility-meter-reference .meter-review-list,
.crm-meter-detail .meter-review-list {
  margin-bottom: 0;
}

.crm-meter-detail {
  margin-bottom: 16px;
}

.selected-row > td {
  background: var(--soft);
}

.meter-config-list {
  display: grid;
  gap: 12px;
}

.meter-config-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 40px;
  align-items: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.meter-config-index {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--entity-green-soft);
  color: var(--entity-green-dark);
  font-size: var(--small);
  font-weight: 800;
}

.meter-config-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.meter-config-fields .setting-row {
  min-height: 48px;
  align-self: end;
}

.inspection-wizard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.inspection-wizard-head h3,
.inspection-wizard-head p {
  margin: 4px 0 0;
}

.inspection-steps {
  display: grid;
  grid-template-columns: repeat(7, minmax(88px, 1fr));
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.inspection-step {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 62px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.inspection-step span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--soft);
}

.inspection-step.active {
  border-color: var(--green);
  color: var(--entity-green-dark);
  background: var(--entity-green-soft);
}

.inspection-step.active span {
  color: #fff;
  background: var(--green-2);
}

.inspection-wizard-body {
  min-height: 360px;
  padding: 20px 0;
}

.inspection-step-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.inspection-wizard-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.inspection-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.inspection-media {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.inspection-media span {
  display: grid;
  min-width: 0;
}

.inspection-media strong,
.inspection-media small {
  overflow-wrap: anywhere;
}

.inspection-media small {
  color: var(--muted);
}

.inspection-review {
  display: grid;
  gap: 18px;
}

.inspection-section {
  min-width: 0;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.inspection-section > p {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.inspection-inventory-list,
.inspection-defect-list,
.inspection-version-list {
  display: grid;
  gap: 8px;
}

.inspection-inventory-row,
.inspection-defect-row,
.inspection-version-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.inspection-version-row {
  grid-template-columns: 40px minmax(0, 1fr) auto 20px;
}

.inspection-inventory-row > span,
.inspection-defect-row > span,
.inspection-version-row > span {
  display: grid;
  min-width: 0;
}

.inspection-inventory-row small,
.inspection-defect-row small,
.inspection-version-row small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.hash-short {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspection-hash {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.inspection-hash span {
  display: grid;
  min-width: 0;
}

.inspection-hash code {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspection-revision-form {
  margin: 16px 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.sensitive-payout-card {
  border-left: 3px solid var(--warning);
}

.domain-registers .panel {
  width: 100%;
}

@media (max-width: 1100px) {
  .meter-reading-fields,
  .meter-config-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meter-file-field {
    grid-column: auto;
  }

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

@media (max-width: 700px) {
  .meter-document-summary {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .meter-document-summary > .secondary {
    grid-column: 1 / -1;
    width: 100%;
  }

  .meter-reading-fields,
  .meter-config-fields,
  .inspection-media-grid {
    grid-template-columns: 1fr;
  }

  .meter-submit-bar {
    position: static;
    display: grid;
    margin: 0;
    padding: 14px 0 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .meter-submit-bar button {
    width: 100%;
  }

  .meter-reading-head {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .meter-reading-head > .badge {
    grid-column: 2;
    justify-self: start;
  }

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

  .meter-review-row > span:first-child {
    grid-column: 1 / -1;
  }

  .meter-config-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .meter-config-row > .icon-button {
    grid-column: 2;
    justify-self: end;
  }

  .inspection-wizard-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .inspection-wizard-body {
    min-height: 280px;
  }

  .inspection-wizard-nav {
    grid-template-columns: 1fr 1fr;
  }

  .inspection-wizard-nav .muted {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .inspection-inventory-row,
  .inspection-defect-row,
  .inspection-version-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .inspection-inventory-row > :last-child,
  .inspection-defect-row > :last-child,
  .inspection-version-row > :nth-last-child(2) {
    grid-column: 2;
    justify-self: start;
  }

  .inspection-version-row > svg:last-child {
    display: none;
  }
}

/* Realtor object and tenant wizards */
.modal-panel.realtor-wizard-modal {
  display: flex;
  flex-direction: column;
  width: min(840px, calc(100vw - 40px));
  max-height: min(820px, calc(100svh - 40px));
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
}

.realtor-wizard-modal > .panel-head {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.realtor-wizard-modal > .panel-head h2 {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 24px;
  line-height: 1.25;
}

.realtor-wizard-shell {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.realtor-wizard-stepper {
  position: relative;
  z-index: 2;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: #f7faf9;
}

.wizard-step {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 52px;
  place-items: center;
  gap: 5px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.wizard-step::after {
  position: absolute;
  z-index: 0;
  top: 16px;
  left: calc(50% + 17px);
  width: calc(100% - 34px);
  height: 2px;
  background: #dce6e2;
  content: "";
}

.wizard-step:last-child::after {
  display: none;
}

.wizard-step > span {
  position: relative;
  z-index: 1;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #cbd8d3;
  border-radius: 50%;
  background: #fff;
  color: #687772;
  font-size: 13px;
  font-weight: 700;
}

.wizard-step > span .icon {
  width: 16px;
  height: 16px;
}

.wizard-step small {
  width: 100%;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wizard-step.complete {
  color: #0a9d4c;
}

.wizard-step.complete > span {
  border-color: #22b968;
  background: #e9f8f0;
  color: #079447;
}

.wizard-step.complete::after {
  background: #64ce93;
}

.wizard-step.active {
  color: #17212b;
}

.wizard-step.active > span {
  border-color: #10b95a;
  background: #10b95a;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(16, 185, 90, 0.12);
}

.wizard-step:disabled {
  cursor: default;
  opacity: 0.58;
}

.realtor-wizard-form {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.realtor-wizard-body {
  min-height: 320px;
  padding: 24px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.realtor-wizard-body .form-grid {
  align-items: start;
}

.realtor-wizard-body .field {
  min-width: 0;
}

.realtor-wizard-body .field input,
.realtor-wizard-body .field select,
.realtor-wizard-body .field textarea {
  min-height: 44px;
  max-width: 100%;
}

.realtor-wizard-body .field textarea {
  min-height: 104px;
  resize: vertical;
}

.realtor-wizard-body .field > small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.wizard-section-head {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin-bottom: 22px;
}

.wizard-section-head .round-icon {
  width: 46px;
  height: 46px;
  background: #eaf8f0;
  color: #079b4a;
}

.wizard-section-head h3 {
  margin: 1px 0 4px;
  color: #17212b;
  font-size: 19px;
  line-height: 1.3;
}

.wizard-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.wizard-notice,
.wizard-money-card,
.wizard-object-lock {
  display: grid;
  min-width: 0;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #dbe6e2;
  border-radius: 8px;
  background: #f8fbfa;
}

.wizard-notice > span,
.wizard-money-card > span,
.wizard-object-lock > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.wizard-notice strong,
.wizard-money-card strong,
.wizard-object-lock strong {
  overflow-wrap: anywhere;
  color: #17212b;
  font-size: 14px;
  line-height: 1.35;
}

.wizard-notice small,
.wizard-money-card small,
.wizard-object-lock small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.wizard-notice .icon {
  width: 21px;
  height: 21px;
  justify-self: center;
}

.wizard-notice.success {
  border-color: #ccebd9;
  background: #f0faf4;
  color: #079447;
}

.wizard-notice.warning {
  border-color: #f1d7a8;
  background: #fff9ee;
  color: #d47b00;
}

.wizard-notice.neutral {
  border-color: #d6e4ee;
  background: #f5f9fc;
  color: #2f80ed;
}

.wizard-money-card {
  grid-template-columns: 42px minmax(0, 1fr);
  border-color: #c9ead8;
  background: #f1faf5;
}

.wizard-money-card .round-icon {
  width: 42px;
  height: 42px;
  background: #dff6e9;
  color: #079447;
}

.wizard-money-card strong {
  font-size: 21px;
}

.wizard-object-lock {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  margin-bottom: 16px;
  background: #fff;
}

.wizard-object-lock .round-icon {
  width: 44px;
  height: 44px;
  background: #eef6ff;
  color: #2f80ed;
}

.wizard-upload {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 148px;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 22px;
  border: 1px dashed #7ac99d;
  border-radius: 8px;
  background: #f5fbf7;
  cursor: pointer;
}

.wizard-upload:focus-within {
  border-color: #0aae53;
  box-shadow: 0 0 0 3px rgba(16, 185, 90, 0.12);
}

.wizard-upload .round-icon {
  width: 52px;
  height: 52px;
  background: #dff6e9;
  color: #079447;
}

.wizard-upload > span:not(.round-icon) {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.wizard-upload strong {
  overflow-wrap: anywhere;
  color: #17212b;
  font-size: 16px;
}

.wizard-upload small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.wizard-upload input {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 44px;
  color: #40504a;
  font-size: 13px;
}

.wizard-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.wizard-review-grid > div {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 14px 16px;
  background: #fff;
}

.wizard-review-grid span {
  color: var(--muted);
  font-size: 12px;
}

.wizard-review-grid strong {
  overflow-wrap: anywhere;
  color: #17212b;
  font-size: 14px;
  line-height: 1.4;
}

.wizard-review-grid.compact {
  margin-top: 16px;
}

.realtor-wizard-footer {
  position: relative;
  z-index: 2;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.04);
}

.realtor-wizard-footer button {
  min-height: 44px;
}

.wizard-save-state {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.wizard-save-state .icon {
  width: 16px;
  height: 16px;
  color: #0aa650;
}

@media (max-width: 700px) {
  .modal:has(.realtor-wizard-modal) {
    padding: 8px;
  }

  .modal-panel.realtor-wizard-modal {
    width: 100%;
    max-height: calc(100svh - 16px);
    border-radius: 8px;
  }

  .realtor-wizard-modal > .panel-head {
    padding: 15px 16px;
  }

  .realtor-wizard-modal > .panel-head h2 {
    font-size: 20px;
  }

  .realtor-wizard-stepper {
    padding: 10px 8px 8px;
  }

  .wizard-step {
    min-height: 38px;
    padding: 0 2px;
  }

  .wizard-step > span {
    width: 28px;
    height: 28px;
  }

  .wizard-step::after {
    top: 14px;
    left: calc(50% + 15px);
    width: calc(100% - 30px);
  }

  .wizard-step small {
    display: none;
  }

  .realtor-wizard-body {
    min-height: 0;
    padding: 18px 16px;
  }

  .wizard-section-head {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    margin-bottom: 18px;
  }

  .wizard-section-head .round-icon {
    width: 40px;
    height: 40px;
  }

  .wizard-section-head h3 {
    font-size: 17px;
  }

  .wizard-review-grid {
    grid-template-columns: 1fr;
  }

  .wizard-object-lock {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .wizard-object-lock > .status {
    grid-column: 2;
    justify-self: start;
  }

  .wizard-upload {
    min-height: 130px;
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 18px;
  }

  .wizard-upload .round-icon {
    width: 44px;
    height: 44px;
  }

  .realtor-wizard-footer {
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
    gap: 10px;
    padding: 12px 16px;
  }

  .realtor-wizard-footer .wizard-save-state {
    display: none;
  }

  .realtor-wizard-footer button {
    width: 100%;
    min-width: 0;
    padding-inline: 10px;
    white-space: normal;
  }
}

@media (max-width: 380px) {
  .realtor-wizard-footer {
    grid-template-columns: 1fr;
  }

  .wizard-step > span {
    width: 26px;
    height: 26px;
  }

  .wizard-step::after {
    top: 13px;
  }
}

/* Login page visual reference, July 2026. */
.login-page {
  position: relative;
  isolation: isolate;
  display: block;
  min-height: 100svh;
  overflow: hidden;
  background:
    #fff
    url("/assets/login-background-v2.png")
    center center / cover no-repeat;
}

.login-header {
  position: absolute;
  top: clamp(42px, 9.2vh, 124px);
  left: clamp(44px, 4.8vw, 98px);
  z-index: 3;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.login-header .brand {
  gap: 16px;
}

.login-header .brand-mark {
  width: clamp(70px, 4.8vw, 96px);
  height: clamp(70px, 4.8vw, 96px);
  background: url("/assets/brand-mark-outline.svg") center / contain no-repeat;
}

.login-header .brand-mark::before,
.login-header .brand-mark::after,
.login-header .brand-mark .icon {
  display: none;
}

.login-header .brand-title {
  gap: 5px;
}

.login-header .brand-name {
  color: #15191d;
  font-size: 52px;
  font-weight: 850;
}

.login-header .brand-title small {
  color: #272c2f;
  font-size: 20px;
  font-weight: 500;
}

.login-main {
  position: relative;
  display: block;
  width: 100%;
  min-height: 100svh;
  margin: 0;
  padding: 0;
}

.login-card {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: clamp(430px, 27.6vw, 560px);
  min-width: 0;
  padding: clamp(38px, 3.15vw, 64px);
  transform: translate(-50%, -50%);
  border: 1px solid rgba(210, 220, 217, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 48px rgba(30, 68, 58, 0.13);
  backdrop-filter: blur(10px);
}

.login-mark {
  width: clamp(54px, 3.35vw, 68px);
  height: clamp(54px, 3.35vw, 68px);
  border-radius: 14px;
  background: #eafaf1;
}

.login-mark .icon {
  width: clamp(25px, 1.55vw, 31px);
  height: clamp(25px, 1.55vw, 31px);
  stroke-width: 2.2;
}

.login-heading {
  margin: clamp(24px, 2vw, 38px) 0 clamp(24px, 2vw, 36px);
}

.login-heading h1 {
  margin: 0 0 14px;
  font-size: 34px;
  font-weight: 820;
  line-height: 1.16;
  white-space: nowrap;
}

.login-heading p {
  max-width: 420px;
  color: #717b89;
  font-size: 17px;
  line-height: 1.45;
}

.login-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(17px, 1.35vw, 25px);
  margin-top: 0;
}

.login-form .field {
  gap: 9px;
}

.login-form .field label {
  color: #4f5967;
  font-size: 15px;
  font-weight: 700;
}

.login-input {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  align-items: center;
  min-width: 0;
}

.login-input input,
.password-input.login-input input {
  grid-column: 1 / -1;
  grid-row: 1;
  min-height: clamp(52px, 3.05vw, 62px);
  padding: 12px 52px 12px 54px;
  border-color: #d9e0e4;
  border-radius: 8px;
  color: #272c2f;
  font-size: 16px;
}

.login-form .field:first-child .login-input input {
  border-color: #a9e7c8;
}

.login-field-icon {
  position: absolute;
  left: 17px;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #a2aab3;
  pointer-events: none;
}

.login-field-icon .icon {
  width: 20px;
  height: 20px;
}

.password-input.login-input .icon-button {
  grid-column: 2;
  grid-row: 1;
  z-index: 2;
  justify-self: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #343a40;
}

.login-submit {
  min-height: clamp(54px, 3.15vw, 64px);
  margin-top: 2px;
  border-radius: 8px;
  font-size: 18px;
  box-shadow: 0 12px 26px rgba(21, 194, 112, 0.22);
}

.login-submit .icon {
  width: 21px;
  height: 21px;
}

.login-form > .inline-link {
  justify-self: start;
  min-height: 28px;
  padding: 0;
  font-size: 16px;
}

.login-access-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: clamp(18px, 1.6vw, 30px) 0 0;
  padding-top: clamp(18px, 1.6vw, 28px);
  border-top: 1px solid #e5e9ec;
  color: #7a8491;
  font-size: 15px;
}

.login-access-note .icon {
  width: 23px;
  height: 23px;
}

.login-assurance {
  position: absolute;
  top: 50%;
  left: clamp(50px, 5.45vw, 112px);
  z-index: 2;
  width: min(29vw, 590px);
  overflow: visible;
  transform: translateY(-47%);
  border: 0;
  background: transparent;
}

.login-assurance > .login-assurance-copy {
  padding: 0;
}

.login-assurance h2 {
  max-width: none;
  margin: 0 0 20px;
  color: #202936;
  font-size: 40px;
  font-weight: 820;
  line-height: 1.18;
}

.login-assurance p {
  color: #7a8491;
  font-size: 22px;
  line-height: 1.45;
}

.login-assurance .login-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: clamp(44px, 4.4vw, 76px) 0 0;
  padding: 0;
  list-style: none;
}

.login-benefits li {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 13px;
  min-width: 0;
  padding: 0 14px;
  border-right: 1px solid rgba(219, 226, 226, 0.85);
  color: #687484;
  font-size: 13px;
  line-height: 1.38;
  text-align: center;
}

.login-benefits li:first-child {
  padding-left: 0;
}

.login-benefits li:last-child {
  padding-right: 0;
  border-right: 0;
}

.login-benefit-icon {
  display: grid;
  place-items: center;
  width: clamp(48px, 3.3vw, 66px);
  height: clamp(48px, 3.3vw, 66px);
  border-radius: 50%;
  background: rgba(231, 250, 240, 0.92);
  color: #20c768;
}

.login-benefit-icon .icon {
  width: clamp(25px, 1.7vw, 34px);
  height: clamp(25px, 1.7vw, 34px);
  stroke-width: 2;
}

.login-footer {
  position: absolute;
  right: clamp(44px, 4.6vw, 94px);
  bottom: clamp(22px, 3.2vh, 44px);
  left: clamp(44px, 4.6vw, 94px);
  z-index: 2;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #77818e;
  font-size: 13px;
}

@media (max-width: 1500px) {
  .login-assurance {
    left: 40px;
    width: 320px;
  }

  .login-assurance h2 {
    font-size: 30px;
  }

  .login-assurance p {
    font-size: 17px;
  }

  .login-assurance .login-benefits {
    margin-top: 38px;
  }

  .login-benefits li {
    gap: 10px;
    padding-inline: 7px;
    font-size: 11px;
  }

  .login-benefit-icon {
    width: 46px;
    height: 46px;
  }

  .login-benefit-icon .icon {
    width: 25px;
    height: 25px;
  }
}

@media (max-width: 1180px) {
  .login-assurance {
    display: none;
  }

  .login-card {
    width: min(500px, calc(100% - 48px));
  }
}

@media (max-height: 820px) and (min-width: 821px) {
  .login-header {
    top: 28px;
  }

  .login-header .brand-mark {
    width: 62px;
    height: 62px;
  }

  .login-header .brand-name {
    font-size: 34px;
  }

  .login-header .brand-title small {
    font-size: 14px;
  }

  .login-card {
    padding: 28px 38px;
  }

  .login-mark {
    width: 48px;
    height: 48px;
  }

  .login-heading {
    margin: 18px 0 20px;
  }

  .login-heading h1 {
    font-size: 28px;
    white-space: normal;
  }

  .login-form {
    gap: 14px;
  }

  .login-input input,
  .password-input.login-input input,
  .login-submit {
    min-height: 50px;
  }

  .login-access-note {
    margin-top: 14px;
    padding-top: 14px;
  }

  .login-footer {
    bottom: 18px;
  }
}

@media (max-width: 820px) {
  .login-page {
    min-height: 100svh;
    overflow-y: auto;
    background-position: 66% center;
  }

  .login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: rgba(255, 255, 255, 0.5);
  }

  .login-header {
    position: relative;
    top: auto;
    left: auto;
    min-height: 82px;
    padding: 14px 20px 8px;
  }

  .login-header .brand {
    gap: 10px;
  }

  .login-header .brand-mark {
    width: 52px;
    height: 52px;
  }

  .login-header .brand-name {
    font-size: 28px;
  }

  .login-header .brand-title small {
    display: block;
    font-size: 11px;
  }

  .login-main {
    display: grid;
    place-items: start center;
    min-height: auto;
    padding: 16px 16px 26px;
  }

  .login-card {
    position: relative;
    top: auto;
    left: auto;
    width: min(100%, 480px);
    padding: 28px 22px;
    transform: none;
  }

  .login-mark {
    width: 50px;
    height: 50px;
  }

  .login-heading {
    margin: 20px 0 24px;
  }

  .login-heading h1 {
    font-size: 28px;
    white-space: normal;
  }

  .login-heading p {
    font-size: 14px;
  }

  .login-form {
    gap: 18px;
  }

  .login-input input,
  .password-input.login-input input {
    min-height: 52px;
    font-size: 16px;
  }

  .login-submit {
    min-height: 54px;
    font-size: 17px;
  }

  .login-footer {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    min-height: 50px;
    padding: 10px 20px 20px;
    text-align: center;
  }

  .login-footer span:last-child {
    display: none;
  }
}

@media (max-width: 390px) {
  .login-header {
    padding-inline: 16px;
  }

  .login-header .brand-name {
    font-size: 25px;
  }

  .login-header .brand-title small {
    font-size: 10px;
  }

  .login-main {
    padding-inline: 12px;
  }

  .login-card {
    padding: 24px 18px;
  }

  .login-heading h1 {
    font-size: 25px;
  }
}

@font-face {
  font-family: "Dompotok Inter Mobile";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/assets/fonts/inter-cyrillic-400-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Dompotok Inter Mobile";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/assets/fonts/inter-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Dompotok Inter Mobile";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Dompotok Inter Mobile";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/assets/fonts/inter-cyrillic-500-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Dompotok Inter Mobile";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/assets/fonts/inter-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Dompotok Inter Mobile";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Dompotok Inter Mobile";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/assets/fonts/inter-cyrillic-600-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Dompotok Inter Mobile";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/assets/fonts/inter-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Dompotok Inter Mobile";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Dompotok Inter Mobile";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("/assets/fonts/inter-cyrillic-700-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Dompotok Inter Mobile";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("/assets/fonts/inter-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Dompotok Inter Mobile";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("/assets/fonts/inter-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Dompotok Inter Mobile";
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url("/assets/fonts/inter-cyrillic-800-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Dompotok Inter Mobile";
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url("/assets/fonts/inter-latin-ext-800-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Dompotok Inter Mobile";
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url("/assets/fonts/inter-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Mobile-only application layer. Desktop markup and desktop tokens are unchanged. */
@media (max-width: 767px) {
  html,
  body {
    min-width: 0;
    overflow-x: hidden;
  }
}

#app.mobile-mode {
  --mobile-green: #20c768;
  --mobile-green-dark: #119d52;
  --mobile-green-ink: #08783a;
  --mobile-teal-ink: #007b6c;
  --mobile-text: #17212f;
  --mobile-muted: #5f6b7a;
  --mobile-line: #e3e9ed;
  --mobile-soft: #f7f9fa;
  min-width: 0;
  min-height: 100svh;
  overflow-x: hidden;
  background: #eef2f3;
  font-family: "Dompotok Inter Mobile", Inter, ui-sans-serif, system-ui, sans-serif;
}

#app.mobile-mode .mobile-shell {
  width: 100%;
  max-width: 520px;
  min-height: 100svh;
  margin: 0 auto;
  color: var(--mobile-text);
  background: var(--mobile-soft);
  box-shadow: 0 0 30px rgba(23, 33, 47, 0.05);
}

#app.mobile-preview .mobile-shell {
  width: 390px;
  margin-block: 20px;
  border: 1px solid #dce4e7;
  border-radius: 28px;
  overflow: clip;
  box-shadow: 0 18px 60px rgba(23, 33, 47, 0.16);
}

#app.mobile-mode .mobile-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  min-height: calc(72px + env(safe-area-inset-top));
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  border-bottom: 1px solid rgba(227, 233, 237, 0.88);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

#app.mobile-mode .mobile-topbar .brand {
  width: auto;
  gap: 9px;
  padding: 0;
}

#app.mobile-mode .mobile-topbar .brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  background: url("/assets/brand-mark-outline.svg") center / contain no-repeat;
}

#app.mobile-mode .mobile-topbar .brand-mark::before,
#app.mobile-mode .mobile-topbar .brand-mark::after,
#app.mobile-mode .mobile-topbar .brand-mark .icon {
  display: none;
}

#app.mobile-mode .mobile-topbar .brand-title {
  min-width: 0;
  gap: 0;
}

#app.mobile-mode .mobile-topbar .brand-name {
  color: #17212f !important;
  font-size: 22px;
  line-height: 1.02;
}

#app.mobile-mode .mobile-topbar .brand-title small {
  color: #607080;
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
}

#app.mobile-mode .mobile-notification-button {
  position: relative;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border-color: var(--mobile-line);
  border-radius: 12px;
  background: #fff;
  color: var(--mobile-text);
}

#app.mobile-mode .mobile-notification-button .nav-badge {
  top: -5px;
  right: -4px;
  display: grid;
  min-width: 19px;
  min-height: 19px;
  place-items: center;
  padding: 2px 5px;
  border: 2px solid #fff;
  font-size: 10px;
}

#app.mobile-mode .mobile-workspace {
  min-width: 0;
  padding: 14px 16px calc(88px + env(safe-area-inset-bottom));
}

#app.mobile-mode .mobile-page-heading {
  min-width: 0;
  margin: 2px 0 16px;
}

#app.mobile-mode .mobile-page-heading h1 {
  margin: 0;
  color: var(--mobile-text);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.23;
}

#app.mobile-mode .mobile-shell[data-tab="dashboard"] .mobile-page-heading h1 {
  font-size: 22px;
  line-height: 1.25;
}

#app.mobile-mode .mobile-page-heading p {
  margin: 5px 0 0;
  color: var(--mobile-muted);
  font-size: 13px;
  line-height: 1.46;
}

#app.mobile-mode .mobile-page-search {
  width: 100%;
  margin-top: 12px;
}

#app.mobile-mode .mobile-page-search input {
  min-height: 46px;
  border-radius: 12px;
}

#app.mobile-mode .mobile-bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 50%;
  z-index: 50;
  display: flex;
  width: min(100%, 520px);
  min-height: calc(66px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  align-items: stretch;
  justify-content: stretch;
  padding: 5px 6px env(safe-area-inset-bottom);
  border-top: 1px solid var(--mobile-line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -8px 24px rgba(23, 33, 47, 0.06);
  backdrop-filter: blur(18px);
}

#app.mobile-preview .mobile-bottom-nav {
  width: 390px;
  bottom: 20px;
  border-radius: 0 0 28px 28px;
}

#app.mobile-mode .mobile-nav-item {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 58px;
  flex: 1 1 0;
  place-content: center;
  justify-items: center;
  gap: 2px;
  border: 0;
  border-radius: 10px;
  padding: 5px 2px;
  background: transparent;
  color: #596574;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.15;
}

#app.mobile-mode .mobile-nav-item .icon {
  width: 22px;
  height: 22px;
}

#app.mobile-mode .mobile-nav-item.active {
  color: var(--mobile-green-ink);
}

#app.mobile-mode .mobile-nav-item.active .icon {
  stroke-width: 2.5;
}

#app.mobile-mode .mobile-nav-item .nav-badge {
  position: absolute;
  top: 1px;
  left: calc(50% + 7px);
  min-width: 17px;
  min-height: 17px;
  margin: 0;
  padding: 2px 4px;
  border: 2px solid #fff;
  font-size: 9px;
}

#app.mobile-mode .content-grid,
#app.mobile-mode .admin-grid,
#app.mobile-mode .crm-support-grid,
#app.mobile-mode .crm-detail,
#app.mobile-mode .payment-focus,
#app.mobile-mode .emergency-panel,
#app.mobile-mode .aid-hero {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
}

#app.mobile-mode .stack,
#app.mobile-mode .side-stack,
#app.mobile-mode .list {
  min-width: 0;
  gap: 10px;
}

#app.mobile-mode .side-stack {
  display: grid;
  grid-template-columns: 1fr;
}

#app.mobile-mode .realtor-dashboard .realtor-dashboard-objects,
#app.mobile-mode .realtor-dashboard .realtor-dashboard-context,
#app.mobile-mode .realtor-dashboard .realtor-dashboard-upcoming {
  display: none;
}

#app.mobile-mode .realtor-quick-panel {
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding-block: 12px;
}

#app.mobile-mode .realtor-dashboard > .side-stack {
  width: 100%;
  align-self: stretch;
}

#app.mobile-mode .realtor-quick-panel > h3 {
  padding: 2px 2px 8px;
}

#app.mobile-mode .realtor-quick-panel > :is(.text-button, .quick-action) {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--mobile-line);
  border-radius: 0;
  padding: 10px 2px;
  background: transparent;
  box-shadow: none;
  color: var(--mobile-text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

#app.mobile-mode .realtor-quick-panel > :is(.text-button, .quick-action):last-child {
  border-bottom: 0;
}

#app.mobile-mode .realtor-quick-panel > :is(.text-button, .quick-action):hover {
  transform: none;
}

#app.mobile-mode .realtor-quick-panel > :is(.text-button, .quick-action) > .icon {
  width: 20px;
  min-width: 20px;
  height: 20px;
  color: var(--mobile-green-dark);
}

#app.mobile-mode .panel,
#app.mobile-mode .side-card,
#app.mobile-mode .table-card,
#app.mobile-mode .card,
#app.mobile-mode .ticket-card,
#app.mobile-mode .settings-card,
#app.mobile-mode .method-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--mobile-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(23, 33, 47, 0.06);
}

#app.mobile-mode .panel .panel,
#app.mobile-mode .panel .card,
#app.mobile-mode .side-card .card {
  box-shadow: none;
}

#app.mobile-mode .panel-head {
  min-width: 0;
  align-items: flex-start;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

#app.mobile-mode .panel-head > :first-child {
  min-width: 0;
}

#app.mobile-mode .panel-head h2,
#app.mobile-mode .panel-head h3,
#app.mobile-mode .panel h3,
#app.mobile-mode .side-card h3,
#app.mobile-mode .table-card h3,
#app.mobile-mode .card h3,
#app.mobile-mode .ticket-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

#app.mobile-mode .panel-head p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

#app.mobile-mode .panel-head > .row {
  width: 100%;
  flex: 1 1 100%;
  justify-content: flex-start;
}

#app.mobile-mode .panel-head > .row > .primary,
#app.mobile-mode .panel-head > .row > .secondary {
  flex: 1 1 140px;
}

#app.mobile-mode .panel-head .text-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 5px 0;
  font-size: 12px;
  white-space: nowrap;
}

#app.mobile-mode .primary,
#app.mobile-mode .secondary {
  width: auto;
  min-width: 0;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

#app.mobile-mode .primary {
  background: linear-gradient(135deg, var(--mobile-green-ink), var(--mobile-teal-ink));
  box-shadow: 0 10px 24px rgba(8, 120, 58, 0.2);
}

#app.mobile-mode .status,
#app.mobile-mode .badge {
  min-width: 0;
  max-width: 100%;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.3;
  text-align: center;
  white-space: normal;
}

#app.mobile-mode .primary.full,
#app.mobile-mode .secondary.full,
#app.mobile-mode .form-grid > .primary,
#app.mobile-mode .form-grid > .secondary {
  width: 100%;
}

#app.mobile-mode .text-button,
#app.mobile-mode .inline-link {
  min-height: 40px;
  color: var(--mobile-green-ink);
  font-size: 13px;
}

#app.mobile-mode .icon-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  border-radius: 12px;
}

#app.mobile-mode .metric-grid,
#app.mobile-mode .admin-metrics,
#app.mobile-mode .crm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px;
}

#app.mobile-mode .metric,
#app.mobile-mode .crm-kpi {
  min-width: 0;
  min-height: 144px;
  padding: 14px;
  border: 1px solid var(--mobile-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(23, 33, 47, 0.05);
}

#app.mobile-mode .metric > span:first-child,
#app.mobile-mode .crm-kpi > span:first-child {
  display: block;
  max-width: calc(100% - 34px);
  color: var(--mobile-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

#app.mobile-mode .metric strong,
#app.mobile-mode .crm-kpi strong {
  margin-top: 8px;
  padding: 0;
  color: var(--mobile-text);
  font-size: 24px;
  line-height: 1.18;
  white-space: nowrap;
}

#app.mobile-mode .admin-metrics .metric strong,
#app.mobile-mode .crm-kpi strong {
  font-size: 20px;
}

#app.mobile-mode .metric small,
#app.mobile-mode .crm-kpi small {
  margin-top: 5px;
  color: var(--mobile-muted);
  font-size: 11px;
  line-height: 1.35;
}

#app.mobile-mode .metric .round-icon,
#app.mobile-mode .crm-kpi .round-icon {
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
}

#app.mobile-mode .metric .primary,
#app.mobile-mode .metric .text-button {
  min-height: 34px;
  margin-top: 8px;
  padding: 6px 9px;
  border-radius: 9px;
  gap: 3px;
  font-size: 10px;
  white-space: nowrap;
}

#app.mobile-mode .metric .text-button .icon {
  width: 14px;
  height: 14px;
}

#app.mobile-mode .two-col,
#app.mobile-mode .three-col,
#app.mobile-mode .tenant-card-grid,
#app.mobile-mode .settings-grid,
#app.mobile-mode .profile-grid,
#app.mobile-mode .detail-grid,
#app.mobile-mode .method-grid,
#app.mobile-mode .contact-grid,
#app.mobile-mode .service-grid,
#app.mobile-mode .rule-grid,
#app.mobile-mode .feature-row,
#app.mobile-mode .ticket-grid,
#app.mobile-mode .quick-grid,
#app.mobile-mode .state-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

#app.mobile-mode .metric-grid + .panel,
#app.mobile-mode .metric-grid + section {
  margin-top: 0;
}

#app.mobile-mode .tabs,
#app.mobile-mode .chips,
#app.mobile-mode .crm-filter-bar {
  display: flex;
  width: calc(100% + 28px);
  margin-inline: -14px;
  padding-inline: 14px;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}

#app.mobile-mode .tabs::-webkit-scrollbar,
#app.mobile-mode .chips::-webkit-scrollbar,
#app.mobile-mode .crm-filter-bar::-webkit-scrollbar {
  display: none;
}

#app.mobile-mode .tab,
#app.mobile-mode .chip,
#app.mobile-mode .crm-filter-bar > * {
  width: auto;
  min-width: max-content;
  flex: 0 0 auto;
}

#app.mobile-mode .tab,
#app.mobile-mode .chip {
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 12px;
}

#app.mobile-mode .tab.active,
#app.mobile-mode .chip.active {
  border-color: var(--mobile-green);
  background: #f0fbf5;
  color: var(--mobile-green-ink);
  box-shadow: none;
}

#app.mobile-mode .status:is(.paid, .active, .success, .signed, .resolved, .confirmed, .new, .closed-aid, .read, .acknowledged, .closed, .approved, .registered, .published),
#app.mobile-mode .badge.success,
#app.mobile-mode .success-text {
  color: var(--mobile-green-ink);
}

#app.mobile-mode .status:is(.pending, .matched, .waiting, .transfer, .work, .forming, .sent, .payout, .invited, .opened, .requested, .scheduled, .escalated, .kyc) {
  color: #125cb3;
}

#app.mobile-mode .status:is(.warning, .searching, .attention, .hold, .processing, .pending_review, .manual_review, .partial, .requires-action, .moderation, .collection),
#app.mobile-mode .badge.warning,
#app.mobile-mode .warning-text {
  color: #8a4800;
}

#app.mobile-mode .status:is(.overdue, .danger, .cancelled, .canceled, .rejected, .failed, .disputed, .reversed, .expired, .error),
#app.mobile-mode .badge.danger,
#app.mobile-mode .danger-text {
  color: #b91c1c;
}

#app.mobile-mode .compact-select {
  min-height: 40px;
  max-width: 164px;
  border-radius: 10px;
  font-size: 12px;
}

#app.mobile-mode .object-cell {
  display: grid;
  min-width: 0;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

#app.mobile-mode .object-cell .thumb,
#app.mobile-mode .thumb {
  width: 72px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
}

#app.mobile-mode .object-cell strong,
#app.mobile-mode .object-cell small {
  overflow-wrap: anywhere;
}

#app.mobile-mode .owner-dashboard-properties {
  padding-bottom: 6px;
}

#app.mobile-mode .owner-dashboard-properties .panel-head {
  align-items: center;
  flex-wrap: nowrap;
}

#app.mobile-mode .owner-dashboard-properties .panel-head > .row {
  width: auto;
  flex: 0 1 auto;
  justify-content: flex-end;
}

#app.mobile-mode .owner-dashboard-properties .panel-head .secondary {
  display: none;
}

#app.mobile-mode .owner-dashboard-properties .compact-select {
  max-width: 128px;
  min-height: 36px;
  border: 0;
  padding-block: 4px;
  background-color: transparent;
  color: var(--mobile-muted);
  font-weight: 600;
}

#app.mobile-mode .owner-dashboard-properties .tabs {
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 2px;
  overflow: hidden;
}

#app.mobile-mode .owner-dashboard-properties .tabs .chip {
  min-width: 0;
  padding: 7px 7px;
  font-size: 10px;
}

#app.mobile-mode .owner-dashboard-properties .list {
  gap: 0;
}

#app.mobile-mode .owner-dashboard-properties .list-row {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 98px;
  grid-template-columns: 112px minmax(0, 1fr) 18px;
  grid-template-rows: auto auto auto;
  align-items: center;
  gap: 2px 12px;
  border: 0;
  border-bottom: 1px solid var(--mobile-line);
  border-radius: 0;
  padding: 11px 0;
  background: transparent;
  color: var(--mobile-text);
  text-align: left;
}

#app.mobile-mode .owner-dashboard-properties .list-row:last-child {
  border-bottom: 0;
}

#app.mobile-mode .owner-dashboard-properties .object-cell {
  display: contents;
}

#app.mobile-mode .owner-dashboard-properties .object-cell .thumb {
  width: 112px;
  height: 82px;
  grid-column: 1;
  grid-row: 1 / 4;
  border-radius: 12px;
}

#app.mobile-mode .owner-dashboard-properties .object-cell > span {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
}

#app.mobile-mode .owner-dashboard-properties .object-cell strong {
  font-size: 14px;
  line-height: 1.3;
}

#app.mobile-mode .owner-dashboard-properties .object-cell small {
  font-size: 11px;
  line-height: 1.35;
}

#app.mobile-mode .owner-dashboard-properties .list-row > span:nth-child(2) {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
  color: var(--mobile-text);
  font-size: 11px;
  line-height: 1.3;
}

#app.mobile-mode .owner-dashboard-properties .list-row > span:nth-child(2) strong {
  font-size: 12px;
}

#app.mobile-mode .owner-dashboard-properties .list-row > span:nth-child(3) {
  display: none;
}

#app.mobile-mode .owner-dashboard-properties .list-row > span:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  padding: 2px 7px !important;
  border: 0;
  border-radius: 999px;
  background: #e8f8ef;
  color: var(--mobile-green-dark);
  box-shadow: none;
  font-size: 0;
}

#app.mobile-mode .owner-dashboard-properties .list-row > span:nth-child(4) strong {
  font-size: 11px;
  font-weight: 700;
}

#app.mobile-mode .owner-dashboard-properties .list-row::after {
  grid-column: 3;
  grid-row: 1 / 4;
  align-self: center;
  color: #778392;
  content: "›";
  font-size: 28px;
  font-weight: 400;
}

#app.mobile-mode .list-row,
#app.mobile-mode .payment-row,
#app.mobile-mode .doc-row,
#app.mobile-mode .reminder-row,
#app.mobile-mode .ticket-row,
#app.mobile-mode .tenant-doc-row,
#app.mobile-mode .notification-item,
#app.mobile-mode .crm-audit-row,
#app.mobile-mode .crm-check-row {
  min-width: 0;
  border-color: var(--mobile-line);
}

#app.mobile-mode .tickets-block .list-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid var(--mobile-line);
}

#app.mobile-mode .tickets-block .list-row:last-child {
  border-bottom: 0;
}

#app.mobile-mode .tickets-block .round-icon {
  width: 34px;
  height: 34px;
}

#app.mobile-mode .tickets-block .list-row > span:last-child:not(.status) {
  display: none;
}

#app.mobile-mode .tickets-block small {
  font-size: 11px;
  line-height: 1.35;
}

#app.mobile-mode .reminder-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 9px;
  padding: 10px 0;
  font-size: 12px;
}

#app.mobile-mode .reminder-row .icon {
  color: var(--mobile-green);
}

#app.mobile-mode .reminder-row > span:last-child {
  color: var(--mobile-text);
  text-align: right;
  white-space: nowrap;
}

#app.mobile-mode .payment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
}

#app.mobile-mode .doc-row,
#app.mobile-mode .notification-item,
#app.mobile-mode .crm-audit-row,
#app.mobile-mode .crm-check-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
}

#app.mobile-mode .doc-row > :nth-child(n + 4),
#app.mobile-mode .notification-item > :nth-child(n + 4),
#app.mobile-mode .crm-audit-row > :nth-child(n + 4) {
  grid-column: 2 / -1;
  justify-self: start;
}

#app.mobile-mode .ticket-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid var(--mobile-line);
  border-radius: 0;
  background: transparent;
  text-align: left;
}

#app.mobile-mode .ticket-row > :nth-child(n + 4) {
  grid-column: 2 / -1;
  justify-self: start;
}

#app.mobile-mode .ticket-row .round-icon {
  width: 36px;
  height: 36px;
}

#app.mobile-mode .owner-dashboard .payments-side .list {
  display: none;
}

#app.mobile-mode .owner-dashboard .payments-side-total {
  margin-top: 0 !important;
  padding-top: 2px;
}

#app.mobile-mode .owner-dashboard .docs-side .doc-row:nth-of-type(n + 3) {
  display: none;
}

#app.mobile-mode .tenant-alert {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #d8eee1;
  border-radius: 14px;
  font-size: 12px;
}

#app.mobile-mode .tenant-hero,
#app.mobile-mode .tenant-hero.compact,
#app.mobile-mode .lease-card,
#app.mobile-mode .profile-hero {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--mobile-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 24px rgba(23, 33, 47, 0.06);
}

#app.mobile-mode .tenant-hero img {
  width: 100%;
  height: 190px;
  border-radius: 12px;
  object-fit: cover;
}

#app.mobile-mode .tenant-hero h2 {
  font-size: 20px;
}

#app.mobile-mode .tenant-hero .row,
#app.mobile-mode .lease-card .row {
  width: 100%;
}

#app.mobile-mode .tenant-hero .row > .primary,
#app.mobile-mode .tenant-hero .row > .secondary {
  flex: 1 1 180px;
}

#app.mobile-mode .payment-timeline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

#app.mobile-mode .payment-step {
  min-height: 54px;
}

#app.mobile-mode .amount-large,
#app.mobile-mode .price,
#app.mobile-mode .payments-owner-table strong {
  max-width: 100%;
  font-size: 28px;
  line-height: 1.2;
  white-space: nowrap;
}

#app.mobile-mode .table-wrap {
  width: 100%;
  min-width: 0;
  overflow: visible;
}

#app.mobile-mode .table-wrap > table {
  display: block;
  width: 100%;
  min-width: 0 !important;
  border: 0;
}

#app.mobile-mode .table-wrap thead {
  display: none;
}

#app.mobile-mode .table-wrap tbody {
  display: grid;
  width: 100%;
  gap: 10px;
}

#app.mobile-mode .table-wrap tr {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 0;
  padding: 11px 13px;
  border: 1px solid var(--mobile-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(23, 33, 47, 0.04);
}

#app.mobile-mode .table-wrap td {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(90px, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 10px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid #edf1f3;
  overflow-wrap: anywhere;
  text-align: right;
}

#app.mobile-mode .table-wrap td:last-child {
  border-bottom: 0;
}

#app.mobile-mode .table-wrap td::before {
  color: var(--mobile-muted);
  content: attr(data-label);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
  text-align: left;
}

#app.mobile-mode .table-wrap td[colspan] {
  display: block;
  text-align: left;
}

#app.mobile-mode .table-wrap td[colspan]::before {
  display: none;
}

#app.mobile-mode .table-wrap td .object-cell,
#app.mobile-mode .table-wrap td .row,
#app.mobile-mode .table-wrap td .crm-actions {
  justify-self: end;
  text-align: left;
}

#app.mobile-mode .table-wrap td .object-cell {
  grid-template-columns: 54px minmax(0, 1fr);
}

#app.mobile-mode .table-wrap td .object-cell .thumb {
  width: 54px;
  height: 46px;
}

#app.mobile-mode .table-wrap td .primary,
#app.mobile-mode .table-wrap td .secondary {
  justify-self: end;
}

#app.mobile-mode .crm-control-panel .panel-head,
#app.mobile-mode .crm-table-footer,
#app.mobile-mode .inspection-wizard-head {
  align-items: stretch;
  flex-direction: column;
}

#app.mobile-mode .crm-control-panel .panel-head .row,
#app.mobile-mode .crm-table-footer {
  width: 100%;
}

#app.mobile-mode .form-grid,
#app.mobile-mode .meter-reading-fields,
#app.mobile-mode .meter-config-fields,
#app.mobile-mode .inspection-media-grid,
#app.mobile-mode .wizard-review-grid {
  grid-template-columns: 1fr;
}

#app.mobile-mode .field,
#app.mobile-mode .field input,
#app.mobile-mode .field select,
#app.mobile-mode .field textarea {
  min-width: 0;
  max-width: 100%;
}

#app.mobile-mode .field input,
#app.mobile-mode .field select {
  min-height: 46px;
  border-radius: 10px;
}

#app.mobile-mode .field textarea {
  min-height: 112px;
  border-radius: 10px;
}

#app.mobile-mode .search,
#app.mobile-mode .crm-inline-search {
  width: 100%;
  min-width: 100%;
}

#app.mobile-mode .footer,
#app.mobile-mode .app-top,
#app.mobile-mode .sidebar {
  display: none;
}

#app.mobile-mode .empty {
  padding: 24px 14px;
  border-radius: 12px;
  font-size: 14px;
}

#app.mobile-mode .mobile-profile-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid var(--mobile-line);
  border-radius: 14px;
  background: #f7faf9;
}

#app.mobile-mode .mobile-profile-card .avatar {
  width: 48px;
  height: 48px;
}

#app.mobile-mode .mobile-profile-card > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

#app.mobile-mode .mobile-profile-card strong,
#app.mobile-mode .mobile-profile-card small {
  overflow-wrap: anywhere;
}

#app.mobile-mode .mobile-profile-card small {
  color: var(--mobile-muted);
}

#app.mobile-mode .mobile-profile-sections {
  margin-top: 12px;
}

#app.mobile-mode .mobile-secondary-nav {
  display: grid;
  gap: 2px;
}

#app.mobile-mode .mobile-secondary-link {
  display: grid;
  min-width: 0;
  min-height: 52px;
  grid-template-columns: 24px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--mobile-line);
  padding: 7px 2px;
  background: transparent;
  color: var(--mobile-text);
  text-align: left;
}

#app.mobile-mode .mobile-secondary-link.active {
  color: var(--mobile-green-ink);
}

#app.mobile-mode .mobile-secondary-link .nav-badge {
  margin: 0;
}

#app.mobile-mode .mobile-logout {
  width: 100%;
  margin-top: 16px;
}

#app.mobile-mode .modal {
  place-items: end center;
  padding: 0;
}

#app.mobile-mode .modal-panel {
  width: min(100%, 520px);
  max-width: 520px;
  max-height: min(94dvh, 860px);
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: 20px 20px 0 0;
  overflow-x: hidden;
  overflow-y: auto;
}

#app.mobile-preview .modal-panel {
  width: 390px;
}

#app.mobile-mode .modal-panel > .panel-head {
  position: sticky;
  top: -16px;
  z-index: 4;
  align-items: center;
  margin: -16px -16px 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--mobile-line);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
}

#app.mobile-mode .modal-panel > .panel-head h2 {
  font-size: 21px;
}

#app.mobile-mode .modal-panel > .panel-head .icon-button {
  margin-left: auto;
}

#app.mobile-mode .modal-panel:has(.form-grid > :nth-child(4)) {
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
}

#app.mobile-mode .modal-panel .form-grid > .row.full:last-child {
  position: sticky;
  bottom: -16px;
  z-index: 3;
  margin: 6px -16px -16px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--mobile-line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 -8px 20px rgba(23, 33, 47, 0.05);
  backdrop-filter: blur(14px);
}

#app.mobile-mode .modal-panel .form-grid > .row.full:last-child > button {
  flex: 1 1 150px;
}

#app.mobile-mode .modal-panel.entity-modal,
#app.mobile-mode .modal-panel.realtor-wizard-modal {
  width: min(100%, 520px);
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
}

#app.mobile-mode .realtor-wizard-footer {
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

#app.mobile-mode :is(h1, h2, h3, p, strong, small, span, button, td) {
  letter-spacing: 0;
}

#app.mobile-mode img {
  max-width: 100%;
}

#app.mobile-mode :is(.panel, .side-card, .card, .metric, .list-row, .payment-row, .doc-row, .ticket-row, .table-wrap, td, th) {
  max-width: 100%;
}

@media (max-width: 359px) {
  #app.mobile-mode .mobile-workspace {
    padding-inline: 12px;
  }

  #app.mobile-mode .mobile-topbar {
    padding-inline: 12px;
  }

  #app.mobile-mode .mobile-page-heading h1 {
    font-size: 24px;
  }

  #app.mobile-mode .metric,
  #app.mobile-mode .crm-kpi {
    min-height: 138px;
    padding: 12px;
  }

  #app.mobile-mode .metric strong,
  #app.mobile-mode .crm-kpi strong {
    font-size: 19px;
  }

  #app.mobile-mode .admin-metrics .metric strong,
  #app.mobile-mode .crm-kpi strong {
    font-size: 18px;
  }

  #app.mobile-mode .owner-dashboard-properties .list-row {
    grid-template-columns: 96px minmax(0, 1fr) 14px;
    gap: 2px 9px;
  }

  #app.mobile-mode .owner-dashboard-properties .object-cell .thumb {
    width: 96px;
    height: 76px;
  }

  #app.mobile-mode .mobile-nav-item {
    font-size: 9px;
  }
}

/* Realtor team and CRM team ranking. */
.realtor-team-mobile-entry {
  display: none;
}

.confirmation-modal {
  display: grid;
  gap: 14px;
}

.confirmation-modal h3,
.confirmation-modal p {
  margin: 0;
}

.confirmation-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  color: #a86405;
  background: #fff4df;
}

.confirmation-icon.danger {
  color: #b4232a;
  background: #fff0f1;
}

.team-page {
  min-width: 0;
}

.team-page > .system-state {
  min-height: 420px;
}

.team-intro-panel {
  overflow: hidden;
}

.team-link-box {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid #ccebd9;
  border-radius: 8px;
  background: #f5fbf8;
}

.team-link-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.team-link-copy strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

.team-link-copy small {
  color: var(--muted);
}

.team-rule-note {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #dfe8e4;
  border-radius: 8px;
  background: #fafcfb;
  color: #40524b;
  font-size: 13px;
  line-height: 1.5;
}

.team-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.team-metric {
  display: grid;
  min-width: 0;
  min-height: 136px;
  align-content: start;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.team-metric > span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.team-metric > span .icon {
  color: var(--green-2);
}

.team-metric strong {
  min-width: 0;
  color: var(--text);
  font-size: 25px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.team-metric small {
  color: var(--muted);
}

.team-metric.accent {
  border-color: #bfe8cf;
  background: #f2fbf6;
}

.team-metric-grid.compact {
  margin-bottom: 16px;
}

.team-metric-grid.compact .team-metric {
  min-height: 104px;
  padding: 14px;
}

.team-filters {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.team-period-control {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.team-custom-period {
  display: flex;
  gap: 8px;
}

.team-custom-period label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.team-custom-period input {
  min-height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 7px 9px;
  background: #fff;
}

.team-search {
  width: min(310px, 100%);
  margin-left: auto;
}

.crm-team-filters .team-search {
  margin-left: 0;
}

.team-table {
  min-width: 1080px;
}

.team-table th,
.team-table td {
  padding: 13px 14px;
}

.team-table td {
  font-size: 14px;
}

.team-table-footer,
.team-pagination {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.team-table-footer {
  min-height: 46px;
  padding-top: 12px;
}

.team-rank {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #eef2f4;
  color: #53606d;
  font-weight: 800;
}

.team-rank.top {
  background: #e8f9ef;
  color: #119d52;
}

.team-payout-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 16px;
  align-items: center;
}

.team-payout-breakdown > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.team-payout-breakdown > div > span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.team-payout-breakdown strong {
  font-size: 22px;
  line-height: 1.25;
}

.team-payout-breakdown small {
  color: var(--muted);
}

.team-member-modal,
.crm-team-detail {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.crm-team-link-actions {
  margin-left: auto;
}

.team-finance-history {
  display: grid;
}

.team-registration-page .invitation-main {
  max-width: 1180px;
}

.team-registration-heading h1 {
  max-width: 620px;
}

@media (max-width: 1180px) {
  .app-top {
    grid-template-columns: 1fr;
  }

  .top-tools {
    justify-content: flex-start;
  }

  .top-tools .search {
    width: min(100%, 420px);
    flex: 1 1 320px;
  }

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

  .team-search {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 767px) {
  #app.mobile-mode .realtor-team-mobile-entry {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    gap: 12px;
    width: 100%;
    min-height: 70px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #ccebd9;
    border-radius: 8px;
    color: var(--mobile-text);
    background: #f2fbf6;
    font: inherit;
    text-align: left;
  }

  #app.mobile-mode .realtor-team-mobile-entry > span:nth-child(2) {
    display: grid;
    min-width: 0;
    gap: 3px;
  }

  #app.mobile-mode .realtor-team-mobile-entry strong,
  #app.mobile-mode .realtor-team-mobile-entry small {
    overflow-wrap: anywhere;
  }

  #app.mobile-mode .realtor-team-mobile-entry small {
    color: var(--mobile-muted);
  }

  #app.mobile-mode .realtor-team-mobile-entry > .icon:last-child {
    color: var(--mobile-green-dark);
  }

  #app.mobile-mode .team-page {
    display: grid;
    gap: 12px;
  }

  #app.mobile-mode .team-page > .system-state {
    min-height: 420px;
  }

  #app.mobile-mode .team-intro-panel .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  #app.mobile-mode .team-intro-panel .panel-head > button {
    width: 100%;
  }

  #app.mobile-mode .team-link-box {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 13px;
  }

  #app.mobile-mode .team-link-box > .row {
    grid-column: 1 / -1;
    width: 100%;
  }

  #app.mobile-mode .team-link-box > .row .secondary,
  #app.mobile-mode .team-link-box > .row .primary {
    min-width: 0;
    flex: 1 1 auto;
  }

  #app.mobile-mode .team-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  #app.mobile-mode .team-metric {
    min-height: 126px;
    padding: 13px;
  }

  #app.mobile-mode .team-metric strong {
    font-size: 20px;
  }

  #app.mobile-mode .team-metric .text-button,
  #app.mobile-mode .team-podium-card .text-button,
  #app.mobile-mode .team-ranking-city-note .text-button {
    min-height: 44px;
  }

  #app.mobile-mode .team-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #app.mobile-mode .team-period-control {
    width: calc(100% + 32px);
    margin-inline: -16px;
    padding-inline: 16px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  #app.mobile-mode .team-period-control::-webkit-scrollbar {
    display: none;
  }

  #app.mobile-mode .team-period-control .chip {
    flex: 0 0 auto;
  }

  #app.mobile-mode .team-custom-period {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app.mobile-mode .team-custom-period label {
    display: grid;
  }

  #app.mobile-mode .team-custom-period input,
  #app.mobile-mode .team-filters .compact-select,
  #app.mobile-mode .team-search {
    width: 100%;
    max-width: none;
  }

  #app.mobile-mode .team-table-wrap {
    margin-inline: 0;
  }

  #app.mobile-mode .team-table-footer,
  #app.mobile-mode .team-pagination {
    width: 100%;
  }

  #app.mobile-mode .team-payout-breakdown {
    grid-template-columns: 1fr 1fr;
  }

  #app.mobile-mode .team-payout-breakdown > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  #app.mobile-mode .crm-team-table td:last-child .secondary {
    width: 100%;
  }

  #app.mobile-mode .team-member-modal .team-rule-note,
  #app.mobile-mode .crm-team-detail .team-rule-note {
    margin-top: 0;
  }

  #app.mobile-mode .crm-team-link-actions {
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .team-registration-page .invitation-aside {
    order: 0;
  }

  .team-registration-page .invitation-main {
    gap: 12px;
  }

  .team-registration-page .invitation-actions > button {
    width: 100%;
  }

  .team-registration-page .invitation-session-warning {
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: start;
  }

  .team-registration-page .invitation-session-warning > button {
    grid-column: 1 / -1;
    width: 100%;
  }

  #app.mobile-mode .team-metric-grid.compact,
  #app.mobile-mode .team-payout-breakdown {
    grid-template-columns: 1fr;
  }

  #app.mobile-mode .team-payout-breakdown > button {
    grid-column: auto;
  }
}
