:root {
  color-scheme: light;
  --ink: #182226;
  --muted: #5d6c72;
  --line: #d7e0e2;
  --paper: #f8faf9;
  --panel: #ffffff;
  --teal: #12343b;
  --teal-soft: #d9eceb;
  --green: #28724f;
  --amber: #a86105;
  --gold: #c7942e;
  --gold-deep: #7b4f08;
  --red: #b3261e;
  --blue: #2f5f9f;
  --shadow: 0 16px 38px rgba(18, 52, 59, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(199, 148, 46, 0.13), transparent 30%),
    linear-gradient(180deg, #eef5f3 0%, #f9fbfa 44%, #f5f0e8 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.auth-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(18, 52, 59, 0.96), rgba(16, 28, 31, 0.98) 48%, rgba(67, 48, 16, 0.95)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='360' viewBox='0 0 520 360'%3E%3Cg fill='none' stroke='%23f4dea9' stroke-opacity='.12' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M48 305V158l76-58 75 58v147'/%3E%3Cpath d='M198 305V118l112-72 112 72v187'/%3E%3Cpath d='M358 305V175l67-52 67 52v130'/%3E%3Cpath d='M91 305v-72h49v72M276 305V198h68v107M408 305v-63h43v63M28 305h464'/%3E%3C/g%3E%3C/svg%3E");
  background-position: center;
  background-size: cover;
}

.auth-gate[hidden],
.app-shell[hidden] {
  display: none;
}

.auth-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(292px, 0.92fr);
  align-items: stretch;
  width: min(100%, 880px);
  min-height: 470px;
  gap: 28px;
  padding: 28px;
  border: 1px solid rgba(244, 222, 169, 0.24);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 244, 236, 0.9)),
    linear-gradient(145deg, rgba(244, 222, 169, 0.22), transparent 44%);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.32);
}

.auth-card::after {
  content: "";
  position: absolute;
  left: -34px;
  bottom: -26px;
  width: 420px;
  height: 210px;
  opacity: 0.13;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='180' viewBox='0 0 360 180'%3E%3Cg fill='none' stroke='%2312343b' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M36 146V73l42-33 42 33v73'/%3E%3Cpath d='M120 146V52l55-35 55 35v94'/%3E%3Cpath d='M230 146V82l38-30 38 30v64'/%3E%3Cpath d='M62 146v-36h26v36M157 146V96h36v50M257 146v-32h24v32M24 146h318'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}

.auth-card > * {
  position: relative;
  z-index: 1;
}

.auth-copy {
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.48;
}

.auth-main,
.auth-form {
  position: relative;
  z-index: 1;
}

.auth-main {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  gap: 22px;
  padding: 4px 0;
}

.auth-main .brand-lockup {
  align-items: flex-start;
}

.auth-main h1 {
  max-width: 9ch;
  font-size: clamp(3.1rem, 8vw, 5.15rem);
  line-height: 0.88;
}

.auth-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-benefits span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(18, 52, 59, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 850;
}

.auth-form {
  align-self: center;
  display: grid;
  width: 100%;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(18, 52, 59, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 20px 54px rgba(18, 34, 38, 0.12);
}

.auth-form-title {
  margin: 0;
  color: var(--ink);
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 650;
}

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

.auth-fields label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.auth-fields input {
  width: 100%;
  min-height: 50px;
  padding: 12px 13px;
  border: 1px solid rgba(18, 52, 59, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  outline: 0;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.auth-fields input:focus {
  border-color: rgba(199, 148, 46, 0.7);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(199, 148, 46, 0.14);
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 2px;
}

.auth-actions .primary-button,
.auth-actions .secondary-button {
  min-height: 48px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--teal);
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.auth-reset-button {
  justify-self: start;
  min-height: 28px;
  padding: 0;
  font-size: 0.88rem;
}

.auth-status {
  min-height: 18px;
  margin-top: 0;
  color: var(--muted);
}

.topbar,
.dialog-form header,
.dialog-form footer,
.actions-row,
.data-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar {
  position: relative;
  overflow: hidden;
  justify-content: space-between;
  min-height: 98px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 244, 236, 0.78)),
    radial-gradient(circle at 86% 18%, rgba(199, 148, 46, 0.22), transparent 28%);
  box-shadow: 0 20px 54px rgba(18, 34, 38, 0.12);
}

.topbar::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 42%;
  opacity: 0.22;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.8) 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='180' viewBox='0 0 360 180'%3E%3Cg fill='none' stroke='%2312343b' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M36 146V73l42-33 42 33v73'/%3E%3Cpath d='M120 146V52l55-35 55 35v94'/%3E%3Cpath d='M230 146V82l38-30 38 30v64'/%3E%3Cpath d='M62 146v-36h26v36M157 146V96h36v50M257 146v-32h24v32M24 146h318'/%3E%3C/g%3E%3C/svg%3E");
  background-position: right center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

.brand-lockup {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(199, 148, 46, 0.42);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(18, 52, 59, 0.96), rgba(39, 85, 82, 0.92)),
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.24), transparent 42%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 12px 26px rgba(18, 52, 59, 0.2);
}

.brand-mark span {
  width: 30px;
  height: 28px;
  border: 2px solid rgba(244, 222, 169, 0.95);
  border-top: 0;
  border-radius: 2px 2px 4px 4px;
  transform: translateY(4px);
}

