@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.65850a373e25.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin.782150e6836b.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --color-bg: #0b1016;
  --color-surface: #111923;
  --color-elevated: #182230;
  --color-border: #263241;
  --color-text: #e7edf4;
  --color-text-muted: #8492a3;
  --color-primary: #0058a3;
  --color-primary-bright: #1683d8;
  --color-highlight: #ffda1a;
  --color-success: #4cc38a;
  --color-warning: #f59e42;
  --color-danger: #f05d68;
  --color-document: #a78bfa;
  --color-info: #55c2ff;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-overlay: 0 16px 40px rgb(0 0 0 / 35%);
  --font-interface: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-data: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--color-bg);
  font-size: 16px;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-interface);
  font-size: 0.9375rem;
  line-height: 1.5;
}

a {
  color: var(--color-primary-bright);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--color-primary-bright);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--color-highlight);
  color: #151515;
  font-weight: 700;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 252px;
  flex-direction: column;
  border-right: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: var(--space-6) var(--space-4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%);
}

.brand-mark img {
  width: 19px;
  height: 19px;
  filter: brightness(0) invert(1);
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.brand-name span {
  color: var(--color-highlight);
}

.context-switcher {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-8) 0 var(--space-6);
}

.workspace-context {
  margin-bottom: var(--space-3);
}

.property-context {
  margin-top: 0;
}

.context-label,
.eyebrow,
.section-kicker {
  color: var(--color-text-muted);
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.context-value {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-elevated);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}

.context-value img {
  width: 16px;
  opacity: 0.65;
  filter: brightness(0) invert(1);
}

.context-form {
  display: block;
}

.context-control,
.mobile-property-form {
  display: flex;
  gap: var(--space-2);
}

.context-form select {
  min-width: 0;
  font-size: 0.8125rem;
}

.context-submit,
.mobile-property-form button {
  min-height: 42px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-elevated);
  color: var(--color-text);
  cursor: pointer;
}

.primary-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.primary-nav a {
  position: relative;
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: var(--space-3);
  padding: 0 var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.primary-nav a:hover {
  background: var(--color-elevated);
  color: var(--color-text);
}

.primary-nav a.active {
  background: rgb(22 131 216 / 12%);
  color: var(--color-primary-bright);
}

.primary-nav a.active::before {
  position: absolute;
  inset: 8px auto 8px -16px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--color-highlight);
  content: "";
}

.primary-nav img,
.mobile-nav img {
  width: 18px;
  height: 18px;
  opacity: 0.82;
  filter: brightness(0) invert(1);
}

.primary-nav a.active img,
.mobile-nav a.active img {
  filter: invert(52%) sepia(98%) saturate(2082%) hue-rotate(177deg) brightness(91%) contrast(86%);
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: auto;
  padding: var(--space-4) var(--space-3) 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-data);
  font-size: 0.75rem;
}

.account-email {
  overflow: hidden;
  color: var(--color-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.account-actions a,
.text-button,
.text-link {
  border: 0;
  background: transparent;
  color: var(--color-primary-bright);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.account-actions form,
.inline-form {
  display: inline-flex;
  margin: 0;
}

.environment-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-text);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 3px rgb(76 195 138 / 12%);
}

.mobile-bar,
.mobile-nav {
  display: none;
}

.main-content {
  width: min(calc(100% - 252px), 1440px);
  min-height: 100vh;
  margin-left: 252px;
  padding: var(--space-8) clamp(1.5rem, 4vw, 4rem) 4rem;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--color-primary-bright);
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button:hover { filter: brightness(1.12); }

.button-primary {
  background: var(--color-primary);
  color: white;
}

.button-secondary {
  border-color: var(--color-border);
  background: var(--color-elevated);
  color: var(--color-text);
  text-decoration: none;
}

.button-danger {
  background: var(--color-danger);
  color: #151515;
}

.button-full {
  width: 100%;
  text-decoration: none;
}

.button.disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.metric-card,
.panel {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.metric-card {
  position: relative;
  overflow: hidden;
  padding: var(--space-6);
}

.metric-link {
  color: inherit;
  text-decoration: none;
}

.metric-link:hover {
  border-color: var(--color-primary-bright);
}

.dashboard-filter-panel {
  margin-bottom: var(--space-4);
}

.dashboard-activity {
  min-height: 320px;
}

.metric-card.featured::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--color-highlight);
  content: "";
}

.metric-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

.metric-heading img {
  width: 18px;
  height: 18px;
  opacity: 0.65;
  filter: brightness(0) invert(1);
}

.metric-value {
  display: block;
  margin: var(--space-3) 0 var(--space-1);
  font-family: var(--font-data);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.metric-value.neutral {
  color: var(--color-text);
}

.amount-income {
  color: var(--color-success);
}

.amount-expense {
  color: var(--color-danger);
}

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

.metric-context {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.8fr);
  gap: var(--space-4);
}

