:root {
  --navy: #041b3f;
  --navy-2: #073069;
  --blue: #1458d4;
  --cyan: #33c1dd;
  --green: #15a56f;
  --gold: #b88a3b;
  --gold-soft: #f7f1e6;
  --orange: #f19a2a;
  --red: #e64b45;
  --ink: #14213d;
  --muted: #63708a;
  --line: #e4e9f2;
  --surface: #ffffff;
  --soft: #f3f6fb;
  --shadow: 0 18px 45px rgba(10, 30, 68, 0.13);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f9fd;
}

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

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

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

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

.svg-sprite {
  height: 0;
  position: absolute;
  width: 0;
}

svg {
  height: 1em;
  width: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.site-header {
  align-items: center;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 10px 28px rgba(4, 27, 63, 0.14);
  color: var(--navy);
  display: grid;
  gap: 22px;
  grid-template-columns: auto 1fr auto;
  left: 0;
  padding: 16px clamp(18px, 4vw, 56px);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}

.brand {
  align-items: center;
  display: inline-flex;
  gap: 11px;
  min-width: max-content;
  text-transform: uppercase;
}

.brand-emblem {
  flex: 0 0 auto;
  height: 44px;
  object-fit: contain;
  width: 44px;
}

.brand strong {
  display: block;
  font-size: 15px;
  letter-spacing: 0;
  line-height: 1.1;
}

.brand small {
  color: rgba(255, 255, 255, 0.68);
  display: block;
  font-size: 9px;
  letter-spacing: 0.12em;
  margin-top: 3px;
}

.site-header .brand strong {
  color: var(--navy);
}

.site-header .brand small {
  color: #68738a;
}

.brand-mark {
  align-items: center;
  background: var(--gold-soft);
  border: 1px solid rgba(184, 138, 59, 0.45);
  border-radius: 8px;
  color: #94691f;
  display: inline-flex;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.brand-mark.alt {
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffd178;
}

.main-nav {
  align-items: center;
  display: flex;
  gap: clamp(14px, 2vw, 36px);
  justify-content: center;
}

.main-nav a {
  color: #34415a;
  font-size: 13px;
  font-weight: 700;
}

.main-nav a:hover,
.nav-login:hover {
  color: #94691f;
}

.nav-login {
  background: transparent;
  border: 0;
  color: #34415a;
  cursor: pointer;
  display: none;
  font-size: 13px;
  font-weight: 700;
  padding: 0;
}

.broker-link,
.primary-btn,
.ghost-btn,
.icon-button {
  align-items: center;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.broker-link {
  background: var(--navy);
  border: 1px solid var(--navy);
  color: #fff;
  padding: 0 18px;
}

.primary-btn {
  background: var(--navy);
  color: #fff;
  padding: 0 20px;
}

.primary-btn:hover,
.ghost-btn:hover,
.broker-link:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary-btn.green {
  background: var(--green);
  box-shadow: 0 12px 24px rgba(21, 165, 111, 0.25);
}

.ghost-btn {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
  padding: 0 18px;
}

.nav-toggle {
  background: transparent;
  border: 0;
  color: var(--navy);
  display: none;
  font-size: 23px;
  justify-self: end;
}

.hero {
  min-height: 540px;
  overflow: hidden;
  position: relative;
}

.hero > img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(3, 17, 43, 0.92) 0%, rgba(5, 32, 78, 0.64) 45%, rgba(5, 32, 78, 0.2) 100%);
  inset: 0;
  position: absolute;
}

.hero-content {
  color: #fff;
  margin: 0 auto;
  max-width: 1500px;
  padding: 124px clamp(18px, 4vw, 56px) 60px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  color: #9de7ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--blue);
}

.hero h1 {
  font-size: clamp(42px, 5.5vw, 76px);
  line-height: 0.98;
  margin: 0;
  max-width: 700px;
}

.hero h1.hero-brand {
  margin-bottom: 26px;
  max-width: 690px;
}

.hero-brand img {
  height: auto;
  width: 100%;
}

.hero-content > p:not(.eyebrow) {
  font-size: clamp(17px, 1.8vw, 24px);
  margin: 20px 0 0;
  max-width: 700px;
}

.search-card {
  margin-top: 34px;
  max-width: 1130px;
}

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

.mode-tabs button {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  min-width: 116px;
  padding: 16px 24px;
}

.mode-tabs button.active {
  background: #fff;
  color: var(--navy);
}

.search-grid {
  align-items: end;
  background: #fff;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  padding: 20px;
}

label {
  color: var(--ink);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 8px;
  line-height: 1.3;
}

.checkbox-line {
  align-items: center;
  display: flex;
  gap: 10px;
}

.checkbox-line input {
  min-height: auto;
  width: auto;
}

select,
input,
textarea {
  background: #fff;
  border: 1px solid #d7e0ec;
  border-radius: 7px;
  color: var(--ink);
  min-height: 42px;
  outline: none;
  padding: 0 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  width: 100%;
}

input::placeholder,
textarea::placeholder {
  color: #8a98ad;
}

textarea {
  min-height: 92px;
  padding-top: 12px;
  resize: vertical;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20, 88, 212, 0.12);
  background: #fff;
}

.trust-strip {
  background: #fff;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 28px clamp(18px, 4vw, 56px);
}

.trust-strip article {
  align-items: flex-start;
  display: flex;
  gap: 14px;
}

.trust-strip article.service-highlight {
  border-left: 3px solid var(--green);
  padding-left: 14px;
}

.trust-strip article.service-highlight .soft-icon {
  background: #e5f7ef;
  border-color: #bcebd6;
  color: #087657;
}