.brand-mark span::before {
  content: "";
  display: block;
  width: 23px;
  height: 23px;
  margin: -12px auto 0;
  border-top: 2px solid rgba(244, 222, 169, 0.95);
  border-left: 2px solid rgba(244, 222, 169, 0.95);
  transform: rotate(45deg);
}

.topbar .icon-button {
  position: relative;
  z-index: 1;
  border-color: rgba(199, 148, 46, 0.26);
  background: rgba(255, 255, 255, 0.78);
  color: var(--gold-deep);
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--gold-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.save-status {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  max-width: 12ch;
  color: #10191c;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 8vw, 2.85rem);
  font-weight: 650;
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 1.1rem;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--teal);
  font-size: 1.35rem;
  font-weight: 700;
}

.summary-band {
  display: grid;
  grid-template-columns: 1fr minmax(232px, 268px);
  gap: 16px;
  align-items: center;
  min-height: 154px;
  padding: 20px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(123, 79, 8, 0.96), rgba(199, 148, 46, 0.9)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='160' viewBox='0 0 220 160'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.2' stroke-width='7'%3E%3Cpath d='M18 142V69l44-34 43 34v73'/%3E%3Cpath d='M116 142V50l40-31 39 31v92'/%3E%3Cpath d='M52 142v-31h25v31M147 142v-37h25v37'/%3E%3C/g%3E%3C/svg%3E");
  background-position: center;
  background-size: cover;
  color: #fff;
  box-shadow: var(--shadow);
}

.summary-copy p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.42;
}

.status-wheel {
  position: relative;
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--wheel, 0deg), rgba(255, 255, 255, 0.22) 0deg);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  outline: 0;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.ltv-wheel {
  background: conic-gradient(#4fd1c5 var(--wheel, 0deg), rgba(255, 255, 255, 0.22) 0deg);
}

.yield-wheel {
  background: conic-gradient(#f4c95d var(--wheel, 0deg), rgba(255, 255, 255, 0.22) 0deg);
}

.status-wheel:hover,
.status-wheel:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22);
}

.hero-status {
  display: grid;
  grid-template-columns: auto;
  gap: 12px;
  align-items: center;
  justify-content: end;
}

.hero-wheels {
  display: flex;
  gap: 10px;
  align-items: center;
}

.hero-alerts {
  display: grid;
  gap: 5px;
  width: 100%;
}