.panel {
  padding: var(--space-6);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.section-kicker {
  display: block;
  margin-bottom: var(--space-1);
}

.panel-copy {
  max-width: 65ch;
  margin-bottom: var(--space-6);
  color: var(--color-text-muted);
}

.badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  border-radius: 999px;
  font-family: var(--font-data);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-info {
  background: rgb(85 194 255 / 12%);
  color: var(--color-info);
}

.badge-muted {
  background: var(--color-elevated);
  color: var(--color-text-muted);
}

.badge-document { background: rgb(167 139 250 / 14%); color: var(--color-document); }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.pagination, .collection-heading, .breadcrumbs { display: flex; align-items: center; gap: var(--space-3); }
.pagination { justify-content: center; margin-top: var(--space-6); }
.record-count { margin: 0 0 var(--space-4); color: var(--color-text-muted); font-family: var(--font-data); }
.breadcrumbs { flex-wrap: wrap; margin-bottom: var(--space-4); color: var(--color-text-muted); }
.error-page { max-width: 680px; }
.error-page h2 { margin-bottom: var(--space-3); font-size: 1.5rem; }
.required-note { color: var(--color-text-muted); font-size: .75rem; }
.required-note span { color: var(--color-danger); }
.error-summary { padding: var(--space-3); border: 1px solid var(--color-danger); border-radius: var(--radius-md); }
.htmx-indicator { display: none; color: var(--color-text-muted); }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-flex; }
.htmx-request #results, #results.htmx-request { opacity: .55; }
#results { transition: opacity 160ms ease; }

.impersonation-banner {
  position: fixed;
  z-index: 1000;
  right: var(--space-4);
  bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  max-width: calc(100vw - 2 * var(--space-4));
  padding: var(--space-3) var(--space-4);
  border: 2px solid #7c2d12;
  border-radius: var(--radius-md);
  background: #fff7ed;
  color: #431407;
  box-shadow: var(--shadow-lg);
}

.impersonation-banner form {
  margin: 0;
}

.impersonation-banner button {
  min-height: 38px;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  background: #7c2d12;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.impersonation-banner .impersonation-admin-button {
  border: 1px solid #7c2d12;
  background: transparent;
  color: #7c2d12;
}

@media (max-width: 650px) {
  .impersonation-banner {
    right: var(--space-2);
    bottom: calc(72px + var(--space-2));
    left: var(--space-2);
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

.setup-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.setup-list li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  min-height: 66px;
  border-top: 1px solid var(--color-border);
}

.setup-number,
.setup-state {
  font-family: var(--font-data);
  font-size: 0.75rem;
}

.setup-number {
  color: var(--color-primary-bright);
}

.setup-list strong,
.setup-list small {
  display: block;
}

.setup-list small {
  margin-top: 2px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.setup-state {
  color: var(--color-highlight);
  font-weight: 700;
}

.setup-state.complete {
  color: var(--color-success);
}

.setup-state.muted {
  color: var(--color-text-muted);
  font-weight: 500;
}

.activity-panel {
  display: flex;
  min-height: 350px;
  flex-direction: column;
}

.empty-state {
  display: flex;
  flex: 1;
  min-height: 240px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: var(--space-4);
  place-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-elevated);
}

.empty-icon img {
  width: 24px;
  height: 24px;
  opacity: 0.7;
  filter: brightness(0) invert(1);
}

.empty-state h2 {
  margin-bottom: var(--space-2);
}

.empty-state p {
  max-width: 46ch;
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.text-action {
  margin-top: var(--space-4);
  color: var(--color-primary-bright);
  font-size: 0.8125rem;
  font-weight: 650;
}

.collection-panel {
  min-height: min(62vh, 620px);
}

.property-summary {
  margin-bottom: var(--space-4);
}

.property-summary h2 {
  margin: var(--space-2) 0;
  font-size: 1.35rem;
}

.property-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.property-related-grid .empty-state {
  min-height: 210px;
}

.notice {
  padding: var(--space-4);
  border: 1px solid var(--color-info);
  border-radius: var(--radius-md);
  background: rgb(85 194 255 / 8%);
}

.notice p {
  margin: var(--space-1) 0 0;
  color: var(--color-text-muted);
}

.notice-warning {
  border-color: var(--color-warning);
  background: rgb(245 158 66 / 8%);
}

.message-list {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.flash-message {
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-info);
  border-radius: var(--radius-md);
  background: rgb(85 194 255 / 8%);
}

.flash-success {
  border-color: var(--color-success);
  background: rgb(76 195 138 / 8%);
}

.flash-error {
  border-color: var(--color-danger);
  background: rgb(240 93 104 / 8%);
}

.auth-body {
  min-height: 100vh;
}

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

.auth-brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 6vw, 5rem);
  border-right: 1px solid var(--color-border);
  background:
    linear-gradient(145deg, rgb(0 88 163 / 20%), transparent 55%),
    var(--color-surface);
}