.soft-icon,
.line-icon {
  align-items: center;
  background: #eaf3ff;
  border: 1px solid #cfe3ff;
  border-radius: 50%;
  color: var(--blue);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 15px;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.trust-strip h3 {
  font-size: 14px;
  margin: 0 0 7px;
}

.trust-strip p,
.section-heading p,
.broker-topbar p,
.final-cta p,
.owner-cta p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.section {
  margin: 0 auto;
  max-width: 1500px;
  padding: 52px clamp(18px, 4vw, 56px);
}

.section-heading,
.broker-topbar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading h2,
.broker-topbar h2,
.owner-cta h2,
.final-cta h2 {
  color: var(--ink);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.1;
  margin: 0 0 8px;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.quick-filters button {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  padding: 10px 15px;
}

.quick-filters button.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

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

.catalog-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.catalog-toolbar .quick-filters { margin: 0; }
.catalog-code-search { display: grid; font-size: 12px; font-weight: 700; gap: 6px; min-width: 220px; }
.catalog-code-search input { background: #fff; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); min-height: 40px; padding: 8px 12px; width: 100%; }
.inventory-filters { border-bottom: 1px solid var(--line); display: grid; gap: 14px; grid-template-columns: minmax(180px, 1.3fr) minmax(180px, 1.2fr) 1fr 1fr; margin: 20px 0 12px; padding-bottom: 18px; }
.inventory-filters label { display: grid; font-size: 12px; font-weight: 700; gap: 6px; min-width: 0; }
.inventory-filters input, .inventory-filters select { background: #fff; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); min-height: 40px; min-width: 0; padding: 8px 10px; width: 100%; }
.inventory-count { color: var(--muted); font-size: 12px; margin: 0 0 16px; }
.property-owner-label { color: #536174; font-size: 12px; margin: 0 0 12px; overflow-wrap: anywhere; }
.property-owner-label .link-button { font-size: inherit; padding: 0; text-align: left; }
.property-code { font-variant-numeric: tabular-nums; }
.property-card .price { font-size: 20px; overflow-wrap: anywhere; }
.restricted-field { border-left: 3px solid #b88a3b; }
.owner-property-options { display: grid; margin-top: 12px; max-height: 300px; overflow-y: auto; }
.owner-property-option { align-items: start; background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--line) !important; border-radius: 0 !important; display: flex !important; gap: 10px; padding: 12px 4px !important; }
.owner-property-option[hidden] { display: none !important; }
.owner-property-option input { flex: 0 0 auto; height: 18px; margin: 2px 0; min-height: 0; padding: 0; width: 18px; }
.owner-property-option span { min-width: 0; overflow-wrap: anywhere; }
.owner-property-option strong, .owner-property-option small { display: block; }
.owner-property-option small { color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 5px; }
.owner-property-option.unavailable { opacity: .65; }

@media (max-width: 1000px) {
  .inventory-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .catalog-code-search { flex: 1 1 100%; min-width: 0; }
  .inventory-filters { grid-template-columns: minmax(0, 1fr); }
}

.property-card,
.dashboard-card,
.panel-box,
.table-wrap,
.metric-card {
  background: #fff;
  border: 1px solid rgba(202, 213, 229, 0.75);
  border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(10, 30, 68, 0.08);
}

.property-card {
  overflow: hidden;
}

.property-skeleton {
  min-height: 390px;
}

.property-skeleton-media {
  aspect-ratio: 4 / 3;
  background: #e9eef5;
}

.property-skeleton-line {
  background: #e9eef5;
  border-radius: 4px;
  display: block;
  height: 12px;
  margin-bottom: 12px;
  width: 82%;
}

.property-skeleton-line.short {
  height: 20px;
  width: 30%;
}

.property-skeleton-line.title {
  height: 22px;
  width: 68%;
}

.property-skeleton-line.price {
  height: 24px;
  margin-top: 22px;
  width: 45%;
}

.property-media {
  aspect-ratio: 4 / 3;
  background: #f0f3f6;
  position: relative;
}

.property-media img {
  display: block;
  height: 100%;
  object-fit: contain;
  position: absolute;
  inset: 0;
  width: 100%;
}

.gallery-media {
  overflow: hidden;
}

.gallery-arrow {
  align-items: center;
  background: rgba(4, 27, 63, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 26px;
  height: 36px;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  z-index: 2;
}

.gallery-arrow.left {
  left: 10px;
}

.gallery-arrow.right {
  right: 10px;
}

.gallery-arrow.large {
  font-size: 34px;
  height: 46px;
  width: 46px;
}

.photo-counter {
  background: rgba(4, 27, 63, 0.78);
  border-radius: 999px;
  bottom: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  position: absolute;
  right: 12px;
  z-index: 2;
}

.photo-counter.large {
  bottom: 92px;
}

.tag {
  background: var(--blue);
  border-radius: 6px;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  left: 14px;
  padding: 7px 9px;
  position: absolute;
  text-transform: uppercase;
  top: 14px;
}

.tag.orange {
  background: var(--orange);
}

.tag.green {
  background: var(--green);
}

.property-body {
  padding: 18px;
}

.property-body h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.location {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 12px;
}

.facts {
  color: #30415f;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  font-weight: 800;
  gap: 10px;
  margin-bottom: 16px;
}

.price {
  color: var(--navy);
  display: block;
  font-size: 22px;
  font-weight: 950;
  margin-bottom: 2px;
}

.property-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto;
  margin-top: 16px;
}

.property-actions .ghost-btn,
.property-actions .primary-btn {
  min-height: 38px;
}

.deal-mode {
  background: #e7f0ff;
  border-radius: 999px;
  color: var(--blue);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
  padding: 6px 10px;
  text-transform: uppercase;
}

.owner-cta,
.final-cta {
  align-items: center;
  background: linear-gradient(135deg, var(--navy), #063370 58%, #0b234f);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin: 0 clamp(18px, 4vw, 56px) 38px;
  padding: 24px clamp(22px, 4vw, 42px);
}

.owner-lead-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(140px, 1fr)) auto;
  max-width: 720px;
}

.owner-lead-form input,
.owner-lead-form select {
  background: rgba(255, 255, 255, 0.94);
}

.notice-box {
  background: #eef5ff;
  border: 1px solid #cfe3ff;
  border-radius: var(--radius);
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 12px;
}

.notice-box span {
  color: var(--muted);
  font-size: 13px;
}

.link-button {
  background: transparent;
  border: 0;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0;
  text-align: left;
}

.owner-cta > div,
.final-cta > div {
  align-items: center;
  display: flex;
  gap: 18px;
}

.owner-cta h2,
.final-cta h2 {
  color: #fff;
  font-size: clamp(21px, 2.4vw, 30px);
}

.owner-cta p,
.final-cta p {
  color: rgba(255, 255, 255, 0.78);
}

.line-icon {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #88f0ff;
}

.broker-area {
  display: grid;
  gap: 22px;
  grid-template-columns: 232px minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1500px;
  padding: 12px clamp(18px, 4vw, 56px) 28px;
}

.broker-sidebar {
  align-self: start;
  background: linear-gradient(180deg, #061d43, #062a59);
  border-radius: var(--radius);
  color: #fff;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 108px);
  max-height: 680px;
  min-height: 520px;
  overflow: hidden;
  padding: 20px 14px;
  position: sticky;
  top: 88px;
}

.panel-brand {
  margin: 0 6px 22px;
}

.panel-nav {
  display: grid;
  flex: 1 1 auto;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
  scrollbar-width: thin;
}

.panel-nav button,
.logout-btn {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  display: flex;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  text-align: left;
  width: 100%;
}

.panel-nav button.active,
.panel-nav button:hover {
  background: rgba(63, 134, 255, 0.34);
  color: #fff;
}

.logout-btn {
  color: rgba(255, 255, 255, 0.74);
  flex: 0 0 auto;
  font-weight: 800;
  margin-top: 12px;
  position: static;
}

.broker-content {
  min-width: 0;
}

.broker-topbar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(10, 30, 68, 0.08);
  margin-bottom: 18px;
  padding: 22px;
}

.today-pill {
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: inline-flex;
  gap: 9px;
  min-height: 42px;
  padding: 0 14px;
  white-space: nowrap;
}

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

.metric-card {
  color: #fff;
  min-height: 112px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.metric-card::after {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
  height: 120px;
  position: absolute;
  right: -44px;
  top: -44px;
  width: 120px;
}

.metric-card.blue {
  background: linear-gradient(135deg, #092b63, #1458d4);
}

.metric-card.green {
  background: linear-gradient(135deg, #0e7d5d, #20be75);
}

.metric-card.purple {
  background: linear-gradient(135deg, #4b2387, #6c3fd3);
}

.metric-card.orange {
  background: linear-gradient(135deg, #d67815, #ff9e32);
}

.metric-card span {
  display: block;
  font-size: 13px;
  font-weight: 800;
  opacity: 0.88;
}

.metric-card strong {
  display: block;
  font-size: 32px;
  line-height: 1.1;
  margin: 7px 0;
}

.metric-card small {
  opacity: 0.88;
}

.dashboard-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
}

.panel-box {
  padding: 20px;
}

.panel-box h3,
.dashboard-card h3,
.table-wrap h3 {
  margin: 0 0 14px;
}

.chart-card {
  min-height: 278px;
}

.sales-chart {
  height: 210px;
  width: 100%;
}

.chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.2;
}

.chart-line.orange-line {
  stroke: var(--orange);
}

.chart-dot {
  fill: #fff;
  stroke: var(--blue);
  stroke-width: 2;
}

.chart-dot.orange-line {
  stroke: var(--orange);
}

.chart-grid {
  stroke: #e7edf5;
  stroke-width: 1;
}

.chart-legend {
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 16px;
  margin-bottom: 6px;
}

.chart-legend span::before {
  border-radius: 999px;
  content: "";
  display: inline-block;
  height: 8px;
  margin-right: 6px;
  width: 18px;
}

.chart-legend .sales::before {
  background: var(--blue);
}

.chart-legend .commission::before {
  background: var(--orange);
}

.donut-row {
  align-items: center;
  display: grid;
  gap: 22px;
  grid-template-columns: 160px 1fr;
}

.donut {
  align-items: center;
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  position: relative;
}

.donut::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  inset: 32px;
  position: absolute;
  z-index: 0;
}

.donut-total {
  align-items: center;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  position: relative;
  z-index: 1;
}

.donut-total strong {
  font-size: 25px;
}

.donut-total small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

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

.donut-list span {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 9px;
  justify-content: space-between;
}

.color-dot {
  border-radius: 50%;
  display: inline-block;
  height: 10px;
  width: 10px;
}

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

.activity-item {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 42px 1fr auto;
  padding-bottom: 12px;
}

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

.activity-item strong {
  display: block;
  font-size: 13px;
}

.activity-item span,
.activity-item small {
  color: var(--muted);
  font-size: 12px;
}

.avatar {
  align-items: center;
  background: #eaf3ff;
  border-radius: 50%;
  color: var(--blue);
  display: inline-flex;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  overflow: hidden;
  width: 38px;
}

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

.table-toolbar {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, auto)) auto auto;
  margin-bottom: 14px;
}

.status-legend {
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
  padding: 12px;
}

.status-legend span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.status-legend .status {
  margin-right: 6px;
  min-width: auto;
  padding: 5px 9px;
}

.table-wrap {
  overflow: hidden;
  padding: 16px;
}

.registry-panel {
  padding: 18px;
}

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

.registry-card {
  align-items: center;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(250px, 1.1fr) minmax(360px, 1.3fr) auto;
  padding: 14px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.registry-card:hover {
  border-color: #bfd0e8;
  box-shadow: 0 14px 28px rgba(10, 30, 68, 0.08);
  transform: translateY(-1px);
}

.registry-main {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.registry-avatar {
  align-items: center;
  background: linear-gradient(135deg, #eaf2ff, #f6f9ff);
  border: 1px solid #cfe0fa;
  border-radius: 8px;
  color: var(--blue);
  display: inline-flex;
  flex: 0 0 46px;
  font-weight: 900;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.registry-main h3 {
  color: var(--navy);
  font-size: 18px;
  margin: 5px 0 3px;
}

.registry-main p {
  color: var(--muted);
  margin: 0;
}

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

.summary-tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  min-height: 72px;
  padding: 10px;
}

.summary-tile > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-tile strong {
  color: var(--navy);
}

.summary-tile small {
  color: var(--muted);
  display: block;
  line-height: 1.35;
}

.registry-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 220px;
}

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

.rental-heading .eyebrow {
  margin: 0 0 4px;
}

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

.rental-overview article {
  background: #fff;
  border: 1px solid #e5dfd2;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 14px;
}

.rental-overview span,
.rental-overview small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.rental-overview strong {
  color: var(--navy);
  font-size: 21px;
}

.rental-report-toolbar {
  align-items: stretch;
  background: #f8f5ef;
  border: 1px solid #e7dcc8;
  border-radius: 8px;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin-bottom: 14px;
  padding: 14px;
}

.rental-report-intro span,
.rental-report-toolbar label {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 4px;
}

.rental-report-filters {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(150px, .85fr) minmax(150px, .9fr) minmax(175px, 1.1fr) minmax(175px, 1.1fr) auto;
}

.rental-report-filters input,
.rental-report-filters select {
  background: #fff;
  margin-top: 5px;
  width: 100%;
}

.rental-report-filters .primary-btn {
  min-height: 44px;
  white-space: nowrap;
}

.deal-mode.rental-active {
  background: #e8eef8;
  color: #174b89;
}

.deal-mode.rental-ended {
  background: #fff1e8;
  color: #9a4b20;
}

.rental-list-bar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 4px 0 14px;
  padding: 2px 0 12px;
}

.rental-list-bar > div:first-child {
  display: grid;
  gap: 3px;
}

.rental-list-bar > div:first-child strong {
  color: var(--navy);
  font-size: 15px;
}

.rental-list-bar > div:first-child span {
  color: var(--muted);
  font-size: 12px;
}

.rental-list-tabs {
  background: #edf2f8;
  border: 1px solid #d8e1ed;
  border-radius: 8px;
  display: inline-grid;
  flex: 0 0 auto;
  gap: 3px;
  grid-template-columns: repeat(2, auto);
  padding: 3px;
}

.rental-list-tabs button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #506078;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 7px;
  min-height: 36px;
  padding: 8px 12px;
}

.rental-list-tabs button span {
  align-items: center;
  background: #dce5f0;
  border-radius: 999px;
  display: inline-flex;
  font-size: 10px;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 6px;
}

.rental-list-tabs button.active {
  background: var(--navy);
  box-shadow: 0 5px 12px rgba(4, 27, 63, 0.16);
  color: #fff;
}

.rental-list-tabs button.active span {
  background: rgba(255, 255, 255, 0.18);
}

.registry-card.rental-archived {
  background: #fbfbfa;
  border-left: 4px solid var(--gold);
}

.registry-card.rental-archived .registry-avatar {
  background: var(--gold-soft);
  border-color: #e6d5b4;
  color: #805c1f;
}

.rental-finish-btn {
  border-color: #d8b97d;
  color: #805c1f;
}

.rental-close-dialog {
  display: grid;
  gap: 18px;
}

.rental-close-dialog > p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.rental-close-summary {
  background: var(--gold-soft);
  border: 1px solid #e5d3af;
  border-left: 5px solid var(--gold);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 14px;
}

.rental-close-summary span,
.rental-close-summary small {
  color: #72592e;
}

.rental-close-summary span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.rental-close-summary strong {
  color: var(--navy);
  font-size: 17px;
}

.rental-close-fields {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1.45fr);
}

.rental-close-fields .full {
  grid-column: auto;
}

.whatsapp-panel {
  display: grid;
  gap: 18px;
}

.whatsapp-heading {
  align-items: flex-start;
}

.integration-status {
  border: 1px solid;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  padding: 8px 12px;
  white-space: nowrap;
}

.integration-status.online {
  background: #e5f7ef;
  border-color: #b9e7d2;
  color: #087657;
}

.integration-status.offline {
  background: #fff5e8;
  border-color: #f1d5ad;
  color: #a45b08;
}

.whatsapp-loading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: center;
  min-height: 220px;
}

.whatsapp-error {
  align-items: center;
  display: grid;
  gap: 18px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 180px;
  padding: 24px;
}

.whatsapp-error h2,
.whatsapp-error p {
  margin: 0 0 7px;
}

.whatsapp-error p,
.whatsapp-error small {
  color: var(--muted);
}

.whatsapp-error-icon {
  align-items: center;
  background: #fff2e2;
  border: 1px solid #f1d0a4;
  border-radius: 50%;
  color: #a45b08;
  display: inline-flex;
  font-size: 22px;
  font-weight: 900;
  height: 48px;
  justify-content: center;
  width: 48px;
}

@media (max-width: 720px) {
  .whatsapp-error {
    align-items: start;
    grid-template-columns: auto 1fr;
  }

  .whatsapp-error .primary-btn {
    grid-column: 1 / -1;
    justify-self: stretch;
  }
}

.loading-spinner {
  animation: spin 0.8s linear infinite;
  border: 3px solid #dfe5ee;
  border-radius: 50%;
  border-top-color: var(--navy);
  height: 28px;
  width: 28px;
}

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

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

.whatsapp-setup-item {
  align-items: flex-start;
  border: 1px solid var(--line);
  border-top: 3px solid #d0d7e3;
  display: flex;
  gap: 10px;
  min-height: 110px;
  padding: 13px;
}

.whatsapp-setup-item.ready {
  border-top-color: var(--green);
}

.whatsapp-setup-item.pending {
  border-top-color: var(--orange);
}

.whatsapp-check {
  align-items: center;
  background: #f1f4f8;
  border-radius: 50%;
  color: var(--navy);
  display: inline-flex;
  flex: 0 0 28px;
  font-size: 13px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
}

.whatsapp-setup-item.ready .whatsapp-check {
  background: #e5f7ef;
  color: #087657;
}

.whatsapp-setup-item.pending .whatsapp-check {
  background: #fff3df;
  color: #a45b08;
}

.whatsapp-setup-item strong,
.whatsapp-setup-item p {
  display: block;
  margin: 0;
}

.whatsapp-setup-item p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 6px;
}

.whatsapp-config-card {
  background: #f7f8fb;
  border-block: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.whatsapp-config-card > div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
}

.whatsapp-config-card > div + div {
  border-left: 1px solid var(--line);
}

.whatsapp-config-card span,
.whatsapp-config-card small {
  color: var(--muted);
  font-size: 11px;
}

.whatsapp-config-card strong {
  color: var(--navy);
  overflow-wrap: anywhere;
}

.whatsapp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.whatsapp-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.whatsapp-template-preview {
  background: var(--gold-soft);
  border-left: 5px solid var(--gold);
  padding: 14px 16px;
}

.whatsapp-template-preview span {
  color: #8a6425;
  font-size: 10px;
  font-weight: 900;
}

.whatsapp-template-preview p {
  line-height: 1.55;
  margin: 7px 0 0;
}

.whatsapp-history {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.whatsapp-history h3,
.whatsapp-history p {
  margin: 0;
}

.whatsapp-history p {
  color: var(--muted);
  margin-top: 4px;
}

.whatsapp-history .table-scroll {
  margin-top: 10px;
}

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

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

th,
td {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  padding: 14px 10px;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #1c2b46;
  font-size: 12px;
  text-transform: uppercase;
}

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

.status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  justify-content: center;
  min-width: 74px;
  padding: 7px 10px;
}

.status.hot,
.status.recusada,
.status.cancelada,
.status.vencido,
.status.encerrado {
  background: #ffe4e2;
  color: #c8322d;
}

.status.warm,
.status.em-andamento,
.status.negociacao {
  background: #fff0df;
  color: #c8690d;
}

.status.cold,
.status.novo,
.status.agendada {
  background: #e7f0ff;
  color: #1e5bb8;
}

.status.done,
.status.ativo,
.status.alugado,
.status.disponivel,
.status.aprovada,
.status.vendido,
.status.concluida {
  background: #dff8ed;
  color: #0b8b5d;
}

.status.bloqueado {
  background: #ffe4e2;
  color: #c8322d;
}

.row-actions {
  display: flex;
  gap: 7px;
}

.icon-button {
  background: #f2f6fb;
  border: 1px solid var(--line);
  color: var(--navy);
  font-size: 15px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  width: 36px;
}

.icon-button.danger {
  background: #fff0f0;
  color: var(--red);
}

.icon-button.success {
  background: #e7f8ef;
  color: var(--green);
}

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

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

.admin-property {
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.admin-property > img,
.admin-property .property-media {
  aspect-ratio: 4 / 3;
  object-fit: contain;
  width: 100%;
}

.admin-property .property-body {
  padding: 0 16px 16px;
}

.empty-state {
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  color: var(--muted);
  margin: 0;
  padding: 22px;
  text-align: center;
}

.hidden {
  display: none !important;
}

.modal {
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(4, 18, 42, 0.35);
  max-width: min(980px, calc(100vw - 28px));
  padding: 0;
  width: 100%;
}

.modal::backdrop {
  background: rgba(4, 18, 42, 0.56);
}

.modal-box {
  margin: 0;
}

.modal-header {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 20px;
}

.modal-header h2 {
  margin: 0;
}

.modal-body {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 68vh;
  overflow: auto;
  padding: 22px;
}

.modal-body label {
  background: #f8fafd;
  border: 1px solid #e4ebf5;
  border-radius: 8px;
  padding: 10px;
}

.modal-body .full {
  grid-column: 1 / -1;
}

.form-section,
.rental-party-manager {
  border-top: 1px solid #dce5ef;
  padding-top: 16px;
}

.form-section-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.form-section-heading h3 {
  color: var(--navy);
  font-size: 18px;
  margin: 0;
}

.form-section-heading p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 4px 0 0;
}

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

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

.rental-party-group {
  min-width: 0;
}

.rental-party-group-head,
.rental-party-card-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.rental-party-group-head {
  margin-bottom: 10px;
}

.rental-party-group-head span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 3px;
}