.hero-alert {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.hero-alert:hover,
.hero-alert:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

.hero-alerts strong {
  font-size: 1rem;
}

.status-wheel span {
  display: grid;
  width: 70px;
  height: 70px;
  place-items: center;
  border-radius: 50%;
  background: rgba(18, 52, 59, 0.88);
  font-size: 1.32rem;
  font-weight: 800;
  pointer-events: none;
}

.status-wheel small {
  position: absolute;
  width: 86px;
  transform: translateY(38px);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0;
  pointer-events: none;
}

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

.metric {
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric-button {
  cursor: pointer;
}

.metric-button:hover,
.metric-button:focus-visible {
  border-color: rgba(19, 107, 92, 0.45);
  outline: 2px solid rgba(19, 107, 92, 0.18);
  outline-offset: 2px;
}

.metric span {
  display: block;
  font-size: 1.55rem;
  font-weight: 800;
}

.property-metric span {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  font-size: clamp(0.98rem, 1.7vw, 1.16rem);
  line-height: 1.18;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.metric p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.metric.urgent span {
  color: var(--red);
}

.metric.warning span {
  color: var(--amber);
}

.metric.good span {
  color: var(--green);
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr minmax(138px, 190px);
  gap: 8px;
  margin-bottom: 10px;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.search-field input,
.toolbar select,
.dialog-form input,
.dialog-form textarea,
.dialog-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.search-field input {
  min-width: 0;
  border: 0;
  outline: 0;
}

.toolbar select {
  padding: 0 10px;
}

.actions-row {
  margin-bottom: 14px;
}

.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 800;
  text-decoration: none;
}

.primary-button {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #fff;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--teal);
}

.danger-button {
  border: 1px solid rgba(179, 38, 30, 0.28);
  background: #fff4f2;
  color: var(--red);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin: 0 0 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.tab {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.tab.active {
  background: var(--teal);
  color: #fff;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.task-list,
.property-list {
  display: grid;
  gap: 10px;
}

.map-panel {
  display: grid;
  gap: 10px;
}

.map-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.map-heading h2 {
  margin-bottom: 4px;
}

.map-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.property-map {
  overflow: hidden;
  width: 100%;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf3f1;
  box-shadow: var(--shadow);
}

.map-empty {
  display: grid;
  min-height: 430px;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.map-popup {
  display: grid;
  gap: 4px;
  min-width: 190px;
}

.map-popup strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.map-popup span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.map-missing-list {
  display: grid;
  gap: 8px;
}

.map-missing-list h3 {
  margin: 4px 0 0;
  font-size: 0.95rem;
}

.map-missing-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.map-missing-row span,
.map-missing-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-missing-row span {
  color: var(--ink);
  font-weight: 850;
}

.map-missing-row strong {
  color: var(--muted);
  font-size: 0.84rem;
}

.task,
.property,
.data-panel,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
}

.property-summary-card,
[data-show-compliance-property-card] {
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.property-summary-card:hover,
.property-summary-card:focus-visible,
[data-show-compliance-property-card]:hover,
[data-show-compliance-property-card]:focus-visible {
  border-color: rgba(18, 52, 59, 0.28);
  box-shadow: 0 14px 34px rgba(18, 34, 38, 0.1);
  outline: 0;
  transform: translateY(-1px);
}

.task {
  display: grid;
  grid-template-columns: 6px 1fr;
  overflow: hidden;
}

.status-strip {
  background: var(--green);
}

.task.overdue .status-strip {
  background: var(--red);
}

.task.soon .status-strip {
  background: var(--amber);
}

.task.missing .status-strip {
  background: var(--blue);
}

.task-body,
.property,
.data-panel,
.empty-state {
  padding: 14px;
}

.task-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

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

.task h3,
.property h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.task p,
.property p,
.data-panel p,
.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.38;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge.overdue {
  background: #ffe2de;
  color: var(--red);
}

.badge.soon {
  background: #fff0d8;
  color: var(--amber);
}

.badge.valid {
  background: #def0e6;
  color: var(--green);
}

.task-meta,
.property-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

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

.detail-grid span {
  min-height: 52px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  color: var(--muted);
  font-size: 0.78rem;
}

.detail-grid strong {
  display: block;
  color: var(--ink);
  font-size: 1rem;
}

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

.priority-grid span {
  min-height: 58px;
}

.profit-snapshot {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d8e7e2;
  border-radius: 8px;
  background: #f3faf7;
}

.profit-snapshot div {
  display: grid;
  gap: 4px;
}

.profit-snapshot strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.profit-snapshot span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.performance-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

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

/* Performance starts with three clear answers; deeper analysis stays available on demand. */
.performance-simple,
.performance-properties,
.performance-more {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
}

.performance-simple { overflow: hidden; }
.performance-simple-heading { padding: 14px 14px 10px; }
.performance-simple-heading h2 { margin: 0; font-size: 1rem; }
.performance-simple-heading p { margin: 3px 0 0; color: var(--muted); font-size: .84rem; font-weight: 700; }
.performance-core-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 14px 14px; }
.performance-more { margin-top: 10px; overflow: hidden; }
.performance-more > summary { cursor: pointer; padding: 14px; color: var(--ink); font-weight: 900; }
.performance-more[open] > summary { border-bottom: 1px solid var(--line); }
.performance-more .scorecard, .performance-more .scenario-planner { border: 0; border-radius: 0; margin: 0; }
.performance-properties { margin-top: 10px; overflow: hidden; }
.performance-property { border-top: 1px solid var(--line); }
.performance-property:first-of-type { border-top: 0; }
.performance-property summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; padding: 13px 14px; font-weight: 800; }
.performance-property summary::marker { color: var(--muted); }
.performance-property summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.performance-property summary strong { flex: 0 0 auto; }
.performance-property-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 14px 14px; }
.performance-property-details span { color: var(--muted); font-size: .8rem; font-weight: 700; }
.performance-property-details b { display: block; color: var(--ink); font-size: .92rem; }
.charts-more .chart-list { padding: 12px; }

.scorecard {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
}

.scorecard-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 8px;
}

.scorecard-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.scorecard-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

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

.scorecard table,
.scenario-table-wrap table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.scorecard th,
.scorecard td,
.scenario-table-wrap th,
.scenario-table-wrap td {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  font-size: 0.84rem;
  white-space: nowrap;
}

.scorecard th,
.scenario-table-wrap th {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.scenario-planner {
  display: grid;
  gap: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  overflow: hidden;
}

.scenario-planner .scorecard-heading {
  align-items: center;
}

.scenario-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.4fr);
  gap: 14px;
  padding: 0 14px 14px;
}

.scenario-controls,
.scenario-output {
  display: grid;
  gap: 10px;
}

.scenario-control {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.scenario-control span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.scenario-control b {
  color: var(--ink);
}

.scenario-control strong {
  color: var(--teal);
  white-space: nowrap;
}

.scenario-control input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
}

.scenario-control select {
  min-height: 40px;
}

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

.scenario-kpis article {
  min-height: 92px;
  padding: 11px;
  border: 1px solid rgba(19, 107, 92, 0.18);
  border-radius: 8px;
  background: #eef7f3;
}

.scenario-kpis span,
.scenario-kpis small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.scenario-kpis strong {
  display: block;
  margin: 5px 0 4px;
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 900;
}

.scenario-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.debt-accounts {
  display: grid;
  gap: 10px;
}

.section-heading.compact {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.section-heading.compact h3 {
  margin: 0 0 3px;
  font-size: 0.96rem;
}

.section-heading.compact p,
.debt-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

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

.debt-account-row {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

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

.debt-account-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.debt-account-footer span {
  color: var(--teal);
  font-weight: 900;
}

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

.debt-breakdown-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.debt-breakdown-heading,
.debt-breakdown-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.debt-breakdown-heading strong,
.debt-breakdown-heading span,
.debt-breakdown-account strong,
.debt-breakdown-account span {
  display: block;
}

.debt-breakdown-heading strong {
  color: var(--ink);
  font-size: 1rem;
}

.debt-breakdown-heading span,
.debt-breakdown-account span,
.debt-breakdown-note {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.35;
}

.debt-breakdown-heading > div:last-child,
.debt-breakdown-account > div:last-child {
  min-width: 112px;
  text-align: right;
}

.debt-breakdown-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.debt-breakdown-meta span {
  padding: 5px 8px;
  border: 1px solid rgba(18, 52, 59, 0.12);
  border-radius: 999px;
  background: #f7f8f8;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.debt-breakdown-account {
  padding: 9px;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #f8fbfa;
}

.debt-breakdown-account.soon {
  border-left-color: var(--gold);
  background: #fff8e7;
}

.debt-breakdown-account.overdue,
.debt-breakdown-account.missing {
  border-left-color: var(--red);
  background: #fff0ef;
}

.debt-breakdown-note {
  margin: 0;
}

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

.yield-breakdown-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #fff;
}

.yield-breakdown-card.negative {
  border-left-color: var(--red);
}

.yield-breakdown-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.yield-breakdown-heading strong,
.yield-breakdown-heading span {
  display: block;
}

.yield-breakdown-heading strong {
  color: var(--ink);
  font-size: 1rem;
}

.yield-breakdown-heading span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.35;
}

.yield-breakdown-heading > div:last-child {
  min-width: 96px;
  text-align: right;
}

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

.yield-formula span {
  padding: 7px 8px;
  border: 1px solid rgba(18, 52, 59, 0.12);
  border-radius: 8px;
  background: #f7f8f8;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.25;
}

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

.value-breakdown-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #fff;
}

.value-breakdown-card.negative {
  border-left-color: var(--red);
}

.value-breakdown-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.value-breakdown-heading strong,
.value-breakdown-heading span {
  display: block;
}

.value-breakdown-heading strong {
  color: var(--ink);
  font-size: 1rem;
}

.value-breakdown-heading span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.35;
}