.auth-brand-panel h1 {
  max-width: 14ch;
  margin-bottom: var(--space-4);
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.auth-brand-panel > div > p:last-child,
.auth-footnote,
.form-heading p {
  color: var(--color-text-muted);
}

.auth-form-panel {
  display: grid;
  place-items: center;
  padding: var(--space-8);
}

.auth-card {
  width: min(100%, 460px);
}

.form-heading {
  margin-bottom: var(--space-6);
}

.form-heading h2 {
  margin-bottom: var(--space-2);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.form-heading p:last-child {
  margin-bottom: 0;
}

.stacked-form {
  display: grid;
  gap: var(--space-4);
}

.form-field {
  display: grid;
  gap: var(--space-2);
}

.form-field label {
  font-size: 0.8125rem;
  font-weight: 650;
}

.form-field label span {
  color: var(--color-danger);
}

.field-help {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

.field-help ul,
.form-errors ul {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-6);
}

.field-error,
.form-errors {
  color: var(--color-danger);
  font-size: 0.8125rem;
}

.has-error input,
.has-error select {
  border-color: var(--color-danger);
}

.form-meta,
.form-alternative {
  font-size: 0.8125rem;
}

.form-meta {
  text-align: right;
}

.form-alternative {
  margin: var(--space-6) 0 0;
  color: var(--color-text-muted);
  text-align: center;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.form-panel {
  max-width: 680px;
}

.filter-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: var(--space-4);
}

.filter-form > div {
  display: grid;
  gap: var(--space-2);
}

.filter-form label {
  font-size: 0.8125rem;
  font-weight: 650;
}

.workspace-list {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.workspace-list button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
}

.workspace-list strong,
.workspace-list small {
  display: block;
}

.workspace-list small {
  margin-top: var(--space-1);
  color: var(--color-text-muted);
}

.table-panel + .table-panel {
  margin-top: var(--space-4);
}

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

.record-count,
.data-text {
  color: var(--color-text-muted);
  font-family: var(--font-data);
  font-size: 0.75rem;
}

td strong,
td small {
  display: block;
}

td small {
  color: var(--color-text-muted);
}

.inline-form {
  align-items: center;
  gap: var(--space-2);
}

.inline-form select {
  min-width: 108px;
}

.actions-column {
  text-align: right;
  white-space: nowrap;
}

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

.badge-warning {
  background: rgb(245 158 66 / 12%);
  color: var(--color-warning);
}

.invitation-address {
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  text-align: center;
}

.auth-card > .button + .button,
.auth-card > form + .button,
.auth-card > .notice + .button {
  margin-top: var(--space-3);
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-elevated);
  color: var(--color-text);
  font: inherit;
}

input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.form-field ul {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.form-field li label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

th {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 650;
}

.numeric {
  font-family: var(--font-data);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

@media (max-width: 900px) {
  .filter-form {
    grid-template-columns: 1fr;
  }

  .filter-form .button {
    justify-self: start;
  }

  .sidebar {
    display: none;
  }

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    height: 64px;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-4);
    border-bottom: 1px solid var(--color-border);
    background: rgb(17 25 35 / 96%);
    backdrop-filter: blur(12px);
  }

  .mobile-context {
    color: var(--color-text-muted);
    font-family: var(--font-data);
    font-size: 0.75rem;
  }

  .mobile-property-form {
    width: min(48vw, 180px);
  }

  .mobile-property-form select,
  .mobile-property-form button {
    min-height: 36px;
    font-size: 0.75rem;
  }

  .main-content {
    width: 100%;
    margin-left: 0;
    padding: var(--space-6) var(--space-4) 96px;
  }

  .mobile-nav {
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 68px;
    border-top: 1px solid var(--color-border);
    background: rgb(17 25 35 / 98%);
  }

  .mobile-nav a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    color: var(--color-text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    text-decoration: none;
  }

  .mobile-nav a.active {
    color: var(--color-primary-bright);
  }

  .mobile-nav a.active::before {
    position: absolute;
    inset: 0 25% auto;
    height: 2px;
    background: var(--color-highlight);
    content: "";
  }

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

  .property-related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-height: 240px;
    padding: var(--space-6);
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .auth-brand-panel > div {
    margin-top: var(--space-8);
  }

  .auth-brand-panel h1 {
    font-size: 2rem;
  }

  .auth-footnote {
    display: none;
  }

  .auth-form-panel {
    padding: var(--space-8) var(--space-4);
  }
}

@media (max-width: 650px) {
  .page-header {
    align-items: flex-start;
  }

  .page-header .button {
    min-height: 38px;
    padding-inline: var(--space-3);
    font-size: 0.8125rem;
  }

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

  .metric-card {
    padding: var(--space-4);
  }

  .panel {
    padding: var(--space-4);
  }

  .panel-heading {
    flex-direction: column;
  }

  .empty-state {
    padding: var(--space-6) var(--space-3);
  }

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

  .responsive-table thead {
    display: none;
  }

  .responsive-table tr {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
  }

  .responsive-table td {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    border: 0;
    text-align: left;
  }

  .responsive-table td::before {
    color: var(--color-text-muted);
    content: attr(data-label);
    font-size: 0.72rem;
    font-weight: 650;
  }

  .actions-column {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