.rental-party-list {
  display: grid;
  gap: 10px;
}

.rental-party-card {
  border: 1px solid #d8e5e1;
  border-radius: 8px;
  padding: 12px;
}

.rental-party-card-head {
  color: #075f4c;
  margin-bottom: 10px;
}

.rental-party-fields {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rental-party-fields .party-name {
  grid-column: 1 / -1;
}

.rental-party-fields .party-source {
  background: #eef5ff;
  border: 1px solid #bdd0ed;
  grid-column: 1 / -1;
}

.rental-party-fields .party-source small {
  color: #52657f;
  display: block;
  font-size: 11px;
  line-height: 1.45;
  margin-top: 6px;
}

.rental-party-fields label {
  padding: 8px;
}

.party-signature-choice,
.administrator-signature-toggle {
  align-items: center;
  background: #edf4ff !important;
  border: 1px solid #bdd0ed !important;
  cursor: pointer;
  display: flex !important;
  gap: 10px !important;
}

.party-signature-choice {
  grid-column: 1 / -1;
}

.party-signature-choice input,
.administrator-signature-toggle input {
  accent-color: var(--navy);
  flex: 0 0 18px;
  height: 18px;
  margin: 0;
  width: 18px;
}

.party-signature-choice span,
.administrator-signature-toggle span {
  display: grid;
  gap: 2px;
}

.party-signature-choice strong,
.administrator-signature-toggle strong {
  color: var(--navy);
  font-size: 12px;
}

.party-signature-choice small,
.administrator-signature-toggle small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.additional-signature-group {
  border-top: 1px solid #dce5ef;
  margin-top: 18px;
  padding-top: 16px;
}

.additional-signature-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.additional-signature-card {
  border-color: #cfdaeb;
}

.empty-signatures {
  background: #f7f9fc;
  border: 1px dashed #b8c6d9;
  border-radius: 8px;
  color: var(--muted);
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px;
  text-align: center;
}

.administrator-signature-toggle {
  margin-top: 14px;
  padding: 12px !important;
}

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

.rental-party-detail-group h4 {
  color: #075f4c;
  margin: 0 0 8px;
}

.rental-party-detail-group article {
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 7px;
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  padding: 10px;
}

.rental-party-detail-group article span {
  color: var(--muted);
  font-size: 12px;
}

.rental-party-detail-group article .signature-decision {
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  margin-top: 4px;
  padding: 4px 6px;
  width: fit-content;
}

.signature-decision.included {
  background: #e7f6ef;
  color: #087050 !important;
}

.signature-decision.excluded {
  background: #f1f3f6;
  color: #667085 !important;
}

.administrator-signature-status {
  background: #f7f9fc;
  border-left: 4px solid var(--gold);
  color: var(--muted);
  margin: 12px 0 0;
  padding: 10px 12px;
}

.modal-actions {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 20px;
}

.detail-view {
  display: grid;
  gap: 14px;
}

.detail-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.detail-section h3 {
  color: var(--navy);
  font-size: 17px;
  margin: 0;
}

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

.detail-field {
  background: #f8fafd;
  border: 1px solid #e2eaf5;
  border-radius: 8px;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
}

.detail-field.wide {
  grid-column: 1 / -1;
}

.detail-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-field strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

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

.linked-item {
  background: #f8fafd;
  border: 1px solid #e2eaf5;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.4fr);
  padding: 12px;
}

.linked-item > div:first-child strong,
.linked-meta small {
  display: block;
}

.linked-item > div:first-child span {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

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

.linked-meta > span {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
}

.linked-meta small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.attachment-detail {
  background: #eef5ff;
  border: 1px solid #cfe0fa;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 12px;
}

.attachment-detail h3 {
  color: var(--navy);
  font-size: 16px;
  margin: 0;
}

.attachment-detail-item {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px;
}

.attachment-detail-item span,
.attachment-detail-item small {
  display: block;
}

.attachment-detail-item small {
  color: var(--muted);
}

.attachment-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.small-btn {
  font-size: 12px;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
}

.detail-gallery {
  background: #edf2f7;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.detail-image {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius) var(--radius) 0 0;
  display: block;
  height: min(68vh, 640px);
  object-fit: contain;
  width: 100%;
}

.photo-thumbs {
  background: #fff;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
}

.photo-thumbs button {
  background: transparent;
  border: 2px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  flex: 0 0 86px;
  overflow: hidden;
  padding: 0;
}

.photo-thumbs button.active {
  border-color: var(--blue);
}

.photo-thumbs img {
  aspect-ratio: 4 / 3;
  height: 64px;
  object-fit: contain;
  width: 100%;
}

.photo-manager {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}

.inspection-manager {
  background: #eef5fb;
  border: 1px solid #cbddeb;
  border-radius: var(--radius);
  padding: 16px;
}

.inspection-room-list {
  display: grid;
  gap: 14px;
}

.inspection-room-card {
  background: #fff;
  border: 1px solid #cedbea;
  border-left: 4px solid #087187;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.inspection-room-head,
.inspection-photo-toolbar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.inspection-room-head strong {
  color: var(--navy);
  font-size: 15px;
}

.inspection-room-texts {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inspection-room-card label {
  background: #f8fafd;
  border: 1px solid #e1e9f3;
  border-radius: 7px;
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  padding: 9px;
}

.inspection-room-card textarea {
  min-height: 88px;
}

.inspection-photo-toolbar {
  padding: 0;
}

.inspection-photo-toolbar > div {
  display: grid;
  gap: 3px;
}

.inspection-photo-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.inspection-photo-toolbar small,
.drop-instruction {
  color: #49627f;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 4px;
}

.inspection-photo-dropzone {
  background: #f6faff;
  border: 2px dashed #8cadd7;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.inspection-photo-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
}

.inspection-photo-item {
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

.inspection-photo-item img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.inspection-photo-item .icon-button {
  position: absolute;
  right: 6px;
  top: 6px;
}

.inspection-photo-item input {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  font-size: 12px;
  width: 100%;
}

.inspection-detail-list {
  display: grid;
  gap: 9px;
}

.inspection-detail-list article {
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
}

.inspection-detail-list span,
.inspection-detail-list p {
  color: var(--muted);
  margin: 0;
  white-space: pre-wrap;
}

.photo-manager-head {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.photo-manager-head strong,
.login-hint strong {
  display: block;
  margin-bottom: 4px;
}

.photo-manager-head p,
.upload-note,
.login-hint span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.upload-button {
  align-items: center;
  background: var(--navy);
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
  color: #fff !important;
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.upload-button:hover {
  background: var(--navy);
  box-shadow: 0 6px 14px rgba(4, 27, 63, 0.18);
  transform: translateY(-1px);
}

.upload-button:focus-within {
  outline: 3px solid rgba(4, 27, 63, 0.22);
  outline-offset: 2px;
}

.upload-button svg {
  color: #fff;
  height: 17px;
  stroke-width: 2.2;
  width: 17px;
}

.inspection-room-card label.upload-button {
  align-items: center;
  background: var(--navy);
  border: 0;
  border-radius: var(--radius);
  color: #fff !important;
  display: inline-flex;
  font-size: 13px;
  gap: 8px;
  min-height: 42px;
  padding: 0 20px;
}

.inspection-room-card label.upload-button:hover {
  background: var(--navy);
}

.modal-body label.upload-button {
  align-items: center;
  background: var(--navy);
  border: 0;
  border-radius: var(--radius);
  color: #fff !important;
  display: inline-flex;
  padding: 0 20px;
}

.modal-body label.upload-button:hover {
  background: var(--navy);
}

.upload-dropzone {
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.photo-manager.upload-dropzone {
  border: 2px dashed #8cadd7;
}

.upload-dropzone.is-dragging {
  background: #e7f2ff !important;
  border-color: #0864d8 !important;
  box-shadow: 0 0 0 4px rgba(8, 100, 216, 0.13) inset;
}

.upload-button input {
  display: none;
}

.photo-preview-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  margin-bottom: 10px;
}

.photo-preview {
  border-radius: 7px;
  min-height: 92px;
  overflow: hidden;
  position: relative;
  border: 2px solid transparent;
  background: #f2f5f8;
}

.photo-preview img {
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  width: 100%;
}

.photo-preview .icon-button {
  position: absolute;
  right: 6px;
  top: 6px;
}

.photo-preview .photo-download {
  background: var(--navy);
  color: #fff;
  left: 6px;
  right: auto;
}

.photo-download-actions {
  display: flex;
  justify-content: flex-end;
  padding: 10px;
}

.photo-preview span {
  background: rgba(4, 27, 63, 0.78);
  border-radius: 999px;
  bottom: 44px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  left: 6px;
  padding: 4px 8px;
  position: absolute;
}

.photo-preview.is-reordering { opacity: 0.55; }
.photo-preview.is-drop-target { border-color: #b68b3e; }
.photo-order-controls { display: flex; height: 38px; justify-content: space-between; padding: 2px 4px; gap: 2px; }
.photo-order-controls button { display: grid; place-items: center; border: 0; border-radius: 4px; background: transparent; color: var(--navy); width: 34px; height: 34px; padding: 6px; }
.photo-order-controls svg { width: 20px; height: 20px; }
.photo-order-controls button:disabled { opacity: 0.25; cursor: default; }
.photo-order-controls button:hover:not(:disabled) { background: #dfe7f0; }
.photo-drag-handle { touch-action: none; cursor: grab; }
.photo-drag-handle:active { cursor: grabbing; }

.catalog-section { scroll-margin-top: 100px; }
.catalog-count { font-size: 14px; color: #53657a; }
.catalog-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.catalog-pagination button { display: grid; place-items: center; width: 42px; height: 42px; padding: 8px; border: 1px solid #d5dce5; border-radius: 6px; background: #fff; color: var(--navy); font-weight: 700; }
.catalog-pagination button[aria-current] { background: var(--navy); color: #fff; border-color: var(--navy); }
.catalog-pagination button:disabled { opacity: 0.35; cursor: default; }
.catalog-pagination button:hover:not(:disabled):not([aria-current]) { background: #edf2f7; }
.catalog-pagination svg { width: 20px; height: 20px; }
.catalog-pagination span { padding: 0 2px; }

.whatsapp-float { position: fixed; right: 22px; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 80; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #168a49; color: #fff; border: 2px solid #fff; box-shadow: 0 4px 18px #0003; }
.whatsapp-float:hover { background: #106d39; color: #fff; }
.whatsapp-float svg { width: 31px; height: 31px; }
.public-footer > span { padding-right: 42px; }
.whatsapp-float:focus-visible, .catalog-pagination button:focus-visible, .photo-order-controls button:focus-visible { outline: 3px solid #b68b3e; outline-offset: 3px; }
@media (max-width: 600px) {
  .whatsapp-float { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); width: 54px; height: 54px; }
  .catalog-pagination { gap: 4px; }
  .catalog-pagination button { width: 36px; height: 40px; }
}

.attachment-group {
  align-items: flex-start;
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 12px;
  padding: 12px;
}

.attachment-group.upload-dropzone {
  border-color: #a5bbd8;
  border-style: dashed;
  border-width: 2px;
}

.attachment-group .upload-button {
  flex: 0 0 auto;
}

.attachment-list {
  flex-basis: 100%;
  display: grid;
  gap: 8px;
}

.attachment-item {
  align-items: center;
  background: #f7f9fd;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
}

.attachment-item small {
  color: var(--muted);
  margin-left: 6px;
}

.login-hint {
  background: #eef5ff;
  border: 1px solid #cfe3ff;
  border-radius: var(--radius);
  padding: 12px;
}

.toast {
  background: var(--navy);
  border-radius: 7px;
  bottom: 22px;
  box-shadow: var(--shadow);
  color: #fff;
  font-weight: 800;
  left: 50%;
  max-width: calc(100vw - 32px);
  opacity: 0;
  padding: 12px 16px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.success {
  background: #167a45;
}

.toast.error {
  background: #b42318;
}

.toast.pending {
  background: #9a5b00;
}

.primary-btn:disabled,
.ghost-btn:disabled {
  cursor: wait;
  opacity: 0.68;
}

.contact-toggle {
  align-items: center;
  background: #fff5e8;
  border: 1px solid #f2c98f;
  border-radius: 6px;
  color: #875000;
  cursor: pointer;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  gap: 5px;
  min-height: 32px;
  padding: 0 9px;
  white-space: nowrap;
}

.contact-toggle.done {
  background: #eaf8f0;
  border-color: #a8dabc;
  color: #176c40;
}

.contact-toggle svg {
  height: 14px;
  width: 14px;
}

.contact-date {
  color: var(--muted);
  display: block;
  font-size: 10px;
  margin-top: 4px;
}

.site-footer {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 24px clamp(18px, 4vw, 56px);
}

.footer-brand {
  align-items: center;
  display: flex;
  gap: 12px;
  max-width: 100%;
  width: 370px;
}

.footer-brand .brand-emblem {
  height: 56px;
  width: 56px;
}

.footer-brand .brand-wordmark {
  height: auto;
  min-width: 0;
  width: calc(100% - 68px);
}

.broker-page main {
  min-height: 100vh;
  padding-top: 92px;
}

.broker-main-nav {
  justify-content: flex-end;
}

.login-gate {
  align-items: center;
  display: flex;
  min-height: calc(100vh - 92px);
  padding: 28px clamp(18px, 4vw, 56px);
}

.login-card {
  background: #fff;
  border: 1px solid rgba(202, 213, 229, 0.75);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 0 auto;
  max-width: 560px;
  padding: clamp(24px, 4vw, 42px);
  width: 100%;
}

.login-card h1 {
  color: var(--ink);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  margin: 0 0 12px;
}

.login-card p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 18px;
}

.login-card .login-hint {
  margin-top: 18px;
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    background: #fff;
    border-top: 1px solid #e7dcc8;
    display: none;
    grid-column: 1 / -1;
    justify-content: start;
    overflow-x: auto;
    padding: 10px 0 0;
  }

  .main-nav a {
    color: #34415a;
  }

  .main-nav.open {
    display: flex;
  }

  .nav-login {
    display: inline-flex;
  }

  .broker-link {
    display: none;
  }

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

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

  .dashboard-grid,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .registry-card {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .registry-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 860px) {
  .site-header {
    gap: 12px;
    padding-block: 12px;
  }

  .main-nav {
    align-items: stretch;
    border: 1px solid #e7dcc8;
    border-radius: 6px;
    box-shadow: 0 14px 30px rgba(4, 27, 63, 0.12);
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    padding: 6px;
  }

  .main-nav a,
  .main-nav .nav-login {
    border-radius: 5px;
    justify-content: flex-start;
    min-height: 42px;
    padding: 0 12px;
    width: 100%;
  }

  .main-nav a:hover,
  .main-nav .nav-login:hover {
    background: #f7f1e6;
  }

  .main-nav .nav-login {
    border-top: 1px solid #e7dcc8;
    color: var(--navy);
    margin-top: 4px;
    padding-top: 4px;
  }

  .hero {
    min-height: auto;
  }

  .hero-content {
    padding-top: 122px;
  }

  .hero h1.hero-brand {
    margin-bottom: 24px;
    max-width: 600px;
  }

  .search-grid,
  .trust-strip,
  .property-grid,
  .metrics-grid,
  .property-admin-grid,
  .rental-overview,
  .rental-party-columns,
  .rental-party-detail-grid,
  .additional-signature-list,
  .form-section-grid,
  .whatsapp-setup-grid,
  .whatsapp-config-card {
    grid-template-columns: 1fr;
  }

  .whatsapp-config-card > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .whatsapp-heading {
    align-items: flex-start;
  }

  .rental-report-toolbar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .rental-report-filters {
    grid-template-columns: 1fr;
  }

  .rental-report-filters .primary-btn {
    justify-content: center;
    width: 100%;
  }

  .rental-list-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .rental-list-tabs {
    width: 100%;
  }

  .rental-list-tabs button {
    justify-content: center;
  }

  .rental-close-fields {
    grid-template-columns: 1fr;
  }

  .rental-party-group-head {
    align-items: stretch;
    flex-direction: column;
  }

  .rental-party-fields {
    grid-template-columns: 1fr;
  }

  .rental-party-fields .party-name {
    grid-column: auto;
  }

  .rental-party-fields .party-source {
    grid-column: auto;
  }

  .mode-tabs button {
    flex: 1;
    min-width: 0;
  }

  .owner-cta,
  .final-cta,
  .section-heading,
  .broker-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .owner-cta > div,
  .final-cta > div {
    align-items: flex-start;
  }

  .owner-lead-form {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .broker-area {
    grid-template-columns: 1fr;
  }

  .broker-sidebar {
    align-items: center;
    display: flex;
    gap: 8px;
    height: auto;
    max-height: none;
    min-height: 62px;
    overflow: hidden;
    padding: 10px;
    position: static;
  }

  .broker-sidebar .panel-brand,
  .broker-sidebar .logout-btn {
    display: none;
  }

  .panel-nav {
    align-items: center;
    display: flex;
    gap: 6px;
    min-height: 42px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    width: 100%;
  }

  .panel-nav::-webkit-scrollbar {
    display: none;
  }

  .panel-nav button {
    flex: 0 0 auto;
    min-height: 40px;
    white-space: nowrap;
    width: auto;
  }

  .table-toolbar {
    grid-template-columns: 1fr;
  }

  .status-legend {
    grid-template-columns: 1fr;
  }

  .registry-summary {
    grid-template-columns: 1fr;
  }

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

  .inspection-room-texts {
    grid-template-columns: 1fr;
  }

  .linked-item,
  .linked-meta {
    grid-template-columns: 1fr;
  }

  .attachment-detail-item {
    align-items: stretch;
    flex-direction: column;
  }

  .attachment-actions {
    justify-content: flex-start;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .photo-manager-head {
    align-items: stretch;
    flex-direction: column;
  }

  .photo-manager-head .upload-button,
  .inspection-photo-toolbar .upload-button,
  .attachment-group .upload-button {
    justify-content: center;
    width: 100%;
  }

  .inspection-photo-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding-inline: 14px;
  }

  .brand strong {
    font-size: 13px;
  }

  .brand-emblem {
    height: 38px;
    width: 38px;
  }

  .hero h1 {
    font-size: 37px;
  }

  .section,
  .broker-area {
    padding-inline: 14px;
  }

  .owner-cta,
  .final-cta {
    margin-inline: 14px;
  }

}