.value-breakdown-heading > div:last-child {
  min-width: 110px;
  text-align: right;
}

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

.value-formula span {
  padding: 7px 8px;
  border: 1px solid rgba(18, 52, 59, 0.12);
  border-radius: 8px;
  background: #f7f8f8;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.25;
}

.positive-value {
  color: var(--green);
  font-weight: 900;
}

.negative-value {
  color: var(--red);
  font-weight: 900;
}

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

.chart-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  padding: 14px;
}

.chart-card h2 {
  margin-bottom: 12px;
}

.bar-chart {
  display: grid;
  gap: 10px;
}

.bar-row,
.stack-row {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) minmax(120px, 2fr) minmax(72px, auto);
  gap: 8px;
  align-items: center;
}

.bar-label,
.bar-value {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.bar-value {
  text-align: right;
}

.bar-track {
  display: flex;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf3f2;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.bar-fill.negative {
  background: var(--red);
}

.stack-bars {
  display: grid;
  gap: 4px;
}

.income-track {
  height: 10px;
}

.bar-fill.income,
.legend-box.income {
  background: var(--green);
}

.bar-fill.mortgage,
.legend-box.mortgage {
  background: var(--blue);
}

.bar-fill.expenses,
.legend-box.expenses {
  background: var(--amber);
}

.bar-fill.repairs,
.legend-box.repairs {
  background: var(--red);
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.legend-box {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 5px;
}

.task-actions,
.property-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.task-actions button,
.property-actions button {
  min-height: 36px;
  padding: 0 10px;
}

.data-panel h2 {
  margin-bottom: 6px;
}

.data-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.data-actions {
  margin-top: 14px;
  flex-wrap: wrap;
}

.compact-list {
  margin-top: 8px;
}

.setup-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fbfa;
}

.setup-details summary {
  color: var(--teal);
  cursor: pointer;
  font-weight: 800;
}

.setup-details pre {
  overflow-x: auto;
  margin: 10px 0 0;
  white-space: pre-wrap;
}

.setup-details code {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.report-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 10px;
  padding: 14px;
}

.report-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.report-toolbar h2 {
  margin-bottom: 0;
}

.report-content h1 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.report-content section {
  margin-top: 22px;
}

.report-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 18px;
}

.report-content th,
.report-content td {
  border: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  vertical-align: top;
}

.report-content th {
  background: #f2f6f5;
}

dialog {
  width: min(calc(100% - 24px), 560px);
  max-height: calc(100dvh - 24px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 28px 80px rgba(18, 34, 38, 0.35);
}

dialog::backdrop {
  background: rgba(18, 34, 38, 0.48);
}

.dialog-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.breakdown-list {
  display: grid;
  gap: 8px;
}

.breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
}

.breakdown-row span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.breakdown-row strong {
  color: var(--ink);
  font-size: 1rem;
  white-space: nowrap;
}

.breakdown-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.breakdown-row.positive strong {
  color: var(--green);
}

.breakdown-row.negative strong {
  color: var(--red);
}

.breakdown-row.total {
  background: #eef7f3;
  border-color: rgba(19, 107, 92, 0.24);
}

.breakdown-row.total strong {
  font-size: 1.18rem;
}

.breakdown-note {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.guide-intro {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(19, 107, 92, 0.2);
  border-radius: 8px;
  background: #eef7f3;
}

.guide-intro strong {
  color: var(--ink);
  font-size: 1rem;
}

.guide-intro span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.4;
}

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

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

.guide-card-heading {
  display: grid;
  gap: 4px;
}

.guide-card-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.guide-card-heading span {
  color: var(--teal);
  font-size: 0.84rem;
  font-weight: 900;
}

.guide-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.guide-card dl div {
  display: grid;
  gap: 2px;
}

.guide-card dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-card dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.38;
}

.guide-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding-top: 2px;
}

.guide-card-actions a {
  color: var(--teal);
  font-size: 0.84rem;
  font-weight: 900;
}

.guide-card-actions span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.compact-guide-intro {
  background: #fff8e7;
  border-color: rgba(126, 82, 11, 0.2);
}

.guide-summary {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(19, 107, 92, 0.2);
  border-radius: 8px;
  background: #f7fbf9;
}

.guide-summary div:first-child {
  display: grid;
  gap: 2px;
}

.guide-summary span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.guide-summary strong {
  color: var(--ink);
  font-size: 1rem;
}

.guide-summary p {
  margin: 0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.42;
}

.guide-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.guide-summary-actions a {
  color: var(--teal);
  font-size: 0.84rem;
  font-weight: 900;
}

.external-link-status {
  min-height: 1rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.mortgage-calculator {
  display: grid;
  gap: 14px;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid rgba(18, 52, 59, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7faf9);
}

.calculator-heading,
.calculator-result {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.calculator-heading h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.calculator-heading p,
.calculator-result span,
.calculator-result small {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.calculator-heading > span,
.calculator-result strong {
  color: var(--teal);
  font-size: 1.28rem;
  font-weight: 900;
  white-space: nowrap;
}

.calculator-grid {
  display: grid;
  gap: 12px;
}

.calculator-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.calculator-grid label > span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.calculator-grid strong {
  color: var(--ink);
  white-space: nowrap;
}

.calculator-grid input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
}

.calculator-grid select {
  min-height: 42px;
}

.calculator-result {
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(19, 107, 92, 0.22);
  border-radius: 8px;
  background: #eef7f3;
}

.calculator-result small {
  display: block;
  margin-top: 3px;
  max-width: 300px;
}

.compliance-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.compliance-summary-tile {
  display: grid;
  gap: 2px;
  min-height: 64px;
  align-content: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.compliance-summary-tile:hover,
.compliance-summary-tile:focus-visible,
.compliance-summary-tile.active {
  border-color: rgba(18, 52, 59, 0.35);
  box-shadow: 0 10px 22px rgba(18, 34, 38, 0.09);
  outline: 0;
  transform: translateY(-1px);
}

.compliance-summary-tile strong {
  color: var(--ink);
  font-size: 1.25rem;
}

.compliance-summary-tile span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
}

.compliance-summary-tile.valid {
  background: #eef7f3;
}

.compliance-summary-tile.all {
  background: #f8fbfa;
}

.compliance-summary-tile.missing,
.compliance-summary-tile.overdue {
  background: #fff4f2;
}

.compliance-summary-tile.soon {
  background: #fff8e8;
}

.compliance-summary-tile.disabled {
  background: #f2f4f4;
}

.compliance-filter-status {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.compliance-table-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.compliance-mobile-list {
  display: none;
}

.compliance-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.compliance-table th,
.compliance-table td {
  padding: 8px;
  border-top: 1px solid #1f2d30;
  border-left: 1px solid #1f2d30;
  text-align: left;
  vertical-align: middle;
  font-size: 0.78rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.compliance-table th:first-child,
.compliance-table td:first-child {
  border-left: 0;
}

.compliance-table tr:first-child th {
  border-top: 0;
}

.compliance-table th {
  background: #f7f8f8;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.compliance-table th:first-child,
.compliance-table td:first-child {
  width: 34px;
  text-align: center;
}

.compliance-table th:nth-child(2),
.compliance-table td:nth-child(2) {
  width: 22%;
}

.compliance-cell {
  padding: 0;
}

.compliance-cell button,
.table-text-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.table-text-button {
  font-weight: 800;
}

.compliance-cell button {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 8px;
}

.compliance-cell button:hover,
.compliance-cell button:focus-visible,
.table-text-button:hover,
.table-text-button:focus-visible {
  outline: 2px solid rgba(18, 52, 59, 0.28);
  outline-offset: -2px;
}

.compliance-cell strong,
.compliance-cell span {
  display: block;
}

.compliance-cell strong {
  color: var(--ink);
  font-weight: 900;
}

.compliance-cell span {
  color: rgba(18, 34, 38, 0.72);
  font-size: 0.68rem;
  font-weight: 850;
}

.compliance-cell.valid {
  background: #cfeada;
}

.compliance-cell.soon {
  background: #f6d28f;
}

.compliance-cell.overdue,
.compliance-cell.missing {
  background: #e87870;
}

.compliance-cell.disabled {
  background: #111;
  color: #fff;
}

.compliance-cell.disabled strong,
.compliance-cell.disabled span {
  color: #fff;
}

.compliance-mobile-card {
  display: grid;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: #fff;
}

.compliance-mobile-card.soon {
  border-left-color: var(--gold);
}

.compliance-mobile-card.overdue,
.compliance-mobile-card.missing {
  border-left-color: var(--red);
}

.compliance-mobile-address {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.compliance-mobile-address strong {
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.25;
}

.compliance-mobile-address span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.compliance-phone-table {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  border-spacing: 0;
  overflow: hidden;
}

.compliance-phone-table th,
.compliance-phone-table td {
  padding: 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.compliance-phone-table tr:first-child th,
.compliance-phone-table tr:first-child td {
  border-top: 0;
}

.compliance-phone-table th {
  width: 44%;
  padding: 10px;
  background: #f7f8f8;
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.compliance-phone-table td {
  background: #cfeada;
}

.compliance-phone-table tr.soon td {
  background: #f6d28f;
}

.compliance-phone-table tr.overdue td,
.compliance-phone-table tr.missing td {
  background: #e87870;
}

.compliance-phone-table tr.disabled th,
.compliance-phone-table tr.disabled td {
  background: #111;
  color: #fff;
}

.compliance-phone-table button {
  display: grid;
  gap: 2px;
  width: 100%;
  min-height: 48px;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: right;
  cursor: pointer;
}

.compliance-phone-table button strong,
.compliance-phone-table button span {
  display: block;
}

.compliance-phone-table button strong {
  color: inherit;
  font-size: 0.9rem;
  line-height: 1.2;
}

.compliance-phone-table button span {
  color: inherit;
  font-size: 0.7rem;
  font-weight: 850;
  opacity: 0.78;
}

.compliance-mobile-address:hover,
.compliance-mobile-address:focus-visible,
.compliance-phone-table button:hover,
.compliance-phone-table button:focus-visible {
  outline: 2px solid rgba(18, 52, 59, 0.28);
  outline-offset: 2px;
}

.compliance-checklist {
  display: grid;
  gap: 8px;
}

.compliance-check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.compliance-check-row:hover,
.compliance-check-row:focus-visible {
  border-color: rgba(18, 52, 59, 0.28);
  box-shadow: 0 10px 22px rgba(18, 34, 38, 0.08);
  outline: 0;
  transform: translateY(-1px);
}

.compliance-check-row.valid {
  border-left-color: var(--green);
}

.compliance-check-row.soon {
  border-left-color: var(--gold);
}

.compliance-check-row.overdue,
.compliance-check-row.missing {
  border-left-color: var(--red);
}

.compliance-check-row.disabled {
  border-left-color: #9aa6aa;
  background: #f6f7f7;
}

.compliance-check-row strong,
.compliance-check-row span,
.compliance-check-row small {
  display: block;
}

.compliance-check-row strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.compliance-check-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.compliance-check-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.compliance-check-action {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.compliance-check-action > span {
  color: var(--ink);
  white-space: nowrap;
}

.compliance-check-action button {
  min-height: 34px;
  padding: 0 11px;
}

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

fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.dialog-form header {
  justify-content: space-between;
}

.dialog-form h2 {
  margin-bottom: 0;
}

.dialog-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.field-help {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
}

.finance-hint {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid rgba(126, 82, 11, 0.18);
  border-radius: 8px;
  background: #fff8e7;
}

.finance-hint strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.finance-hint span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  line-height: 1.35;
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.toggle-row input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--teal);
}

.dialog-form input,
.dialog-form textarea,
.dialog-form select {
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 500;
}

.dialog-form footer {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.footer-spacer {
  flex: 1;
}

.empty-state {
  text-align: center;
}

@media (max-width: 760px) {
  .auth-gate {
    align-items: start;
    padding: 14px;
  }

  .auth-card {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 22px;
    padding: 20px;
    border-radius: 18px;
  }

  .auth-card::after {
    width: 270px;
    height: 150px;
    opacity: 0.1;
  }

  .auth-main {
    gap: 18px;
    min-height: auto;
  }

  .auth-main h1 {
    font-size: clamp(2.2rem, 11.5vw, 3.05rem);
    line-height: 0.92;
  }

  .auth-form {
    padding: 16px;
  }

  .compliance-table-wrap {
    display: none;
  }

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

@media (max-width: 560px) {
  .app-shell {
    padding: 12px 10px 24px;
  }

  .auth-gate {
    place-items: start center;
  }

  .auth-card {
    padding: 16px;
  }

  .auth-copy {
    font-size: 0.95rem;
  }

  .auth-benefits {
    gap: 6px;
  }

  .auth-benefits span {
    min-height: 31px;
    padding: 0 9px;
    font-size: 0.74rem;
  }

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

  .map-heading,
  .map-missing-row {
    grid-template-columns: 1fr;
  }

  .map-heading {
    display: grid;
  }

  .property-map,
  .map-empty {
    min-height: 360px;
  }

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

  .compliance-check-row {
    grid-template-columns: 1fr;
  }

  .compliance-check-action {
    grid-template-columns: 1fr auto;
    justify-items: start;
    align-items: center;
  }

  .topbar {
    min-height: 92px;
    padding: 12px;
  }

  .topbar::after {
    width: 34%;
    opacity: 0.14;
  }

  .brand-lockup {
    gap: 10px;
  }

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

  h1 {
    font-size: clamp(1.75rem, 9vw, 2.2rem);
  }

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

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

  .status-wheel {
    width: 84px;
    height: 84px;
  }

  .status-wheel span {
    width: 62px;
    height: 62px;
    font-size: 1.12rem;
  }

  .status-wheel small {
    transform: translateY(33px);
    font-size: 0.56rem;
  }

  .hero-wheels {
    justify-content: center;
  }

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

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

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

  .actions-row > button {
    flex: 1;
  }

  .task-main {
    grid-template-columns: 1fr;
  }

  .calculator-heading,
  .calculator-result {
    display: grid;
  }

  .calculator-result small {
    max-width: none;
  }

  .property-heading {
    display: grid;
  }

  .detail-grid,
  .form-grid,
  .performance-grid,
  .profit-snapshot {
    grid-template-columns: 1fr;
  }

  .scenario-layout,
  .scenario-kpis,
  .debt-grid {
    grid-template-columns: 1fr;
  }

  .debt-breakdown-heading,
  .debt-breakdown-account,
  .yield-breakdown-heading,
  .value-breakdown-heading {
    grid-template-columns: 1fr;
  }

  .debt-breakdown-heading > div:last-child,
  .debt-breakdown-account > div:last-child,
  .yield-breakdown-heading > div:last-child,
  .value-breakdown-heading > div:last-child {
    min-width: 0;
    text-align: left;
  }

  .yield-formula,
  .value-formula {
    grid-template-columns: 1fr;
  }

  .scorecard-scroll,
  .scenario-table-wrap {
    overflow: visible;
  }

  .compliance-table-wrap {
    display: none;
  }

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

  .scorecard table,
  .scenario-table-wrap table,
  .scorecard thead,
  .scenario-table-wrap thead,
  .scorecard tbody,
  .scenario-table-wrap tbody,
  .scorecard tr,
  .scenario-table-wrap tr,
  .scorecard td,
  .scenario-table-wrap td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .scorecard thead,
  .scenario-table-wrap thead {
    display: none;
  }

  .scorecard tbody,
  .scenario-table-wrap tbody {
    display: grid;
    gap: 8px;
    padding: 8px;
  }

  .scorecard tr,
  .scenario-table-wrap tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
  }

  .scorecard td,
  .scenario-table-wrap td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border-top: 1px solid var(--line);
    white-space: normal;
    text-align: right;
  }

  .scorecard td:first-child,
  .scenario-table-wrap td:first-child {
    border-top: 0;
  }

  .scorecard td::before,
  .scenario-table-wrap td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 800;
    text-align: left;
  }

  .scorecard-heading {
    display: grid;
  }

  .bar-row,
  .stack-row {
    grid-template-columns: 1fr;
  }

  .bar-value {
    text-align: left;
  }
}

@media print {
  body {
    background: #fff;
  }

  body * {
    visibility: hidden;
  }

  .report-preview,
  .report-preview * {
    visibility: visible;
  }

  .report-preview {
    position: absolute;
    inset: 0;
    border: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
  }

  .report-toolbar {
    display: none;
  }
}

/* A concise financial overview for each property. */
.property-summary-card {
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 3px 16px rgba(18, 34, 38, 0.035);
}
.property-summary-card .property-heading h3 {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.property-financials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 0;
}
.property-financials > div {
  min-width: 0;
  padding: 14px;
  border-radius: 12px;
  background: #f5f7f7;
}
.property-financials dt {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}
.property-financials dd {
  margin: 7px 0 0;
  color: #183c43;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.property-financials .property-monthly {
  background: #eef4f4;
}
.property-financials .property-rent {
  background: #eaf5ef;
}
.property-financials .property-rent dd {
  color: #236548;
}
.property-summary-card .property-actions {
  justify-content: flex-end;
  margin-top: 16px;
}
@media (max-width: 600px) {
  .property-summary-card { padding: 16px; }
  .property-financials {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .property-financials > div { padding: 12px; }
}

.brand-subtitle {
  margin: 4px 0 8px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

/* Larger, readable portfolio indicators and individual visibility controls. */
.summary-band { grid-template-columns: minmax(0, 1fr) auto; }
.status-wheel { width: 128px; height: 128px; }
.status-wheel span { width: 96px; height: 96px; font-size: 1.7rem; }
.status-wheel small { width: 112px; transform: translateY(49px); font-size: 0.68rem; }
.hero-wheels { gap: 16px; }
.metric-grid > .metric { position: relative; padding: 0; overflow: hidden; }
.metric-open {
  display: block; width: 100%; min-height: 110px;
  padding: 12px 12px 36px; border: 0; border-radius: 8px;
  background: transparent; text-align: left; color: inherit; font: inherit;
}
.metric-visibility {
  position: absolute; bottom: 8px; right: 10px;
  padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px;
  background: #f5f7f7; color: var(--teal); font: inherit;
  font-size: 0.72rem; font-weight: 700; cursor: pointer;
}
.metric-visibility:hover { background: var(--teal-soft); }
.metric-visibility:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.metric-grid [hidden] { display: none !important; }
.metric-mask { letter-spacing: 3px; }
@media (max-width: 700px) {
  .summary-band { grid-template-columns: 1fr; gap: 12px; }
  .hero-status { justify-content: center; }
  .hero-wheels { gap: 10px; }
  .status-wheel { width: clamp(86px, 24vw, 120px); height: clamp(86px, 24vw, 120px); }
  .status-wheel span { width: 74%; height: 74%; font-size: clamp(1.12rem, 4.8vw, 1.6rem); }
  .status-wheel small { width: 94%; transform: translateY(clamp(34px, 9.3vw, 46px)); font-size: clamp(0.53rem, 1.8vw, 0.65rem); }
}

.map-property-count {
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #12343b;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  font-size: 16px;
  font-weight: 800;
}
.map-shared-properties h3 { margin: 0 0 12px; font-size: 1rem; }
.map-shared-properties hr { border: 0; border-top: 1px solid #dbe3e3; margin: 14px 0; }

/* Compliance remains readable on phones, landscape screens and small tablets. */
.compliance-phone-items { display: grid; gap: 6px; min-width: 0; }
.compliance-phone-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 60px;
  padding: 12px;
  border: 1px solid #d5e5dc;
  border-radius: 8px;
  background: #edf6f0;
  color: #193c30;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.compliance-phone-label { font-size: .82rem; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.compliance-phone-value { display: grid; gap: 4px; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.compliance-phone-value strong { font-size: .88rem; line-height: 1.4; }
.compliance-phone-value small { font-size: .74rem; line-height: 1.3; }
.compliance-phone-item.soon { background: #fff2d8; border-color: #edcf95; color: #715016; }
.compliance-phone-item.overdue, .compliance-phone-item.missing { background: #ffebe8; border-color: #edbbb3; color: #8c3026; }
.compliance-phone-item.disabled { background: #f0f2f3; border-color: #d8dfe1; color: #526169; }
.compliance-phone-item:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.compliance-mobile-address { min-height: 48px; padding: 4px 0; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .compliance-table-wrap { display: none; }
  .compliance-mobile-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
  .compliance-mobile-card { min-width: 0; padding: 12px; gap: 12px; }
  #complianceView, #complianceView .data-panel, #dueList { min-width: 0; }
  #complianceView .panel-heading { display: flex; flex-wrap: wrap; gap: 12px; align-items: start; }
  #complianceView .panel-heading > div { flex: 1 1 200px; min-width: 0; }
  #complianceView .data-actions { flex-wrap: wrap; }
  #complianceView .data-actions button { max-width: 100%; white-space: normal; min-height: 44px; }
  #complianceView .breakdown-note { overflow-wrap: anywhere; }
}
@media (max-width: 560px) {
  .topbar .brand-lockup { min-width: 0; flex: 1; }
  .topbar .brand-lockup > div:last-child { min-width: 0; }
  .topbar h1 { font-size: clamp(1.25rem, 6vw, 1.9rem); overflow-wrap: anywhere; line-height: 1.15; }
  .topbar .icon-button { flex: 0 0 38px; width: 38px; }
  .topbar .save-status { overflow-wrap: anywhere; }
  .dialog-form header { align-items: start; }
  .dialog-form header h2 { overflow-wrap: anywhere; min-width: 0; }
  .breakdown-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .breakdown-row > * { min-width: 0; overflow-wrap: anywhere; }
  .dialog-form input, .dialog-form select, .dialog-form textarea { min-width: 0; max-width: 100%; font-size: 16px; }
}

@media (max-width: 560px) {
  .actions-row { flex-wrap: wrap; }
  .actions-row > button { flex: 1 1 110px; min-width: 0; }
}

.demo-entry { margin: 18px 0; padding: 18px; border: 1px solid #cfded6; border-radius: 14px; background: #f0f6f2; }
.demo-entry h2 { font-size: 1.05rem; margin: 0 0 8px; }
.demo-entry p, .demo-entry small { color: var(--muted); line-height: 1.5; font-size: .82rem; }
.demo-entry small { display: block; margin-top: 12px; }
.demo-size-links { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-entry .demo-size-links { margin-top: 14px; }
.demo-size-links a, .demo-size-links button { min-height: 44px; }
.demo-banner { display: grid; gap: 12px; margin-bottom: 16px; padding: 16px; border: 1px solid #d7c697; border-radius: 12px; background: #fff7e5; color: #54431c; }
.demo-banner[hidden], #accountPanel[hidden] { display: none; }
.demo-banner p { margin: 6px 0 0; font-size: .82rem; line-height: 1.5; }
.demo-banner .demo-size-links a, .demo-banner button { display: inline-flex; align-items: center; padding: 8px 10px; border: 1px solid #d7c697; border-radius: 8px; background: #fffdf6; color: #54431c; font: inherit; font-size: .8rem; text-decoration: none; cursor: pointer; }

.auth-main { min-width: 0; }
.auth-main .brand-lockup > div:last-child { min-width: 0; }
.auth-main h1 { max-width: 100%; font-size: clamp(1.25rem, 3.2vw, 1.85rem); line-height: 1.15; overflow-wrap: anywhere; }

/* Landing page: one clear promise, proof through the demos and a single primary action. */
.auth-main { justify-content: flex-start; gap: 16px; }
.auth-eyebrow { margin: 8px 0 -4px; color: var(--gold-deep); font-size: .7rem; font-weight: 900; letter-spacing: .13em; }
.auth-headline { max-width: 14ch; margin: 0; color: var(--ink); font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: .99; letter-spacing: -.045em; }
.auth-copy { max-width: 52ch; font-size: .98rem; line-height: 1.55; }
.auth-outcomes { display: grid; gap: 10px; margin: 2px 0; padding: 0; list-style: none; }
.auth-outcomes li { display: grid; gap: 2px; padding-left: 16px; border-left: 3px solid var(--gold); }
.auth-outcomes strong { color: var(--ink); font-size: .86rem; }
.auth-outcomes span { color: var(--muted); font-size: .78rem; line-height: 1.35; }
.auth-form-copy { margin: -5px 0 2px; color: var(--muted); font-size: .83rem; line-height: 1.45; }
.auth-actions { grid-template-columns: 1fr; }
.auth-actions .primary-button { min-height: 48px; font-size: .95rem; }
.auth-actions .secondary-button { border: 0; background: transparent; box-shadow: none; }
.demo-entry { margin: 4px 0; }
.demo-entry h2 { color: var(--ink); }
.demo-size-links a { flex: 1 1 125px; justify-content: center; text-align: center; }
@media (max-width: 760px) {
  .auth-headline { max-width: 18ch; font-size: clamp(1.8rem, 9vw, 2.55rem); }
  .auth-main { gap: 14px; }
  .auth-outcomes { gap: 8px; }
}

/* Direct compliance updates fit comfortably on phones. */
#complianceEditDialog { width: min(460px, calc(100% - 24px)); }
#complianceEditDialog .toggle-row { display: flex; align-items: center; gap: 10px; }
#complianceEditDialog .toggle-row input { width: auto; }
#complianceEditAddress { margin: 0; overflow-wrap: anywhere; }
#complianceEditError:empty { display: none; }
#complianceEditError { color: #a32929; margin: 0; }

#complianceEditDialog label[hidden] { display: none; }
