:root {
  --bg: #e8eef6;
  --panel: #ffffff;
  --panel-muted: #eef4fb;
  --text: #102a43;
  --text-soft: #43596f;
  --accent: #0d9fd1;
  --accent-deep: #087da8;
  --accent-soft: #cdeefa;
  --warn: #d97706;
  --danger: #cf2e2e;
  --success: #0f9f6e;
  --border: #aebfd1;
  --border-strong: #869db4;
  --table-head: #d7edf8;
  --table-row-alt: #e7edf4;
  --shadow: 0 18px 42px rgba(16, 42, 67, 0.14);
  --compact-feature-breakpoint: 400px;
}

* { box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--text);
  line-height: 1.45;
  background:
    radial-gradient(circle at top left, rgba(13, 159, 209, 0.18), transparent 28%),
    linear-gradient(180deg, #f8fbfd 0%, var(--bg) 100%);
}

body.public-landing-page {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 12% 8%, rgba(13, 159, 209, 0.28), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(255, 248, 217, 0.92), transparent 24rem),
    linear-gradient(135deg, #f6fbff 0%, #e8f0f7 52%, #dce9f3 100%);
  overflow-x: hidden;
}

body.public-landing-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(247, 251, 253, 0.05), rgba(247, 251, 253, 0.48)),
    url("/images/auckland-rental-skyline.svg") center bottom / cover no-repeat;
  opacity: 0.72;
}

body.public-landing-page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(13, 159, 209, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 12%, rgba(255, 248, 217, 0.66), transparent 24rem),
    rgba(255, 255, 255, 0.18);
}

body.public-landing-page > :not(.public-rental-lightbox) {
  position: relative;
  z-index: 1;
}

.public-landing-header {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.public-landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: #0d3658;
  text-decoration: none;
}

.public-landing-brand-icon {
  width: 2.7rem;
  height: 2.7rem;
  filter: drop-shadow(0 10px 18px rgba(8, 125, 168, 0.18));
}

.public-landing-brand strong,
.public-landing-brand small {
  display: block;
}

.public-landing-brand strong {
  font-size: 1.05rem;
}

.public-landing-brand small {
  color: var(--text-soft);
}

body.public-landing-page .public-landing-brand {
  display: none;
}

.public-landing-login,
.public-landing-primary,
.public-landing-secondary,
.public-landing-exit,
.public-rental-view,
.public-rental-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.public-landing-login,
.public-landing-secondary,
.public-landing-exit,
.public-rental-view {
  border: 1px solid #9fc0df;
  background: #eef7fc;
  color: #075f81;
}

.public-landing-exit {
  display: none;
  font: inherit;
  cursor: pointer;
}

html.mobile-device .public-landing-exit {
  display: inline-flex;
}

html.mobile-device .public-landing-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 0.75rem;
}

html.mobile-device .public-landing-footer .public-landing-exit,
html.mobile-device .public-landing-footer .public-landing-login {
  width: 100%;
  height: 2.85rem;
  min-height: 2.85rem;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 0 0.75rem;
  line-height: 1;
  white-space: nowrap;
}

html.mobile-device .public-landing-footer .public-landing-exit {
  appearance: none;
}

.public-landing-primary,
.public-rental-apply {
  border: 1px solid #087da8;
  background: linear-gradient(135deg, #087da8, #0d9fd1);
  color: #fff;
  box-shadow: 0 16px 28px rgba(8, 125, 168, 0.2);
}

.public-landing-login:hover,
.public-landing-primary:hover,
.public-landing-secondary:hover,
.public-landing-exit:hover,
.public-rental-view:hover,
.public-rental-apply:hover {
  transform: translateY(-1px);
}

.public-landing-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.4rem 0 4rem;
}

.public-landing-footer {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 2rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.public-landing-hero {
  min-height: 20rem;
  padding: clamp(1.6rem, 4vw, 3.1rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 18rem);
  gap: 1.5rem;
  align-items: center;
  border: 1px solid rgba(134, 157, 180, 0.5);
  border-radius: 1.6rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(232, 244, 251, 0.84)),
    repeating-linear-gradient(45deg, rgba(8, 125, 168, 0.045) 0 1px, transparent 1px 14px);
  box-shadow: var(--shadow);
}

.public-landing-eyebrow {
  margin: 0 0 0.7rem;
  color: #087da8;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.public-landing-hero h1 {
  max-width: 18ch;
  margin: 0;
  color: #0b2f4e;
  font-size: clamp(2.3rem, 4.8vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.public-landing-intro {
  max-width: 38rem;
  margin: 1rem 0 0;
  color: #31495f;
  font-size: clamp(1rem, 1.6vw, 1.18rem);
}

.public-landing-subheading {
  margin: 0.75rem 0 0;
  color: #075f81;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  font-weight: 800;
}

.public-landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.public-landing-hero-card {
  padding: 1.1rem;
  border: 1px solid #9fc0df;
  border-radius: 1.2rem;
  background: #fff8d9;
  box-shadow: 0 14px 24px rgba(95, 75, 24, 0.1);
}

.public-landing-hero-card strong {
  display: block;
  margin-top: 0.45rem;
  color: #0d3658;
  font-size: 3.6rem;
  line-height: 1;
}

.public-landing-hero-card .public-landing-availability-status {
  max-width: 12rem;
  font-size: clamp(1.8rem, 3.2vw, 2.65rem);
  line-height: 1.04;
}

.public-landing-hero-card p {
  margin: 0.5rem 0 0;
  color: #5f4b18;
  font-weight: 700;
}

.public-landing-section {
  margin-top: 1.1rem;
  padding: clamp(1rem, 2.2vw, 1.55rem);
  border: 1px solid rgba(134, 157, 180, 0.48);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 32px rgba(16, 42, 67, 0.08);
}

.public-landing-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.public-landing-section h2,
.public-landing-section h3 {
  margin: 0;
  color: #0d3658;
}

.public-rental-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.public-rental-card {
  min-height: clamp(18rem, 34vw, 28rem);
  padding: 1rem;
  display: grid;
  grid-template-columns: minmax(15rem, 1fr) minmax(0, 3fr);
  gap: 1rem;
  align-items: stretch;
  border: 1px solid #bfd2e4;
  border-radius: 1.2rem;
  background: linear-gradient(180deg, #ffffff, #f1f6fb);
  box-shadow: 0 14px 28px rgba(16, 42, 67, 0.08);
}

.public-rental-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.7rem;
  padding: clamp(0.4rem, 1.4vw, 1rem);
}

.public-rental-card-top,
.public-rental-card-bottom {
  display: grid;
  gap: 0.55rem;
}

.public-rental-card-top h3 {
  margin: 0;
}

.public-rental-card-top p {
  margin: 0;
}

.public-rental-card-photo {
  width: 100%;
  height: 100%;
  min-height: 16rem;
  object-fit: cover;
  border-radius: 0.95rem;
  border: 1px solid #bfd2e4;
}

.public-rental-card-photo-placeholder {
  display: grid;
  place-items: center;
  background: #eef7fc;
  color: var(--text-soft);
  font-weight: 900;
}

.public-rental-unit {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.3rem 0.7rem;
  border: 1px solid #9fc0df;
  border-radius: 999px;
  background: #fff8d9;
  color: #5f4b18;
  font-size: 0.78rem;
  font-weight: 900;
}

.public-rental-card .public-rental-unit {
  display: none;
}

.public-rental-card-feature-pill {
  align-self: center;
  width: min(100%, 18rem);
  padding: 0.75rem 0.9rem;
  border: 1px solid #9fc0df;
  border-radius: 1rem;
  background: #fff8d9;
  color: #5f4b18;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.public-rental-card-feature-pill ul {
  display: grid;
  gap: 0.32rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.88rem;
  font-weight: 800;
}

.public-rental-card-feature-pill li,
.public-rental-feature-pills li {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
}

.public-rental-feature-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 1.05rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(8, 125, 168, 0.26);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #075f81;
  font-size: 0.78rem;
  line-height: 1;
  font-weight: 900;
}

.public-rental-feature-icon::before {
  display: block;
  content: "";
  width: 0.68rem;
  height: 0.68rem;
  background: currentColor;
  -webkit-mask: var(--feature-icon) center / contain no-repeat;
  mask: var(--feature-icon) center / contain no-repeat;
}

.public-rental-feature-icon.is-bed {
  --feature-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 11V5h2v4h6V6h7a3 3 0 0 1 3 3v8h-2v-3H5v3H3v-6Zm2 1h14V9a1 1 0 0 0-1-1h-5v3H5v1Z'/%3E%3C/svg%3E");
}

.public-rental-feature-icon.is-bath {
  --feature-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 4a3 3 0 0 1 6 0v1h-2V4a1 1 0 0 0-2 0v7h12v2a6 6 0 0 1-4 5.65V21h-2v-2H9v2H7v-2.35A6 6 0 0 1 3 13v-2h4V4Zm-2 9a4 4 0 0 0 4 4h6a4 4 0 0 0 4-4H5Z'/%3E%3C/svg%3E");
}

.public-rental-feature-icon.is-parking {
  --feature-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 3h7a5 5 0 0 1 0 10h-3v8H7V3Zm4 4v2h3a1 1 0 0 0 0-2h-3Z'/%3E%3C/svg%3E");
}

.public-rental-feature-icon.is-furnishing {
  --feature-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 10V7a3 3 0 0 1 3-3h6a3 3 0 0 1 3 3v3h1a2 2 0 0 1 2 2v6h-2v2h-2v-2H7v2H5v-2H3v-6a2 2 0 0 1 2-2h1Zm2 0h8V7a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3Zm-3 2v4h14v-4h-2v2H7v-2H5Z'/%3E%3C/svg%3E");
}

.public-rental-feature-icon.is-tenants {
  --feature-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8Zm0 2c3.31 0 6 2.24 6 5v2H3v-2c0-2.76 2.69-5 6-5Zm7.5-1a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Zm0 2c2.49 0 4.5 1.79 4.5 4v2h-4v-2c0-1.52-.67-2.91-1.78-4h1.28Z'/%3E%3C/svg%3E");
}

.public-rental-feature-icon.is-pets {
  --feature-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm14 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0ZM10 7a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm8 0a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm-6 5c3 0 6 3.2 6 6.1 0 1.4-1.1 2.4-2.5 2.4-1.2 0-2.1-.8-3.5-.8s-2.3.8-3.5.8C7.1 20.5 6 19.5 6 18.1 6 15.2 9 12 12 12Z'/%3E%3C/svg%3E");
}

.public-rental-feature-icon.is-smokers {
  --feature-icon: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.7 2.3 21.7 20.3l-1.4 1.4-2.7-2.7H3v-4h10.6L2.3 3.7l1.4-1.4ZM20 15h1v4h-1v-4Zm-3 0h2v4h-.6L17 17.6V15ZM5 17h10.6l-1-1H5v1Zm10-8h3a3 3 0 0 1 3 3h-2a1 1 0 0 0-1-1h-1.6L15 9.6V9Zm-5-4h4a3 3 0 0 1 3 3h-2a1 1 0 0 0-1-1h-2L10 5Z'/%3E%3C/svg%3E");
}

.public-rental-card p,
.public-landing-listing-panel p,
.public-landing-empty p {
  color: var(--text-soft);
}

.public-rental-rent {
  margin: 0;
  color: #075f81 !important;
  font-weight: 900;
}

.public-rental-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.4rem;
}

.public-rental-apply.is-disabled {
  border-color: #c6d4df;
  background: #eef4fb;
  color: #52687d;
  box-shadow: none;
}

.public-landing-empty {
  padding: 2rem;
  border: 1px dashed #9fc0df;
  border-radius: 1.1rem;
  background: #f6fbff;
}

.public-landing-listing-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 20rem);
  gap: 1rem;
  align-items: stretch;
}

.public-landing-iframe-placeholder {
  min-height: 8rem;
  display: grid;
  place-items: center;
  border: 1px dashed #9fc0df;
  border-radius: 1.2rem;
  background:
    linear-gradient(135deg, rgba(255, 248, 217, 0.8), rgba(238, 247, 252, 0.9));
  color: #5f4b18;
  font-weight: 900;
  text-align: center;
}

.public-rental-detail-hero {
  padding: clamp(1.2rem, 3vw, 2rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  border: 1px solid rgba(134, 157, 180, 0.48);
  border-radius: 1.4rem;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(238, 247, 252, 0.9)),
    repeating-linear-gradient(45deg, rgba(8, 125, 168, 0.04) 0 1px, transparent 1px 14px);
  box-shadow: 0 16px 32px rgba(16, 42, 67, 0.08);
}

.public-rental-detail-main {
  min-width: 0;
  display: contents;
}

.public-rental-detail-main > .public-landing-eyebrow,
.public-rental-detail-main > h1,
.public-rental-detail-main > .public-landing-subheading,
.public-rental-detail-main > .public-landing-intro {
  grid-column: 1;
}

.public-rental-detail-hero h1 {
  margin: 0;
  color: #0b2f4e;
  font-size: clamp(1.45rem, 2.8vw, 2.45rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.public-rental-detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
  grid-column: 1 / -1;
}

.public-rental-detail-facts span,
.public-rental-detail-actions > span {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid #8fb4d7;
  border-radius: 999px;
  background: #fff8d9;
  color: #0d3658;
  font-weight: 900;
}

.public-rental-feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
  grid-column: 1 / -1;
}

.public-rental-feature-pills li {
  min-height: 1.72rem;
  padding: 0.28rem 0.52rem;
  border: 1px solid #9fc0df;
  border-radius: 999px;
  background: #eef7fc;
  color: #0d3658;
  font-size: 0.82rem;
  font-weight: 800;
}

.public-rental-detail-actions {
  display: grid;
  gap: 0.65rem;
  justify-items: stretch;
  align-self: start;
  grid-column: 2;
  grid-row: 1 / span 4;
}

.public-rental-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.public-rental-carousel,
.public-rental-map-card {
  padding: 1rem;
  border: 1px solid rgba(134, 157, 180, 0.48);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 32px rgba(16, 42, 67, 0.08);
}

.public-rental-carousel-frame {
  position: relative;
  overflow: hidden;
  min-height: clamp(16rem, 46vw, 32rem);
  border-radius: 1rem;
  background: #0d3658;
}

.public-rental-carousel-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.22s ease, transform 0.22s ease;
  cursor: zoom-in;
}

.public-rental-carousel-frame img.is-active {
  opacity: 1;
  transform: scale(1);
}

.public-rental-carousel-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.public-rental-carousel-controls button {
  min-height: 2.35rem;
  border: 1px solid #9fc0df;
  border-radius: 999px;
  background: #eef7fc;
  color: #075f81;
  font-weight: 900;
  cursor: pointer;
}

.public-rental-carousel-controls span {
  text-align: center;
  color: #0d3658;
  font-weight: 900;
}

.public-rental-carousel-empty {
  min-height: 18rem;
  display: grid;
  place-items: center;
  border: 1px dashed #9fc0df;
  border-radius: 1rem;
  background: #f6fbff;
  color: var(--text-soft);
  font-weight: 900;
}

.public-rental-map-card h2 {
  margin: 0;
}

.public-rental-map-card iframe {
  width: 100%;
  min-height: 21rem;
  margin-top: 0.8rem;
  border: 1px solid #bfd2e4;
  border-radius: 1rem;
}

body.public-lightbox-open {
  overflow: hidden;
}

.public-rental-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem);
  background: rgba(5, 23, 38, 0.88);
}

body.public-landing-page .public-rental-lightbox {
  position: fixed;
  z-index: 3000;
}

.public-rental-lightbox[hidden] {
  display: none;
}

.public-rental-lightbox figure {
  margin: 0;
  min-width: 0;
  display: grid;
  gap: 0.7rem;
  justify-items: center;
}

.public-rental-lightbox img {
  max-width: min(100%, 1180px);
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 1rem;
  background: #0d3658;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.public-rental-lightbox figcaption {
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 900;
}

.public-rental-lightbox-close,
.public-rental-lightbox-nav {
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(238, 247, 252, 0.92);
  color: #075f81;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.2);
}

.public-rental-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
}

.public-rental-lightbox-nav {
  min-width: 6.5rem;
  min-height: 2.7rem;
  border-radius: 999px;
}

.public-rental-advert-body {
  color: #102a43;
}

.public-rental-advert-body img {
  max-width: 100%;
  height: auto;
}

.public-rental-amenities-panel h2 {
  margin: 0 0 1rem;
  color: #0d3658;
}

.public-rental-amenities-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.25rem;
  padding: 0.95rem;
  border: 1px solid rgba(143, 180, 215, 0.72);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.public-rental-amenity-section h3 {
  margin: 0 0 0.55rem;
  color: #0d3658;
  font-size: 1rem;
}

.public-rental-amenity-section ul {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.public-rental-amenity-section li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.4rem 0.55rem;
  border-radius: 0.75rem;
  background: rgba(238, 247, 252, 0.86);
  color: #0d3658;
  font-size: 0.9rem;
  font-weight: 500;
}

.public-rental-amenity-section li span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.public-rental-amenity-section li strong {
  color: #5f4b18;
  font-weight: 650;
  white-space: nowrap;
}

.public-rental-view-count-panel {
  display: grid;
  gap: 0.35rem;
  background:
    linear-gradient(135deg, rgba(255, 248, 217, 0.88), rgba(238, 247, 252, 0.94));
}

.public-rental-view-count-panel h2 {
  margin: 0;
  color: #0d3658;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.public-rental-view-count-panel p:last-child {
  margin: 0;
  color: #5f4b18;
  font-weight: 750;
}

.available-rental-nearby-editor {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid #d9e6ec;
  border-radius: 0.9rem;
  background: #f7fbfd;
}

.available-rental-nearby-editor h3 {
  margin: 0;
  color: #153e5c;
}

.available-rental-nearby-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.available-rental-nearby-fields textarea {
  min-height: 5.8rem;
  resize: vertical;
}

.public-rental-application-card {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.public-rental-application-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 15rem);
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}

.public-rental-application-sidebar {
  position: sticky;
  top: 1rem;
  padding: 0.85rem;
  border: 1px solid #bfd2e4;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(16, 42, 67, 0.08);
}

.public-rental-application-progress {
  display: grid;
  gap: 0.35rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  border: 1px solid #bfd2e4;
  border-radius: 0.9rem;
  background: #f6fbff;
  padding: 0.4rem;
}

.public-rental-application-progress button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  min-height: 2.3rem;
  padding: 0.35rem 0.7rem 0.35rem 0.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #43596f;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.public-rental-application-progress button span {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #e4edf5;
  color: #0d3658;
  font-size: 0.78rem;
}

.public-rental-application-progress button.is-active {
  border-color: #8fb4d7;
  background: #fff8d9;
  color: #0d3658;
}

.public-rental-application-progress button.is-active span,
.public-rental-application-progress button.is-complete span {
  background: #087da8;
  color: #fff;
}

.public-rental-application-form {
  display: grid;
  grid-template-rows: minmax(34rem, auto) auto;
  gap: 1rem;
  margin-top: 0;
}

.public-rental-application-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0;
  padding: 1rem;
  border: 1px solid #bfd2e4;
  border-radius: 1rem;
  background: #f8fbfd;
  box-shadow: 0 18px 34px rgba(16, 42, 67, 0.08);
  animation: public-application-step-in 180ms ease-out both;
  min-height: 34rem;
  align-content: start;
}

.public-rental-application-form fieldset[hidden] {
  display: none;
}

@keyframes public-application-step-in {
  from {
    opacity: 0;
    transform: translateX(1.1rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.public-rental-application-form legend {
  padding: 0 0.45rem;
  color: #075f81;
  font-size: 1.02rem;
  font-weight: 900;
}

.public-rental-application-form label {
  display: grid;
  gap: 0.35rem;
  color: #0d3658;
  font-weight: 800;
}

.public-rental-application-form input,
.public-rental-application-form select,
.public-rental-application-form textarea {
  width: 100%;
  border: 1px solid #9fc0df;
  border-radius: 0.75rem;
  padding: 0.7rem 0.8rem;
  color: #102a43;
  font: inherit;
}

.public-rental-application-form fieldset .full-span,
.public-rental-application-actions {
  grid-column: 1 / -1;
}

.public-rental-checkbox-label {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.8rem;
  border: 1px solid #9fc0df;
  border-radius: 0.85rem;
  background: #eef7fc;
}

.public-rental-checkbox-label input {
  width: auto;
  margin-top: 0.2rem;
}

.public-rental-application-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  align-self: end;
  min-height: 3.4rem;
  padding: 0.75rem;
  border: 1px solid #bfd2e4;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(16, 42, 67, 0.06);
}

.available-rentals-shell .helper-text a,
.available-rentals-shell a.helper-text {
  display: block;
  color: #087da8;
  font-weight: 700;
}

.available-rental-photo-strip {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.available-rental-photo-strip img {
  width: 2.8rem;
  height: 2.1rem;
  object-fit: cover;
  border: 1px solid #bfd2e4;
  border-radius: 0.45rem;
  background: #eef4fb;
}

.available-rental-form .tox-tinymce {
  border-color: #bfd2e4;
  border-radius: 0 0 0.85rem 0.85rem;
}

.available-rental-listing-fields {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.75rem;
}

.available-rental-listing-fields label {
  grid-column: span 4;
}

.available-rental-listing-fields label:nth-child(n + 4) {
  grid-column: span 3;
}

.available-rental-photo-manager,
.available-rental-preview-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.8rem;
}

.available-rental-photo-admin,
.available-rental-preview-photos img {
  border: 1px solid #bfd2e4;
  border-radius: 0.9rem;
  background: #f6fbff;
  overflow: hidden;
}

.available-rental-photo-admin img,
.available-rental-preview-photos img {
  width: 100%;
  height: 8rem;
  object-fit: cover;
  display: block;
}

.lease-condition-photo-thumb {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: zoom-in;
}

.lease-condition-photo-admin .available-rental-pending-meta,
.lease-condition-photo-admin .property-document-actions {
  padding: 0.45rem 0.55rem;
}

.lease-condition-photo-manager {
  grid-template-columns: repeat(auto-fill, minmax(9rem, 10rem));
  justify-content: start;
}

.lease-condition-photo-upload-form {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) auto;
  align-items: stretch;
  gap: 0.75rem;
}

.lease-condition-photo-upload-form .available-rental-photo-dropzone {
  min-height: 3.25rem;
  justify-items: start;
  padding: 0.55rem 0.7rem;
  text-align: left;
}

.lease-condition-photo-upload-form .modal-actions {
  align-self: stretch;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}

.lease-condition-photo-upload-form .modal-actions button {
  margin: 0;
  padding: 0.68rem 0.8rem;
  white-space: nowrap;
}

.lease-condition-photo-admin .available-rental-pending-meta {
  display: grid;
  gap: 0.1rem;
}

.lease-condition-photo-admin .available-rental-pending-meta small {
  color: #607a94;
  font-size: 0.74rem;
}

.lease-condition-photo-admin .property-document-actions {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.lease-condition-photo-admin .property-document-actions form {
  padding: 0;
}

.lease-condition-photo-admin .property-document-actions .btn-link {
  margin: 0;
}

.lease-condition-photo-admin .property-document-actions .inspection-photo-carousel-action-button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 2.15rem;
  padding: 0.4rem 0.5rem;
}

.available-rental-photo-admin form {
  padding: 0.55rem;
}

.available-rental-photo-dropzone {
  display: grid;
  place-items: center;
  gap: 0.2rem;
  min-height: 5.5rem;
  border-radius: 0.9rem;
  text-align: center;
}

.available-rental-photo-dropzone.is-dragover {
  border-color: var(--accent);
  background: #eaf8fd;
  box-shadow: inset 0 0 0 2px rgba(13, 159, 209, 0.18);
}

@media (max-width: 720px) {
  .lease-condition-photo-upload-form {
    grid-template-columns: 1fr;
  }

  .lease-condition-photo-upload-form .modal-actions {
    justify-content: flex-end;
  }
}

.available-rental-pending-photos {
  padding: 0.75rem;
  border: 1px solid #bfd2e4;
  border-radius: 0.9rem;
  background: #f6fbff;
}

.available-rental-pending-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
  color: #0d3658;
}

.available-rental-pending-heading span {
  color: var(--text-soft);
  font-size: 0.88rem;
}

.available-rental-pending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.65rem;
}

.available-rental-pending-photo {
  overflow: hidden;
  border: 1px solid #bfd2e4;
  border-radius: 0.75rem;
  background: #fff;
  cursor: grab;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.available-rental-pending-photo.is-dragging {
  opacity: 0.58;
  cursor: grabbing;
  transform: scale(0.98);
}

.available-rental-pending-photo.is-drop-target {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px rgba(13, 159, 209, 0.18);
}

.available-rental-pending-photo img,
.available-rental-pending-file {
  width: 100%;
  height: 6.5rem;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: #eef4fb;
  color: var(--text-soft);
  font-weight: 800;
}

.available-rental-pending-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.45rem 0.4rem 0.55rem;
}

.available-rental-pending-meta span {
  display: block;
  overflow: hidden;
  color: #0d3658;
  font-size: 0.82rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.available-rental-remove-pending {
  width: 1.65rem;
  height: 1.65rem;
  min-width: 1.65rem;
  color: var(--danger);
}

.available-rental-preview-body {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #bfd2e4;
  border-radius: 0.9rem;
  background: #fff;
}

.available-rental-applications-button {
  border: 1px solid #8fb4d7;
  cursor: pointer;
}

.available-rental-applications-list {
  display: grid;
  gap: 1rem;
}

.available-rental-application-card {
  padding: 1rem;
  border: 1px solid #bfd2e4;
  border-radius: 1rem;
  background: #f8fbfd;
}

.available-rental-application-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.available-rental-application-card-header h3,
.available-rental-application-card-header p {
  margin: 0;
}

.available-rental-application-status-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.available-rental-application-seen-form {
  margin: 0;
}

.available-rental-application-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.available-rental-application-answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
}

.available-rental-application-answer-row {
  padding: 0.6rem 0.7rem;
  border: 1px solid #d3e1ee;
  border-radius: 0.7rem;
  background: #fff;
  min-width: 0;
}

.available-rental-application-answer-row dt {
  margin: 0 0 0.25rem;
  color: #42647f;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.available-rental-application-answer-row dd {
  margin: 0;
  color: #0f2d45;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.available-rental-application-meta {
  margin-top: 0.8rem;
  color: #5d7890;
  font-size: 0.9rem;
}

.dashboard-rental-application-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  border-color: #d8b84f;
  background: #fff8d9;
}

.dashboard-rental-application-alert strong,
.dashboard-rental-application-alert p {
  display: block;
  margin-top: 0.25rem;
}

@media (max-width: 760px) {
  .public-landing-header,
  .public-landing-section-heading,
  .public-landing-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .public-landing-hero,
  .public-landing-listing-panel,
  .public-rental-card,
  .public-rental-detail-hero,
  .public-rental-detail-grid,
  .public-rental-application-form,
  .public-rental-application-form fieldset {
    grid-template-columns: 1fr;
  }

  .public-rental-detail-actions,
  .public-rental-card-actions,
  .public-rental-application-actions {
    grid-template-columns: 1fr;
  }

  .public-rental-detail-main > .public-landing-eyebrow,
  .public-rental-detail-main > h1,
  .public-rental-detail-main > .public-landing-subheading,
  .public-rental-detail-main > .public-landing-intro,
  .public-rental-detail-facts,
  .public-rental-feature-pills,
  .public-rental-detail-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .public-rental-amenities-list {
    grid-template-columns: 1fr;
  }

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

  .public-rental-application-layout {
    display: flex;
    flex-direction: column-reverse;
  }

  .public-rental-application-sidebar {
    position: static;
    width: 100%;
  }

  .public-rental-application-progress {
    display: flex;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 999px;
  }

  .public-rental-application-progress button {
    width: auto;
    min-width: max-content;
  }

  .public-rental-application-actions {
    flex-direction: column;
  }

  .public-landing-hero h1 {
    max-width: 100%;
  }

  .public-rental-card {
    min-height: 0;
  }

  .public-rental-card-photo {
    min-height: 12rem;
    height: 12rem;
  }

  .public-rental-application-form fieldset {
    min-height: 0;
  }

  .public-rental-application-form {
    grid-template-rows: auto auto;
  }

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

  .available-rental-listing-fields label,
  .available-rental-listing-fields label:nth-child(n + 4) {
    grid-column: 1 / -1;
  }

  .available-rental-application-card-header,
  .available-rental-application-status-actions {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .available-rental-application-card-header {
    flex-direction: column;
  }

  .available-rental-application-answer-grid {
    grid-template-columns: 1fr;
  }

  .public-rental-lightbox {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    padding: 4rem 0.7rem 1rem;
  }

  .public-rental-lightbox img {
    max-height: calc(100vh - 12rem);
  }

  .public-rental-lightbox-nav {
    width: 100%;
  }
}

body.compact-feature-mode .compact-hide-feature,
body.compact-feature-mode .table-tools-export-button,
body.compact-feature-mode .table-tools-print-button,
body.compact-feature-mode .help-drawer {
  display: none !important;
}

body.compact-feature-mode .directory-toolbar p {
  display: none !important;
}

.nav-label-compact {
  display: none;
}

.nav-top-icon {
  display: none;
}

.nav-top-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: currentColor;
}

.nav-menu-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 1.1rem;
  width: 1.1rem;
  height: 1.1rem;
}

.nav-menu-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
}

body.compact-feature-mode .nav-label-full {
  display: none;
}

body.compact-feature-mode .nav-label-compact {
  display: inline;
}

img,
svg,
iframe {
  max-width: 100%;
}

html.js-page-transitions .topbar,
html.js-page-transitions .container,
html.js-page-transitions .app-status-bar {
  transition: opacity 180ms ease;
}

html.js-page-transitions body:not(.page-is-ready) .topbar,
html.js-page-transitions body:not(.page-is-ready) .container,
html.js-page-transitions body:not(.page-is-ready) .app-status-bar {
  opacity: 0;
}

html.js-page-transitions body.page-is-ready .topbar,
html.js-page-transitions body.page-is-ready .container,
html.js-page-transitions body.page-is-ready .app-status-bar {
  opacity: 1;
}

html.js-page-transitions body.page-is-leaving .topbar,
html.js-page-transitions body.page-is-leaving .container,
html.js-page-transitions body.page-is-leaving .app-status-bar {
  opacity: 0;
}

body.modal-open {
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  padding: 1rem 6.6rem 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(134, 157, 180, 0.85);
  backdrop-filter: blur(12px);
}

.topbar-date-label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.topbar h1 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0d3658;
}

@media (max-width: 920px) {
  .topbar-date-label {
    display: none;
  }
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.topbar nav {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}

.topbar a,
.nav-dropdown-trigger {
  color: var(--text-soft);
  text-decoration: none;
  padding: 0.5rem 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.nav-dropdown {
  position: relative;
  z-index: 61;
}

.nav-dropdown-trigger {
  width: auto;
  margin-top: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-dropdown-trigger::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.topbar a.active,
.topbar a:hover,
.nav-dropdown-trigger.active,
.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown:focus-within .nav-dropdown-trigger {
  background: var(--accent-soft);
  color: var(--accent-deep);
  box-shadow: inset 0 0 0 1px rgba(19, 181, 234, 0.18);
}

.nav-dropdown-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 14rem;
  display: grid;
  gap: 0.18rem;
  padding: 0.45rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(134, 157, 180, 0.5);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 36px rgba(16, 42, 67, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.2rem);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  width: 100%;
  border-radius: 0.35rem;
  text-align: left;
}

.nav-submenu {
  position: relative;
}

.nav-submenu-trigger {
  width: 100%;
  margin: 0;
  padding: 0.5rem 0.72rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--text-soft);
  box-shadow: none;
  font: inherit;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.nav-submenu-trigger::after {
  content: "";
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid currentColor;
}

.nav-submenu-trigger:hover,
.nav-submenu-trigger.active,
.nav-submenu:hover .nav-submenu-trigger,
.nav-submenu:focus-within .nav-submenu-trigger {
  background: var(--accent-soft);
  color: var(--accent-deep);
  box-shadow: inset 0 0 0 1px rgba(19, 181, 234, 0.18);
}

.nav-submenu-menu {
  position: absolute;
  z-index: 71;
  top: -0.45rem;
  right: calc(100% + 0.45rem);
  min-width: 14.5rem;
  display: grid;
  gap: 0.18rem;
  padding: 0.45rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(134, 157, 180, 0.5);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 36px rgba(16, 42, 67, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateX(0.2rem);
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.nav-submenu:hover .nav-submenu-menu,
.nav-submenu:focus-within .nav-submenu-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.nav-dropdown-divider {
  height: 1px;
  margin: 0.2rem 0.15rem;
  background: rgba(134, 157, 180, 0.35);
}

.logout-form {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  width: auto;
  gap: 0.55rem;
  align-items: center;
  margin: 0;
}

.logout-form .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  margin-top: 0;
  padding: 0.34rem 0.62rem;
  border: 1px solid #9fc0df;
  border-radius: 999px;
  background: #eef5fb;
  color: #1e557d;
  box-shadow: 0 8px 20px rgba(21, 65, 103, 0.1);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.user-pill {
  padding: 0.45rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.container {
  width: min(1280px, 95vw);
  margin: 1.5rem auto 2.4rem;
}

.grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.card {
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

.card h2,
.card h3 {
  margin: 0 0 0.8rem;
  letter-spacing: -0.02em;
}

.card p,
.card span {
  color: var(--text-soft);
}

.big {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0.2rem 0;
  color: #0c3a60;
}

.warn {
  border-left: 5px solid var(--warn);
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-top: 0.75rem;
  margin-bottom: 0.3rem;
  color: #38536c;
}

input,
select,
textarea,
button {
  width: 100%;
  padding: 0.68rem 0.8rem;
  border-radius: 0.35rem;
  border: 1px solid var(--border-strong);
  font-size: 0.95rem;
}

input,
select,
textarea {
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(134, 157, 180, 0.18);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(19, 181, 234, 0.8);
  box-shadow: 0 0 0 4px rgba(19, 181, 234, 0.12);
}

.voice-input-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0.42rem;
}

.voice-input-wrap textarea {
  min-height: inherit;
}

.voice-input-button {
  width: 2.6rem;
  min-width: 2.6rem;
  margin-top: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  border: 1px solid rgba(8, 125, 168, 0.28);
  background: linear-gradient(180deg, #f6fbff 0%, #e8f4fb 100%);
  color: #075f81;
  box-shadow: none;
}

.voice-input-button svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.voice-input-button:hover,
.voice-input-button:focus-visible {
  filter: none;
  border-color: rgba(8, 125, 168, 0.55);
  box-shadow: 0 0 0 4px rgba(19, 181, 234, 0.12);
}

.voice-input-button.is-listening {
  background: linear-gradient(180deg, #ffeaea 0%, #ffd7d7 100%);
  border-color: rgba(178, 74, 70, 0.55);
  color: #b24a46;
  animation: voicePulse 1.1s ease-in-out infinite;
}

.voice-input-status {
  grid-column: 1 / -1;
  min-height: 1rem;
  color: var(--text-soft);
  font-size: 0.74rem;
}

@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(178, 74, 70, 0.22); }
  50% { box-shadow: 0 0 0 5px rgba(178, 74, 70, 0.08); }
}

button {
  margin-top: 0.9rem;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 10px 22px rgba(19, 181, 234, 0.22);
}

button:hover {
  filter: brightness(0.98);
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.25);
  opacity: 0.62;
  box-shadow: none;
}

button.secondary {
  width: auto;
  margin-top: 0;
  background: #dbeefa;
  color: #075f81;
  box-shadow: inset 0 0 0 1px rgba(8, 125, 168, 0.18);
}

button.danger {
  width: auto;
  margin-top: 0;
  background: var(--danger);
  box-shadow: none;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 0.35rem;
  overflow: hidden;
  background: #fff;
  font-size: 0.86rem;
  box-shadow: 0 10px 24px rgba(16, 42, 67, 0.08);
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--table-head);
  color: #34627f;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
}

th,
td {
  border-bottom: 1px solid #ccd9e6;
  text-align: left;
  padding: 0.8rem 0.8rem;
  vertical-align: top;
}

tbody tr:nth-child(even),
tbody tr:nth-child(even) > td {
  background: var(--table-row-alt);
  background-color: var(--table-row-alt);
}

tbody tr:hover,
tbody tr:hover > td {
  background: #ddeef8;
  background-color: #ddeef8;
}

tbody tr:last-child td {
  border-bottom: none;
}

.inline {
  display: inline-flex;
  width: auto;
  align-items: center;
}

.inline button {
  width: auto;
  margin-right: 0.3rem;
  margin-top: 0;
  padding: 0.42rem 0.62rem;
  font-size: 0.8rem;
}

.btn-link {
  width: auto;
  margin-top: 0;
  box-shadow: none;
  display: inline-block;
  color: #075f81;
  background: #d8eef8;
  text-decoration: none;
  padding: 0.42rem 0.62rem;
  border-radius: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  margin-right: 0.3rem;
  border: 1px solid rgba(8, 125, 168, 0.3);
}

.status {
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: capitalize;
}

.status.pending {
  background: #fff4d6;
  color: #9a6700;
}

.status.open {
  background: #fff4d6;
  color: #9a6700;
}

.status.paid {
  background: #dff8ee;
  color: #0c7c55;
}

.status.posted {
  background: #dff8ee;
  color: #0c7c55;
}

.status.draft {
  background: #eef4fb;
  color: #496273;
}

.status.registered,
.status.active {
  background: #dff8ee;
  color: #0c7c55;
}

.status.sold_disposed,
.status.archived {
  background: #f7e5e5;
  color: #9c3434;
}

.status.in-progress {
  background: #e3f2ff;
  color: #075f81;
}

.status.waiting {
  background: #f6edff;
  color: #6c3c9f;
}

.status.cancelled {
  background: #eceff3;
  color: #59636e;
}

.status.urgent,
.todo-priority-badge.urgent {
  background: #ffe5e5;
  color: #b42318;
}

.todo-priority-badge.high {
  background: #fff0d6;
  color: #a15c00;
}

.todo-priority-badge.medium {
  background: #e7f0ff;
  color: #1f5f9c;
}

.todo-priority-badge.low {
  background: #eaf7ea;
  color: #2f6f3e;
}

.auth-wrap {
  min-height: 72vh;
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(460px, 92vw);
  background: linear-gradient(180deg, #ffffff 0%, var(--panel-muted) 100%);
}

.login-auth-wrap {
  min-height: calc(100vh - 11rem);
  padding: 2.4rem 1rem;
  background:
    radial-gradient(circle at top left, rgba(19, 181, 234, 0.14), transparent 32rem),
    linear-gradient(180deg, rgba(247, 251, 253, 0.88), rgba(244, 248, 250, 0.45));
  border-radius: 0.7rem;
}

.login-auth-card {
  width: min(520px, 94vw);
  display: grid;
  gap: 1.05rem;
  padding: 1.55rem;
  border-color: rgba(134, 157, 180, 0.42);
  box-shadow: 0 24px 60px rgba(16, 42, 67, 0.12);
}

.login-auth-header {
  display: grid;
  gap: 0.3rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(134, 157, 180, 0.24);
}

.login-auth-kicker {
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.login-auth-header h2,
.password-reset-card .modal-header h2 {
  margin: 0;
  color: var(--accent-deep);
  font-size: clamp(1.55rem, 4vw, 2rem);
  line-height: 1.1;
}

.login-auth-header p,
.password-reset-card .modal-header p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.45;
}

.login-auth-fields {
  display: grid;
  gap: 0.8rem;
}

.login-auth-field {
  display: grid;
  gap: 0.35rem;
}

.login-auth-field label {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.login-auth-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.2rem;
}

.login-auth-actions button {
  margin-top: 0;
}

.login-auth-actions button[type="submit"] {
  flex: 1 1 auto;
}

.login-forgot-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

html.mobile-device .login-auth-card {
  font-size: 1.5rem;
}

html.mobile-device .login-auth-kicker {
  font-size: 1.14rem;
}

html.mobile-device .login-auth-header h2,
html.mobile-device .password-reset-card .modal-header h2 {
  font-size: clamp(2.325rem, 6vw, 3rem);
}

html.mobile-device .login-auth-header p,
html.mobile-device .password-reset-card .modal-header p,
html.mobile-device .login-auth-field label,
html.mobile-device .password-reset-form .helper-text,
html.mobile-device .password-reset-message,
html.mobile-device .login-auth-card .error {
  font-size: 1.5rem;
}

html.mobile-device .login-auth-card input,
html.mobile-device .login-auth-card select,
html.mobile-device .login-auth-card button,
html.mobile-device .password-reset-card input,
html.mobile-device .password-reset-card select,
html.mobile-device .password-reset-card button {
  font-size: 1.5rem;
}

.password-reset-card {
  width: min(672px, 96vw);
  padding: 1.35rem;
  overflow-x: hidden;
}

.password-reset-card .modal-header {
  margin: 0 -1.35rem 1rem;
  padding: 1rem 1.35rem;
  border-bottom: 3px solid rgba(19, 181, 234, 0.34);
}

.password-reset-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.95rem;
}

.password-reset-form[hidden] {
  display: none !important;
}

.password-reset-form .helper-text {
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(134, 157, 180, 0.22);
  border-radius: 0.4rem;
  background: rgba(247, 251, 253, 0.82);
}

.password-reset-message {
  min-height: 1.35rem;
  margin: 0.8rem 0 0;
  color: var(--accent-deep);
}

.eoy-statement-pack {
  display: grid;
  gap: 1.2rem;
}

.eoy-page {
  min-height: 980px;
  padding: 2.3rem 2.6rem;
  background: #fff;
  border: 1px solid rgba(134, 157, 180, 0.28);
  border-radius: 0.45rem;
  box-shadow: 0 12px 32px rgba(16, 42, 67, 0.08);
  color: #1c2630;
}

.eoy-cover {
  display: grid;
  align-content: space-between;
}

.eoy-accountant-mark {
  justify-self: start;
  padding: 0.7rem 1rem;
  border-radius: 0 0 1.2rem 0;
  background: #143f72;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eoy-cover-title {
  display: grid;
  gap: 0.8rem;
  justify-items: center;
  margin-bottom: 10rem;
  text-align: center;
}

.eoy-cover-title h1 {
  max-width: 760px;
  margin: 0;
  color: #123f73;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.08;
}

.eoy-cover-title h2,
.eoy-cover-title p {
  margin: 0;
}

.eoy-rule {
  width: 100%;
  height: 2px;
  background: #123f73;
}

.eoy-statement-heading {
  display: grid;
  justify-items: center;
  margin-bottom: 2.1rem;
  color: #123f73;
  text-align: center;
}

.eoy-statement-heading h2,
.eoy-statement-heading h3,
.eoy-statement-heading p {
  margin: 0;
}

.eoy-statement-heading h2 {
  font-size: 1.7rem;
  line-height: 1.2;
}

.eoy-statement-heading h3 {
  margin-top: 0.55rem;
  font-size: 1.45rem;
  line-height: 1.15;
}

.eoy-statement-heading p {
  font-weight: 700;
}

.eoy-contents-table,
.eoy-statement-table {
  width: 100%;
  border-collapse: collapse;
}

.eoy-contents-table {
  margin-top: 4rem;
  font-size: 1rem;
  font-weight: 700;
}

.eoy-contents-table td {
  border: 0;
  padding: 0.45rem 0;
}

.eoy-contents-table td:last-child {
  width: 4rem;
  text-align: right;
}

.eoy-directory-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 3rem;
}

.eoy-directory-list div {
  display: grid;
  grid-template-columns: minmax(8rem, 14rem) 1fr;
  gap: 1rem;
}

.eoy-directory-list dt {
  font-weight: 800;
}

.eoy-directory-list dd {
  margin: 0;
}

.eoy-approval-label {
  margin-top: 2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.eoy-signature-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(12rem, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.eoy-signature-row span {
  display: block;
  height: 2.4rem;
  border-bottom: 1px solid #1c2630;
}

.eoy-signature-row strong {
  display: block;
  margin-top: 0.35rem;
}

.eoy-review-note {
  margin-top: 2rem;
}

.eoy-statement-table {
  font-size: 0.92rem;
}

.eoy-statement-table th,
.eoy-statement-table td {
  border: 0;
  padding: 0.24rem 0.3rem;
  vertical-align: top;
}

.eoy-statement-table th {
  color: #1c2630;
  font-size: 0.86rem;
  text-align: right;
}

.eoy-statement-table th:first-child,
.eoy-statement-table td:first-child {
  text-align: left;
}

.eoy-statement-table td:nth-child(2),
.eoy-statement-table td:nth-child(3) {
  width: 9rem;
  text-align: right;
}

.eoy-section-row td:first-child {
  padding-top: 1.05rem;
  font-weight: 800;
}

.eoy-total-row td {
  padding-top: 0.45rem;
  font-weight: 800;
}

.eoy-total-row td:nth-child(2),
.eoy-total-row td:nth-child(3) {
  border-top: 1px solid #52606d;
}

.eoy-grand-total {
  color: #123f73;
}

.eoy-grand-total td:nth-child(2),
.eoy-grand-total td:nth-child(3) {
  border-top: 2px solid #123f73;
  border-bottom: 2px solid #123f73;
}

.eoy-page h3 {
  margin: 1.15rem 0 0.35rem;
  font-size: 1rem;
}

.eoy-note-table {
  margin-bottom: 1rem;
}

.eoy-placeholder-cell {
  color: #7a5b12;
  background: #fff9df;
  border-radius: 0.35rem;
}

.eoy-review-list {
  display: grid;
  gap: 0.45rem;
  padding-left: 1.2rem;
}

.tax-suggestion-card {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.45rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(123, 158, 83, 0.24);
  border-left: 4px solid #7aa34b;
  border-radius: 0.45rem;
  background: #f7fbef;
  color: #284320;
  box-shadow: 0 8px 18px rgba(44, 74, 40, 0.08);
  font-size: 0.78rem;
  line-height: 1.35;
}

.tax-suggestion-card[data-severity="review"] {
  border-color: rgba(208, 151, 43, 0.28);
  border-left-color: #d0972b;
  background: #fff8e9;
  color: #5a3d09;
}

.tax-suggestion-card[data-severity="warning"] {
  border-color: rgba(166, 27, 27, 0.24);
  border-left-color: #a64b46;
  background: #fff2f0;
  color: #74302d;
}

.tax-suggestion-card-header {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  color: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tax-suggestion-dismiss {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0 0.25rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: currentColor;
  font-size: 0.9rem;
  line-height: 1;
}

.tax-suggestion-dismiss:hover,
.tax-suggestion-dismiss:focus-visible {
  filter: none;
  text-decoration: underline;
}

.tax-suggestion-item {
  display: grid;
  gap: 0.15rem;
}

.tax-suggestion-item strong,
.tax-suggestion-item p {
  margin: 0;
}

.tax-suggestion-item strong {
  font-size: 0.82rem;
}

.error {
  color: #a61b1b;
  background: #fff0f0;
  border: 1px solid #f4c3c3;
  border-radius: 0.35rem;
  padding: 0.65rem 0.75rem;
}

.success {
  color: #0d6b49;
  background: #edfdf6;
  border: 1px solid #bcefd8;
  border-radius: 0.35rem;
  padding: 0.65rem 0.75rem;
}

.directory-shell {
  padding: 1.4rem;
}

.directory-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.toolbar-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.toolbar-button {
  width: auto;
  margin-top: 0;
}

.toolbar-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.7rem 1rem;
  border-radius: 0.35rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-deep);
  font-weight: 600;
  text-decoration: none;
}

.directory-toolbar .toolbar-button,
.directory-toolbar .toolbar-link-button,
.directory-toolbar .toolbar-actions form .toolbar-button {
  min-height: 0;
  padding: 0.45rem 0.72rem;
  font-size: 0.95rem;
  line-height: 1.2;
  border-radius: 0.35rem;
  box-shadow: none;
}

.directory-toolbar .toolbar-link-button {
  border: 1px solid rgba(134, 157, 180, 0.28);
  background: #f3f6fa;
  color: var(--text-soft);
}

.directory-toolbar .toolbar-button.secondary,
.directory-toolbar .toolbar-link-button:hover,
.directory-toolbar .toolbar-link-button:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-deep);
  box-shadow: inset 0 0 0 1px rgba(19, 181, 234, 0.18);
}

.account-row-actions .bank-feed-upload-button {
  min-height: 0;
  padding: 0.32rem 0.58rem;
  font-size: 0.82rem;
  line-height: 1.15;
  box-shadow: inset 0 0 0 1px rgba(19, 181, 234, 0.18);
}

.toolbar-link-button:hover {
  background: #fff;
  border-color: rgba(52, 98, 127, 0.35);
}

.app-tooltip-trigger {
  position: relative;
}

.app-tooltip-trigger[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.55rem);
  z-index: 80;
  width: max-content;
  max-width: min(22rem, 80vw);
  padding: 0.58rem 0.68rem;
  border: 1px solid rgba(214, 184, 88, 0.42);
  border-radius: 0.45rem;
  background: #fffbe8;
  box-shadow: 0 14px 30px rgba(88, 70, 22, 0.12);
  color: #4f4216;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.25rem);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.app-tooltip-trigger[data-tooltip]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.25rem);
  z-index: 81;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 1px solid rgba(214, 184, 88, 0.42);
  border-bottom: 1px solid rgba(214, 184, 88, 0.42);
  background: #fffbe8;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.25rem) rotate(45deg);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.app-tooltip-trigger[data-tooltip]:hover::before,
.app-tooltip-trigger[data-tooltip]:focus-visible::before,
.app-tooltip-trigger[data-tooltip]:hover::after,
.app-tooltip-trigger[data-tooltip]:focus-visible::after {
  opacity: 1;
}

.app-tooltip-trigger[data-tooltip]:hover::before,
.app-tooltip-trigger[data-tooltip]:focus-visible::before {
  transform: translate(-50%, 0);
}

.app-tooltip-trigger[data-tooltip]:hover::after,
.app-tooltip-trigger[data-tooltip]:focus-visible::after {
  transform: translate(-50%, 0) rotate(45deg);
}

.fixed-assets-shell .toolbar-actions .app-tooltip-trigger[data-tooltip]::before {
  top: calc(100% + 0.55rem);
  bottom: auto;
  transform: translate(-50%, -0.25rem);
}

.fixed-assets-shell .toolbar-actions .app-tooltip-trigger[data-tooltip]::after {
  top: calc(100% + 0.25rem);
  bottom: auto;
  border-right: 0;
  border-bottom: 0;
  border-left: 1px solid rgba(214, 184, 88, 0.42);
  border-top: 1px solid rgba(214, 184, 88, 0.42);
  transform: translate(-50%, -0.25rem) rotate(45deg);
}

.fixed-assets-shell .toolbar-actions .app-tooltip-trigger[data-tooltip]:hover::before,
.fixed-assets-shell .toolbar-actions .app-tooltip-trigger[data-tooltip]:focus-visible::before {
  transform: translate(-50%, 0);
}

.fixed-assets-shell .toolbar-actions .app-tooltip-trigger[data-tooltip]:hover::after,
.fixed-assets-shell .toolbar-actions .app-tooltip-trigger[data-tooltip]:focus-visible::after {
  transform: translate(-50%, 0) rotate(45deg);
}

html.app-tooltips-runtime .app-tooltip-trigger[data-tooltip]::before,
html.app-tooltips-runtime .app-tooltip-trigger[data-tooltip]::after {
  display: none !important;
}

.app-tooltip-bubble {
  --tooltip-arrow-left: 50%;
  position: fixed;
  z-index: 1400;
  width: max-content;
  max-width: min(22rem, calc(100vw - 1rem));
  padding: 0.58rem 0.68rem;
  border: 1px solid rgba(214, 184, 88, 0.42);
  border-radius: 0.45rem;
  background: #fffdf0;
  box-shadow: 0 14px 30px rgba(88, 70, 22, 0.12);
  color: #4f4216;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.2rem);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.app-tooltip-bubble::after {
  content: "";
  position: absolute;
  left: var(--tooltip-arrow-left);
  top: -0.33rem;
  width: 0.55rem;
  height: 0.55rem;
  border-left: 1px solid rgba(214, 184, 88, 0.42);
  border-top: 1px solid rgba(214, 184, 88, 0.42);
  background: #fffdf0;
  transform: translateX(-50%) rotate(45deg);
}

.app-tooltip-bubble.is-above {
  transform: translateY(0.2rem);
}

.app-tooltip-bubble.is-above::after {
  top: auto;
  bottom: -0.33rem;
  border-left: 0;
  border-top: 0;
  border-right: 1px solid rgba(214, 184, 88, 0.42);
  border-bottom: 1px solid rgba(214, 184, 88, 0.42);
}

.app-tooltip-bubble.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.email-log-preview-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.system-email-preview-card {
  width: min(1120px, calc(100vw - 4rem));
  height: min(84vh, 820px);
  max-height: min(84vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.system-email-preview-card .modal-header {
  flex: 0 0 auto;
}

.system-email-preview-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  overflow: hidden;
}

.email-log-preview-meta > div {
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #cbdff2;
  border-radius: 0.75rem;
  background: #f3f8fd;
}

.email-log-preview-meta span {
  display: block;
  margin-bottom: 0.2rem;
  color: #5b7189;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.email-log-preview-meta strong {
  display: block;
  overflow: hidden;
  color: #173a5e;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.email-log-preview-frame {
  position: static;
  inset: auto;
  width: 100%;
  min-height: 0;
  height: 100%;
  border: 1px solid #d7e4f0;
  border-radius: 0.75rem;
  background: #ffffff;
  overflow: auto;
}

.email-log-preview-text {
  min-height: 0;
  height: 100%;
  margin: 0;
  padding: 1rem;
  border: 1px solid #d7e4f0;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #22384f;
  font: 0.9rem/1.5 "Consolas", "Courier New", monospace;
  overflow: auto;
  white-space: pre-wrap;
}

.system-email-preview-card .modal-actions {
  flex: 0 0 auto;
  margin-top: 0;
}

@media (max-width: 720px) {
  .system-email-preview-card {
    width: min(100%, calc(100vw - 0.7rem));
    height: calc(100dvh - var(--modal-mobile-top-gap, 0.9rem) - var(--modal-mobile-bottom-gap, 0.9rem));
    max-height: calc(100dvh - var(--modal-mobile-top-gap, 0.9rem) - var(--modal-mobile-bottom-gap, 0.9rem));
    overflow: hidden;
  }

  .system-email-preview-body {
    min-height: 0;
  }

  .email-log-preview-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.property-form-core-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  gap: 0.6rem 0.85rem;
}

.property-admin-grid {
  display: grid;
  grid-template-columns: minmax(5.5rem, 0.55fr) minmax(7rem, 0.65fr) repeat(2, minmax(8.8rem, 1fr));
  gap: 0.6rem 0.85rem;
  align-items: end;
}

.property-valuation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem 0.85rem;
}

.property-valuation-history-panel {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.2rem;
  padding: 0.85rem;
  border: 1px solid rgba(54, 100, 136, 0.18);
  border-radius: 0.45rem;
  background: #f8fbfd;
}

.property-valuation-history-heading {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.property-valuation-history-heading .section-title,
.property-valuation-history-heading .helper-text {
  margin: 0;
}

.property-valuation-history-entry {
  display: grid;
  grid-template-columns: minmax(8rem, 0.9fr) repeat(3, minmax(7rem, 1fr)) auto;
  gap: 0.55rem;
  align-items: end;
}

.property-valuation-history-entry label {
  margin-top: 0;
}

.property-valuation-history-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(54, 100, 136, 0.16);
  border-radius: 0.4rem;
  background: #fff;
}

.property-valuation-history-table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
}

.property-valuation-history-table th,
.property-valuation-history-table td {
  padding: 0.42rem 0.55rem;
  border-bottom: 1px solid rgba(54, 100, 136, 0.1);
  text-align: right;
  white-space: nowrap;
}

.property-valuation-history-table th:first-child,
.property-valuation-history-table td:first-child,
.property-valuation-history-table th:last-child,
.property-valuation-history-table td:last-child {
  text-align: left;
}

.property-valuation-history-table tbody tr:last-child td {
  border-bottom: none;
}

.property-valuation-history-empty td {
  color: #6b7f8e;
  font-weight: 600;
  text-align: center !important;
}

.property-valuation-history-remove {
  min-height: 2rem;
  padding: 0.32rem 0.65rem;
}

.property-valuation-change-positive {
  color: #166534;
  font-weight: 700;
}

.property-valuation-change-negative {
  color: #b42318;
  font-weight: 700;
}

.property-edit-modal-card {
  width: min(1080px, 96vw);
  max-height: 92vh;
  padding: 0.95rem;
}

.property-edit-modal-card .modal-header {
  margin: 0 -0.95rem 0.7rem;
  padding: 0.72rem 0.95rem;
}

.property-edit-modal-card .modal-header h2 {
  font-size: 1.18rem;
}

.property-edit-modal-card .modal-header p {
  display: none;
}

.property-edit-form {
  display: grid;
  gap: 0.5rem;
}

.property-edit-form input,
.property-edit-form select,
.property-edit-form textarea,
.property-edit-form button {
  padding: 0.42rem 0.58rem;
  font-size: 0.9rem;
  line-height: 1.2;
}

.property-edit-form .section-title {
  margin: 0.1rem 0 0;
  font-size: 0.95rem;
}

.property-edit-form .helper-text {
  font-size: 0.78rem;
  line-height: 1.25;
}

.property-form-core-grid label,
.property-admin-grid label,
.property-valuation-grid label,
.property-valuation-history-entry label,
.property-market-default-grid label {
  margin-top: 0.35rem;
}

.property-form-core-grid textarea {
  min-height: 4.25rem;
  resize: vertical;
}

.property-edit-form .property-form-core-grid {
  grid-template-columns: minmax(11rem, 0.9fr) minmax(0, 1.8fr);
  gap: 0.38rem 0.58rem;
}

.property-edit-form .property-admin-grid {
  grid-template-columns: minmax(5.2rem, 0.52fr) minmax(6.4rem, 0.56fr) minmax(8.5rem, 0.92fr) minmax(8rem, 0.82fr);
  gap: 0.38rem 0.58rem;
}

.property-edit-form .property-valuation-grid {
  grid-template-columns: repeat(4, minmax(7.2rem, 1fr));
  gap: 0.38rem 0.58rem;
}

.property-edit-form .property-market-default-grid {
  grid-template-columns: minmax(0, 1.65fr) repeat(6, minmax(5.5rem, 0.72fr));
  gap: 0.38rem 0.58rem;
}

.property-edit-form .property-market-url-field {
  grid-column: auto;
}

.property-edit-form .property-form-core-grid label,
.property-edit-form .property-admin-grid label,
.property-edit-form .property-valuation-grid label,
.property-edit-form .property-valuation-history-entry label,
.property-edit-form .property-market-default-grid label {
  margin-top: 0;
  margin-bottom: 0.14rem;
  font-size: 0.78rem;
}

.property-edit-form .property-form-core-grid textarea {
  min-height: 3rem;
  height: 3rem;
}

.property-edit-form .property-valuation-history-panel {
  gap: 0.45rem;
  padding: 0.58rem;
}

.property-edit-form .property-valuation-history-entry {
  grid-template-columns: minmax(7.4rem, 0.78fr) repeat(3, minmax(6.8rem, 1fr)) auto;
  gap: 0.38rem;
}

.property-edit-form .property-valuation-history-table {
  min-width: 38rem;
}

.property-edit-form .property-valuation-history-table th,
.property-edit-form .property-valuation-history-table td {
  padding: 0.28rem 0.42rem;
  font-size: 0.84rem;
}

.property-edit-form .modal-actions {
  margin-top: 0.35rem;
}

.portfolio-amount-cell,
.portfolio-percent-cell {
  white-space: nowrap;
  text-align: right;
}

.portfolio-property-cell {
  min-width: 13rem;
  max-width: 15rem;
}

.portfolio-property-link {
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  box-shadow: none;
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.portfolio-property-link:hover .portfolio-property-text,
.portfolio-property-link.is-open .portfolio-property-text {
  color: var(--accent-deep);
  text-decoration: underline;
}

.portfolio-property-toggle-indicator {
  width: 0;
  height: 0;
  margin-top: 0.35rem;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid rgba(52, 98, 127, 0.75);
  transition: transform 0.18s ease;
}

.portfolio-property-link.is-open .portfolio-property-toggle-indicator {
  transform: rotate(90deg);
}

.portfolio-property-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.portfolio-cell-property {
  background: rgba(246, 249, 252, 0.92);
}

.portfolio-cell-income {
  background: rgba(230, 246, 238, 0.9);
}

.portfolio-cell-expense {
  background: rgba(251, 235, 235, 0.92);
}

.portfolio-cell-total {
  background: rgba(231, 240, 249, 0.92);
}

.portfolio-cell-valuation {
  background: rgba(241, 235, 250, 0.92);
}

.portfolio-cell-return {
  background: rgba(232, 246, 236, 0.9);
}

.portfolio-group-heading {
  background: linear-gradient(180deg, rgba(183, 215, 232, 0.55), rgba(183, 215, 232, 0.22));
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  border-bottom: 1px solid rgba(52, 98, 127, 0.18);
}

#portfolio-performance-table thead th.portfolio-group-property,
#portfolio-performance-table tfoot td.portfolio-cell-property {
  background: rgba(246, 249, 252, 0.96);
}

#portfolio-performance-table thead th.portfolio-group-income,
#portfolio-performance-table tfoot td.portfolio-cell-income {
  background: rgba(230, 246, 238, 0.96);
}

#portfolio-performance-table thead th.portfolio-group-expense,
#portfolio-performance-table tfoot td.portfolio-cell-expense {
  background: rgba(251, 235, 235, 0.96);
}

#portfolio-performance-table thead th.portfolio-group-total,
#portfolio-performance-table tfoot td.portfolio-cell-total {
  background: rgba(231, 240, 249, 0.96);
}

#portfolio-performance-table thead th.portfolio-group-valuation,
#portfolio-performance-table tfoot td.portfolio-cell-valuation {
  background: rgba(241, 235, 250, 0.96);
}

#portfolio-performance-table thead th.portfolio-group-return,
#portfolio-performance-table tfoot td.portfolio-cell-return {
  background: rgba(232, 246, 236, 0.96);
}

.portfolio-footer-row td {
  color: var(--accent-deep);
  border-top: 1px solid rgba(52, 98, 127, 0.18);
  font-weight: 700;
}

.portfolio-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.portfolio-editable-cell {
  padding: 0.15rem 0.2rem;
  background: #fff;
}

.portfolio-readonly-cell {
  background: rgba(245, 249, 252, 0.88);
}

.portfolio-grid-input {
  width: 100%;
  min-width: 5.8rem;
  margin: 0;
  padding: 0.45rem 0.5rem;
  border: 1px solid rgba(146, 173, 191, 0.55);
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  text-align: right;
  font-size: 0.92rem;
}

.portfolio-grid-input:focus {
  outline: none;
  border-color: rgba(52, 98, 127, 0.75);
  box-shadow: inset 0 0 0 1px rgba(52, 98, 127, 0.12);
}

.portfolio-row-saving .portfolio-editable-cell {
  background: rgba(234, 244, 250, 0.9);
}

.portfolio-row-saved .portfolio-editable-cell {
  background: rgba(230, 246, 238, 0.9);
}

.portfolio-row-error .portfolio-editable-cell {
  background: rgba(252, 233, 233, 0.95);
}

.portfolio-detail-row > .portfolio-detail-cell {
  padding: 0;
  background: rgba(243, 248, 251, 0.95);
}

.portfolio-detail-shell {
  display: inline-block;
  max-width: 100%;
  padding: 0.36rem 0.45rem 0.5rem;
  border-top: 1px solid rgba(52, 98, 127, 0.14);
}

.portfolio-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 0.22rem;
}

.portfolio-detail-header span {
  color: var(--muted);
  font-size: 0.7rem;
}

.portfolio-detail-table-wrap {
  display: inline-block;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.portfolio-detail-table {
  width: auto;
  min-width: 0;
  border-collapse: collapse;
  table-layout: auto;
  font-size: 0.68rem;
  line-height: 1.15;
}

.portfolio-detail-table th,
.portfolio-detail-table td {
  padding: 0.16rem 0.22rem;
  border: 1px solid rgba(146, 173, 191, 0.28);
  white-space: nowrap;
}

.portfolio-detail-table th {
  background: rgba(223, 236, 244, 0.7);
  text-align: left;
  font-size: 0.58rem;
  letter-spacing: 0.005em;
  text-transform: uppercase;
}

.portfolio-detail-table th:nth-child(1),
.portfolio-detail-table td:nth-child(1) {
  min-width: 12rem;
  max-width: 14rem;
  white-space: normal;
}

.portfolio-detail-table th:nth-child(2),
.portfolio-detail-table td:nth-child(2) {
  min-width: 3.6rem;
}

.portfolio-detail-table th:nth-child(3),
.portfolio-detail-table td:nth-child(3) {
  min-width: 4.8rem;
}

.portfolio-detail-table th:nth-child(4),
.portfolio-detail-table td:nth-child(4) {
  min-width: 3.3rem;
  text-align: right;
}

.portfolio-detail-table th:nth-child(5),
.portfolio-detail-table td:nth-child(5),
.portfolio-detail-table th:nth-child(6),
.portfolio-detail-table td:nth-child(6) {
  min-width: 5.8rem;
  text-align: right;
}

.portfolio-detail-table .portfolio-grid-input {
  min-width: 0;
  width: 5.5rem;
  padding: 0.12rem 0.18rem;
  font-size: 0.68rem;
  min-height: 1.6rem;
  text-align: right;
}

.performance-shell {
  max-width: 100%;
  overflow: hidden;
}

.performance-panel-wrap {
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  max-width: 100%;
}

.performance-view-tabs {
  margin-bottom: 0;
  min-width: 0;
  max-width: 100%;
}

.performance-content-panel {
  min-width: 0;
  max-width: 100%;
  min-height: 22rem;
  padding: 1rem;
  border: 1px solid rgba(134, 157, 180, 0.26);
  border-radius: 0.45rem;
  background: #fff;
  overflow: hidden;
}

.performance-tab-panel[hidden] {
  display: none !important;
}

.performance-tab-panel.is-performance-tab-fading-in {
  animation: grid-tab-page-fade-in 180ms ease both;
}

.performance-content-panel h3 {
  margin: 0 0 0.35rem;
  color: #0d3658;
}

.performance-report-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  margin-bottom: 0.75rem;
}

.performance-report-actions .helper-text {
  margin: 0.1rem 0 0;
  max-width: 58rem;
}

.performance-report-actions .toolbar-actions {
  flex: 0 0 auto;
}

.performance-report-action-group {
  align-items: center;
}

.performance-report-actions .toolbar-button {
  min-height: 0;
  padding: 0.45rem 0.72rem;
  font-size: 0.9rem;
  line-height: 1.2;
  border-radius: 0.35rem;
  box-shadow: none;
}

.performance-year-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
}

.performance-year-picker label {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.performance-year-picker select {
  width: auto;
  min-width: 7.4rem;
  min-height: 2.05rem;
  margin: 0;
  padding: 0.34rem 1.9rem 0.34rem 0.55rem;
  border-radius: 0.35rem;
  border-color: rgba(134, 157, 180, 0.42);
  background-color: #fff;
  color: #31536d;
  font-size: 0.82rem;
  font-weight: 800;
}

.performance-valuation-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem;
  border: 1px solid rgba(134, 157, 180, 0.3);
  border-radius: 0.35rem;
  background: #f6f9fc;
}

.performance-valuation-toggle a {
  min-width: 4.2rem;
  padding: 0.34rem 0.52rem;
  border-radius: 0.28rem;
  color: #31536d;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.performance-valuation-toggle a.active {
  background: var(--accent-soft);
  color: var(--accent-deep);
  box-shadow: inset 0 0 0 1px rgba(8, 125, 168, 0.18);
}

.performance-section-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  padding-bottom: 0.15rem;
  min-width: 0;
  max-width: 100%;
}

.performance-section-tabs a {
  flex: 0 0 auto;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.62rem;
  border: 1px solid rgba(134, 157, 180, 0.26);
  border-radius: 0.35rem;
  background: #f6f9fc;
  color: #31536d;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.performance-section-tabs a:hover,
.performance-section-tabs a:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: rgba(8, 125, 168, 0.28);
}

.performance-section {
  min-width: 0;
  max-width: 100%;
  margin-top: 0.85rem;
  padding: 0.85rem;
  border: 1px solid rgba(134, 157, 180, 0.24);
  border-radius: 0.45rem;
  background: #fff;
  overflow: hidden;
}

.performance-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.performance-section-heading h4 {
  margin: 0;
  color: #0d3658;
  font-size: 1rem;
}

.performance-section-heading span {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
}

.performance-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.8rem), 1fr));
  gap: 0.65rem;
  min-width: 0;
}

.performance-kpi-card {
  min-width: 0;
  min-height: 5.6rem;
  padding: 0.68rem 0.72rem;
  border: 1px solid rgba(134, 157, 180, 0.24);
  border-left-width: 4px;
  border-radius: 0.45rem;
  background: #f9fbfd;
}

.performance-kpi-card span,
.performance-kpi-card small {
  display: block;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.performance-kpi-card .performance-kpi-label {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
}

.performance-kpi-card .performance-kpi-label > span:first-child {
  min-width: 0;
}

.performance-kpi-info {
  position: relative;
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(52, 98, 127, 0.28);
  border-radius: 999px;
  background: #fff;
  color: #31536d;
  cursor: help;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  font-family: Arial, sans-serif;
}

.performance-kpi-info::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 30;
  width: min(18rem, 72vw);
  padding: 0.58rem 0.65rem;
  border: 1px solid rgba(52, 98, 127, 0.22);
  border-radius: 0.35rem;
  background: #102a43;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  box-shadow: 0 12px 28px rgba(16, 42, 67, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-0.15rem);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.performance-kpi-info:hover::after,
.performance-kpi-info:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.performance-kpi-card strong {
  display: block;
  margin-top: 0.25rem;
  color: #102a43;
  font-size: 1.05rem;
  line-height: 1.15;
}

.performance-kpi-card small {
  margin-top: 0.18rem;
  font-weight: 600;
}

.performance-kpi-card .performance-kpi-detail {
  font-size: 0.72rem;
  font-weight: 600;
}

.performance-inline-link {
  appearance: none;
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f6f9f;
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.16rem;
  cursor: pointer;
}

.performance-inline-link:hover,
.performance-inline-link:focus-visible {
  color: #12445f;
}

.performance-inflation-modal-card {
  width: min(880px, 94vw);
}

.performance-inflation-modal-card .modal-header span {
  display: block;
  margin-top: 0.15rem;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.performance-inflation-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.performance-inflation-summary > div {
  min-width: 0;
  padding: 0.58rem 0.62rem;
  border: 1px solid rgba(134, 157, 180, 0.24);
  border-radius: 0.4rem;
  background: #f9fbfd;
}

.performance-inflation-summary span,
.performance-inflation-summary strong {
  display: block;
}

.performance-inflation-summary span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
}

.performance-inflation-summary strong {
  margin-top: 0.15rem;
  color: #102a43;
  font-size: 0.88rem;
  line-height: 1.2;
}

.performance-inflation-chart {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(134, 157, 180, 0.24);
  border-radius: 0.45rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

.performance-inflation-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.performance-inflation-axis {
  stroke: rgba(49, 83, 109, 0.28);
  stroke-width: 1.5;
}

.performance-inflation-zero {
  stroke: rgba(148, 163, 184, 0.55);
  stroke-dasharray: 5 5;
  stroke-width: 1;
}

.performance-inflation-line {
  fill: none;
  stroke: #2374ab;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.performance-inflation-point {
  fill: #ffffff;
  stroke: #2374ab;
  stroke-width: 2;
}

.performance-cv-value-axis {
  stroke-dasharray: 3 4;
}

.performance-cv-value-label {
  text-anchor: start;
}

.performance-cv-history-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
  opacity: 0.86;
}

.performance-cv-history-point {
  fill: #ffffff;
  stroke-width: 2.4;
}

.performance-cv-history-colour-0 {
  stroke: #c2410c;
}

.performance-cv-history-colour-1 {
  stroke: #15803d;
}

.performance-cv-history-colour-2 {
  stroke: #7c3aed;
}

.performance-cv-history-colour-3 {
  stroke: #be123c;
}

.performance-cv-history-colour-4 {
  stroke: #0f766e;
}

.performance-cv-history-colour-5 {
  stroke: #a16207;
}

.performance-cv-history-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem 0.75rem;
  margin-top: 0.45rem;
  color: #425a70;
  font-size: 0.78rem;
  font-weight: 800;
}

.performance-cv-history-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
}

.performance-cv-history-swatch,
.performance-cpi-swatch {
  width: 0.78rem;
  height: 0.78rem;
  border-radius: 999px;
  border: 2px solid currentColor;
  background: #fff;
}

.performance-cpi-swatch {
  color: #2374ab;
}

.performance-cv-history-swatch.performance-cv-history-colour-0 {
  color: #c2410c;
}

.performance-cv-history-swatch.performance-cv-history-colour-1 {
  color: #15803d;
}

.performance-cv-history-swatch.performance-cv-history-colour-2 {
  color: #7c3aed;
}

.performance-cv-history-swatch.performance-cv-history-colour-3 {
  color: #be123c;
}

.performance-cv-history-swatch.performance-cv-history-colour-4 {
  color: #0f766e;
}

.performance-cv-history-swatch.performance-cv-history-colour-5 {
  color: #a16207;
}

.performance-inflation-chart-label {
  fill: #52677a;
  font-size: 0.76rem;
  font-weight: 800;
}

.performance-inflation-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.35rem;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.performance-inflation-source,
.performance-inflation-empty {
  margin: 0.75rem 0 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
}

.performance-inflation-source span {
  display: block;
  margin-top: 0.25rem;
  color: #9a6700;
}

.performance-tone-good {
  color: #0c7c55 !important;
  border-color: rgba(15, 159, 110, 0.4);
}

.performance-tone-warning {
  color: #9a6700 !important;
  border-color: rgba(217, 119, 6, 0.42);
}

.performance-tone-risk {
  color: #b42318 !important;
  border-color: rgba(207, 46, 46, 0.42);
}

.performance-tone-neutral {
  color: #496273 !important;
  border-color: rgba(134, 157, 180, 0.38);
}

.performance-kpi-card.performance-tone-good {
  background: #f0fbf6;
}

.performance-kpi-card.performance-tone-warning {
  background: #fff8e8;
}

.performance-kpi-card.performance-tone-risk {
  background: #fff0f0;
}

body:not(.compact-feature-mode) .performance-kpi-card.performance-tone-good {
  background: #e4f8ee;
}

body:not(.compact-feature-mode) .performance-kpi-card.performance-tone-warning {
  background: #fff1d4;
}

body:not(.compact-feature-mode) .performance-kpi-card.performance-tone-risk {
  background: #ffe2e2;
}

.performance-chart-grid,
.performance-metric-list,
.performance-summary-statements,
.performance-alert-list,
.performance-score-breakdown {
  display: grid;
  gap: 0.48rem;
  min-width: 0;
}

.performance-bar-row,
.performance-metric-list div,
.performance-summary-statements p,
.performance-alert-list div {
  display: grid;
  grid-template-columns: minmax(6rem, 0.6fr) minmax(0, 1.8fr) max-content;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 0.35rem;
  background: #f6f9fc;
}

.performance-score-breakdown div {
  display: grid;
  grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 0.35rem;
  background: #f6f9fc;
}

.performance-metric-list div,
.performance-summary-statements p,
.performance-alert-list div {
  grid-template-columns: minmax(0, 1fr) max-content;
}

.performance-bar-row span,
.performance-metric-list span,
.performance-score-breakdown span {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.performance-metric-label {
  display: inline-flex !important;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
}

.performance-metric-label .performance-kpi-info {
  width: 1.1rem;
  height: 1.1rem;
}

.performance-bar-row strong,
.performance-metric-list strong {
  text-align: right;
}

.performance-bar-track {
  min-width: 0;
  height: 0.7rem;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8f1;
}

.performance-bar-fill {
  height: 100%;
  border-radius: inherit;
}

.performance-bar-income {
  background: var(--success);
}

.performance-bar-expense {
  background: var(--warn);
}

.performance-bar-total {
  background: var(--accent-deep);
}

.performance-bar-cash {
  background: #5f8fb4;
}

.performance-financial-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.7rem;
  margin-bottom: 0.65rem;
}

.performance-financial-view-tabs,
.performance-financial-period-tabs {
  margin: 0;
  border-bottom: 0;
}

.performance-financial-period-tabs[hidden],
.performance-financial-period-tabs.is-hidden {
  display: none !important;
}

.performance-financial-view-tabs .tab-button,
.performance-financial-period-tabs .tab-button {
  cursor: pointer;
}

.performance-financial-view-frame {
  min-height: clamp(28rem, 48vw, 34rem);
  max-height: clamp(28rem, 48vw, 34rem);
  overflow: auto;
  border: 1px solid rgba(52, 98, 127, 0.14);
  border-radius: 0.5rem;
  background: #fff;
}

.performance-financial-view-frame > .performance-table-wrap,
.performance-financial-view-frame > .performance-financial-chart-panel {
  min-height: 100%;
}

.performance-financial-view-frame > .performance-table-wrap {
  border: 0;
  border-radius: 0;
}

[data-financial-panel][hidden],
[data-financial-panel].is-hidden {
  display: none !important;
}

.performance-financial-chart-panel {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  align-content: start;
  padding: 0.85rem;
}

.performance-financial-chart-panel[hidden] {
  display: none !important;
}

.performance-financial-chart-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.45rem 0.8rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(52, 98, 127, 0.14);
  border-radius: 0.45rem;
  background: #f6f9fc;
}

.performance-financial-chart-summary span,
.performance-financial-chart-summary small {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.performance-financial-chart-summary strong {
  margin-left: auto;
  font-size: 1.2rem;
}

.performance-financial-pie-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  min-width: 0;
}

.performance-financial-pie-card {
  display: grid;
  grid-template-columns: minmax(7.5rem, 10rem) minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  min-width: 0;
  min-height: 21rem;
  padding: 0.75rem;
  border: 1px solid rgba(52, 98, 127, 0.14);
  border-radius: 0.5rem;
  background: #fff;
}

.performance-financial-pie-card h5 {
  margin: 0 0 0.25rem;
  color: #102a43;
  font-size: 0.95rem;
}

.performance-financial-pie-card > div:first-child span {
  color: #31536d;
  font-weight: 800;
}

.performance-financial-pie {
  position: relative;
  width: min(10rem, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 999px;
  background: #dfe8f1;
}

.performance-financial-pie::after {
  content: "";
  position: absolute;
  inset: 24%;
  border-radius: inherit;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(52, 98, 127, 0.1);
}

.performance-financial-pie span {
  position: absolute;
  inset: 29%;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #102a43;
  font-size: 0.86rem;
  font-weight: 900;
  text-align: center;
}

.performance-financial-legend {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.performance-financial-legend-row {
  display: grid;
  grid-template-columns: 0.75rem minmax(0, 1fr) max-content;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.34rem 0.45rem;
  border-radius: 0.35rem;
  background: #f6f9fc;
  color: #31536d;
  font-size: 0.8rem;
  font-weight: 700;
}

.performance-financial-legend-row strong {
  color: #102a43;
  text-align: right;
}

.performance-financial-legend-row small {
  color: var(--text-soft);
}

.performance-financial-swatch {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
}

.performance-financial-empty {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.performance-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  min-width: 0;
}

.performance-table-wrap {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  margin-top: 0;
}

.performance-table-wrap table {
  width: max-content;
  min-width: 100%;
}

.performance-table-wrap table th,
.performance-table-wrap table td {
  white-space: nowrap;
}

#performance-financial-table th:nth-child(n + 2),
#performance-financial-table td:nth-child(n + 2) {
  text-align: right;
}

#performance-financial-table tbody tr.performance-financial-calculated-row,
#performance-financial-table tbody tr.performance-financial-calculated-row > td {
  background: #e4e8ec;
  background-color: #e4e8ec;
}

#performance-financial-table tbody tr.performance-financial-calculated-row:hover,
#performance-financial-table tbody tr.performance-financial-calculated-row:hover > td {
  background: #d8dee4;
  background-color: #d8dee4;
}

.performance-table-wrap tfoot td {
  position: sticky;
  bottom: 0;
  z-index: 1;
  border-top: 2px solid rgba(52, 98, 127, 0.22);
  background: #e8f4fb;
  color: #0d3658;
  font-weight: 800;
}

.performance-table-subtext {
  display: block;
  margin-top: 0.12rem;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: normal;
}

.performance-score-layout {
  display: grid;
  grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.performance-score-ring {
  width: 10.5rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  justify-self: center;
  padding: 1rem;
  border: 8px solid currentColor;
  border-radius: 999px;
  background: #f9fbfd;
  text-align: center;
}

.performance-score-ring strong,
.performance-score-ring span {
  display: block;
}

.performance-score-ring strong {
  font-size: 2rem;
  line-height: 1;
}

.performance-score-ring span {
  margin-top: 0.25rem;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.performance-score-breakdown progress {
  width: 100%;
  min-width: 0;
  accent-color: var(--accent-deep);
}

.performance-formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.5rem;
  min-width: 0;
}

.performance-formula-grid code {
  display: block;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(134, 157, 180, 0.24);
  border-radius: 0.35rem;
  background: #f6f9fc;
  color: #183b56;
  white-space: normal;
}

.performance-improvement-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 0.65rem;
  margin: 0.75rem 0;
}

.performance-improvement-summary article {
  min-width: 0;
  padding: 0.68rem 0.72rem;
  border: 1px solid rgba(134, 157, 180, 0.24);
  border-left: 4px solid var(--accent-deep);
  border-radius: 0.45rem;
  background: #f9fbfd;
}

.performance-improvement-summary span,
.performance-improvement-summary small {
  display: block;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.performance-improvement-summary strong {
  display: block;
  margin-top: 0.22rem;
  color: #102a43;
  font-size: 1rem;
  line-height: 1.18;
}

.performance-improvement-note {
  min-width: 18rem;
  max-width: 28rem;
  white-space: normal !important;
}

#performance-improvements-table th:nth-child(3),
#performance-improvements-table th:nth-child(4),
#performance-improvements-table td:nth-child(3),
#performance-improvements-table td:nth-child(4) {
  text-align: right;
}

.performance-target-return-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
}

.performance-target-return-toolbar h4 {
  margin: 0 0 0.2rem;
}

.performance-target-return-input {
  display: inline-grid;
  grid-template-columns: max-content minmax(5rem, 7rem) max-content;
  align-items: center;
  gap: 0.42rem;
  padding: 0.42rem 0.55rem;
  border: 1px solid rgba(52, 98, 127, 0.18);
  border-radius: 0.45rem;
  background: #f6f9fc;
}

.performance-target-return-input-compact {
  grid-template-columns: minmax(3.6rem, 4.6rem) max-content;
  min-width: 5.8rem;
  padding: 0.2rem 0.3rem;
  background: transparent;
}

.performance-target-return-input span {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 800;
}

.performance-target-return-input input {
  width: 100%;
  min-height: 2.15rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid rgba(52, 98, 127, 0.2);
  border-radius: 0.35rem;
  background: #fff;
  color: #102a43;
  font-weight: 800;
}

.performance-target-return-input.performance-target-return-input-compact input {
  width: 4.6rem;
  min-height: 1.85rem;
}

.performance-target-return-input strong {
  color: #31536d;
}

.performance-target-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.performance-target-summary article {
  min-width: 0;
  padding: 0.68rem 0.72rem;
  border: 1px solid rgba(134, 157, 180, 0.24);
  border-left: 4px solid var(--accent-deep);
  border-radius: 0.45rem;
  background: #f9fbfd;
}

.performance-target-summary span,
.performance-target-summary small {
  display: block;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.performance-target-summary strong {
  display: block;
  margin-top: 0.22rem;
  color: #102a43;
  font-size: 1.08rem;
  line-height: 1.18;
}

#performance-target-return-table th:nth-child(n + 2):not(:last-child),
#performance-target-return-table td:nth-child(n + 2):not(:last-child) {
  text-align: right;
}

#performance-target-return-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
}

#performance-target-return-table th,
#performance-target-return-table td {
  white-space: nowrap !important;
}

#performance-target-return-table th {
  max-width: 7.5rem;
  line-height: 1.15;
  vertical-align: bottom;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: normal;
}

#performance-target-return-table th:first-child {
  width: 12.5%;
}

#performance-target-return-table th:nth-child(2) {
  width: 8%;
}

#performance-target-return-table th:nth-child(3),
#performance-target-return-table th:nth-child(4),
#performance-target-return-table th:nth-child(5) {
  width: 9.5%;
}

#performance-target-return-table th:nth-child(n + 6) {
  width: 8.25%;
}

#performance-target-return-table th:last-child,
#performance-target-return-table td:last-child {
  width: 9.75%;
}

.performance-target-current-return {
  color: #102a43;
  font-weight: 900;
}

.performance-target-unit-detail-row > td {
  padding: 0.35rem 0.55rem 0.75rem !important;
  background: #f6f9fc;
}

.performance-target-unit-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
  border: 1px solid rgba(52, 98, 127, 0.12);
  border-radius: 0.4rem;
  background: #fff;
}

.performance-target-unit-col-unit {
  width: 4.2rem;
}

.performance-target-unit-col-tenant {
  width: 28%;
}

.performance-target-unit-col-money {
  width: calc((100% - 28% - 4.2rem) / 6);
}

.performance-target-unit-table th,
.performance-target-unit-table td {
  padding: 0.42rem 0.5rem;
  white-space: nowrap;
}

.performance-target-unit-table th {
  background: #e8f4fb;
  color: #0d3658;
  font-size: 0.76rem;
  line-height: 1.15;
  vertical-align: bottom;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.performance-target-unit-table th:nth-child(n + 3),
.performance-target-unit-table td:nth-child(n + 3) {
  text-align: right;
}

.performance-target-rent-input {
  width: 5.6rem;
  min-height: 1.9rem;
  padding: 0.3rem 0.42rem;
  border: 1px solid rgba(52, 98, 127, 0.2);
  border-radius: 0.35rem;
  background: #fff;
  color: #102a43;
  font-weight: 800;
  text-align: right;
}

.performance-target-unit-table th:first-child,
.performance-target-unit-table td:first-child,
.performance-target-unit-table th:nth-child(2),
.performance-target-unit-table td:nth-child(2) {
  text-align: left !important;
}

.performance-target-unit-table td:nth-child(2) {
  overflow: visible;
  text-overflow: clip;
}

.performance-target-unit-details,
.performance-target-expense-details {
  margin-top: 0.55rem;
  border: 1px solid rgba(52, 98, 127, 0.14);
  border-radius: 0.4rem;
  background: #fff;
}

.performance-target-unit-details {
  margin-top: 0;
}

.performance-target-unit-details summary,
.performance-target-expense-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.52rem 0.65rem;
  cursor: pointer;
  color: #0d3658;
  font-weight: 900;
}

.performance-target-unit-details summary strong,
.performance-target-expense-details summary strong {
  color: #31536d;
  font-size: 0.82rem;
}

.performance-target-unit-details .performance-target-unit-table {
  border-top: 1px solid rgba(52, 98, 127, 0.12);
  border-right: none;
  border-bottom: none;
  border-left: none;
  border-radius: 0;
}

.performance-target-expense-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
  border-top: 1px solid rgba(52, 98, 127, 0.12);
}

.performance-target-expense-table th,
.performance-target-expense-table td {
  padding: 0.42rem 0.5rem;
  white-space: nowrap;
}

.performance-target-expense-table th {
  background: #e8f4fb;
  color: #0d3658;
  font-size: 0.76rem;
  line-height: 1.15;
  vertical-align: bottom;
  white-space: normal;
  overflow-wrap: anywhere;
}

.performance-target-expense-table th:nth-child(1),
.performance-target-expense-table td:nth-child(1) {
  width: 24%;
  text-align: left !important;
}

.performance-target-expense-table th:nth-child(5),
.performance-target-expense-table td:nth-child(5) {
  width: 28%;
  text-align: left !important;
  white-space: normal;
}

.performance-target-expense-table th:nth-child(2),
.performance-target-expense-table th:nth-child(3),
.performance-target-expense-table th:nth-child(4),
.performance-target-expense-table td:nth-child(2),
.performance-target-expense-table td:nth-child(3),
.performance-target-expense-table td:nth-child(4) {
  text-align: right;
}

.performance-target-expense-table tfoot td {
  background: #f7fbfd;
  font-weight: 900;
}

.performance-target-expense-input {
  width: 6.4rem;
  min-height: 1.9rem;
  padding: 0.3rem 0.42rem;
  border: 1px solid rgba(52, 98, 127, 0.2);
  border-radius: 0.35rem;
  background: #fff;
  color: #102a43;
  font-weight: 800;
  text-align: right;
}

.performance-target-expense-note {
  color: var(--text-soft);
  font-size: 0.78rem;
  line-height: 1.28;
  white-space: pre-line !important;
}

.performance-expense-account-form {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  min-width: min(100%, 32rem);
  margin-top: 0.65rem;
  padding: 0.65rem;
  border: 1px solid rgba(52, 98, 127, 0.14);
  border-radius: 0.4rem;
  background: #f7fbfd;
  white-space: normal !important;
}

.performance-expense-account-modal-card {
  width: min(780px, 94vw);
}

.performance-expense-account-modal-card .performance-expense-account-form {
  min-width: 0;
  padding: 0.8rem;
  border: 0;
  background: transparent;
}

.performance-expense-account-inline-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  margin-top: 0.6rem;
  white-space: normal !important;
}

.performance-expense-account-inline-actions span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
}

.performance-expense-account-heading {
  display: grid;
  gap: 0.15rem;
}

.performance-expense-account-heading strong {
  color: #102a43;
  font-size: 0.88rem;
}

.performance-expense-account-heading span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 650;
}

.performance-expense-account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 0.35rem 0.55rem;
  max-height: min(46vh, 24rem);
  min-width: 0;
  overflow-y: auto;
  white-space: normal !important;
}

.performance-expense-account-grid label {
  display: flex;
  align-items: flex-start;
  gap: 0.38rem;
  min-width: 16rem;
  padding: 0.32rem 0.4rem;
  border: 1px solid rgba(52, 98, 127, 0.12);
  border-radius: 0.35rem;
  background: #fff;
  color: #183b56;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal !important;
}

.performance-expense-account-grid input {
  flex: 0 0 auto;
  margin-top: 0.08rem;
}

.performance-expense-account-grid span {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: normal;
  word-break: normal;
}

.performance-expense-account-actions {
  display: flex;
  justify-content: flex-end;
}

body.compact-feature-mode .performance-expense-account-form {
  width: 100%;
  max-width: 100%;
}

body.compact-feature-mode .performance-expense-account-grid {
  grid-template-columns: 1fr;
}

body.compact-feature-mode .performance-expense-account-grid label {
  min-width: 0;
}

body.compact-feature-mode #performance-target-return-table,
body.compact-feature-mode .performance-target-unit-table,
body.compact-feature-mode .performance-target-expense-table {
  width: max-content !important;
  table-layout: auto !important;
}

body.compact-feature-mode #performance-target-return-table {
  min-width: 76rem !important;
}

body.compact-feature-mode #performance-target-return-table th,
body.compact-feature-mode #performance-target-return-table td,
body.compact-feature-mode .performance-target-unit-table th,
body.compact-feature-mode .performance-target-unit-table td,
body.compact-feature-mode .performance-target-expense-table th,
body.compact-feature-mode .performance-target-expense-table td {
  white-space: nowrap !important;
  overflow-wrap: normal !important;
}

body.compact-feature-mode #performance-target-return-table th {
  max-width: none;
}

body.compact-feature-mode #performance-target-return-table th:nth-child(2),
body.compact-feature-mode #performance-target-return-table td:nth-child(2) {
  min-width: 7rem;
}

body.compact-feature-mode .performance-target-unit-table {
  min-width: 64rem !important;
}

body.compact-feature-mode .performance-target-expense-table {
  min-width: 52rem !important;
}

body.compact-feature-mode .performance-target-rent-input,
body.compact-feature-mode .performance-target-expense-input {
  min-width: 5.6rem;
}

.performance-placeholder-panel {
  display: grid;
  place-items: center;
  min-height: 14rem;
  margin-top: 0.8rem;
  border: 1px dashed rgba(54, 100, 136, 0.32);
  border-radius: 0.45rem;
  background: #f7fbfd;
  color: #5d7890;
  font-weight: 700;
}

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

@media (max-width: 720px) {
  .property-form-core-grid,
  .property-admin-grid,
  .property-valuation-grid {
    grid-template-columns: 1fr;
  }

  .property-valuation-history-entry {
    grid-template-columns: 1fr 1fr;
  }

  .property-valuation-history-entry .secondary {
    grid-column: 1 / -1;
    justify-self: flex-start;
  }

  .portfolio-edit-grid {
    grid-template-columns: 1fr;
  }

  .performance-content-panel {
    padding: 0.72rem;
  }

  .performance-report-actions,
  .performance-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .performance-report-action-group {
    align-items: flex-start;
  }

  .performance-section-heading span {
    text-align: left;
  }

  .performance-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.8rem), 1fr));
  }

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

  .performance-inflation-modal-card {
    width: min(94vw, 42rem);
  }

  .performance-two-column,
  .performance-financial-pie-grid,
  .performance-financial-pie-card,
  .performance-score-layout {
    grid-template-columns: 1fr;
  }

  .performance-financial-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .performance-financial-view-tabs,
  .performance-financial-period-tabs {
    width: 100%;
    justify-content: flex-start;
  }

  .performance-financial-view-tabs .tab-button,
  .performance-financial-period-tabs .tab-button {
    flex: 1 1 0;
  }

  .performance-financial-view-frame {
    min-height: 34rem;
    max-height: 34rem;
  }

  .performance-target-return-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .performance-target-return-input {
    grid-template-columns: minmax(0, 1fr) minmax(4.5rem, 6rem) max-content;
  }

  #performance-target-return-table {
    min-width: 68rem !important;
    table-layout: auto;
  }

  #performance-target-return-table th,
  #performance-target-return-table td {
    white-space: nowrap !important;
  }

  #performance-target-return-table th {
    max-width: none;
    overflow-wrap: normal;
  }

  .performance-target-unit-table {
    min-width: 58rem !important;
    table-layout: auto;
  }

  .performance-target-unit-table th,
  .performance-target-unit-table td {
    white-space: nowrap;
  }

  .performance-target-expense-table {
    min-width: 48rem !important;
    table-layout: auto;
  }

  .performance-target-expense-table th,
  .performance-target-expense-table td {
    white-space: nowrap;
  }

  .performance-target-expense-table th:nth-child(5),
  .performance-target-expense-table td:nth-child(5) {
    white-space: normal;
    min-width: 12rem;
  }

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

  .performance-bar-row strong {
    text-align: left;
  }

  .performance-metric-list div,
  .performance-summary-statements p,
  .performance-alert-list div,
  .performance-score-breakdown div {
    grid-template-columns: 1fr;
  }

  .performance-score-ring {
    width: 9.5rem;
  }
}

.sort-button {
  width: auto;
  margin: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  border: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.sort-button::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid rgba(52, 98, 127, 0.45);
  margin-left: 0.45rem;
  vertical-align: middle;
}

.sort-button[data-direction="asc"]::after {
  border-top: none;
  border-bottom: 6px solid var(--accent-deep);
}

.sort-button[data-direction="desc"]::after {
  border-top: 6px solid var(--accent-deep);
}

.row-actions {
  min-width: 150px;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
}

.modal-shell.modal-shell-front {
  z-index: 165;
}

#dashboard-bill-profile-clear-modal {
  z-index: 145;
}

.modal-shell[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 42, 67, 0.42);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 0.35rem;
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45), 0 24px 60px rgba(16, 42, 67, 0.24);
  padding: 1.2rem;
}

.modal-card:has(> .modal-header) {
  padding-top: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 -1.2rem 1rem;
  padding: 1rem 1.2rem;
  background: var(--accent-soft);
  border-bottom: 3px solid rgba(19, 181, 234, 0.34);
  color: var(--text);
}

.modal-header h2 {
  margin: 0;
  color: var(--accent-deep);
}

.modal-header p {
  margin: 0.18rem 0 0;
  color: var(--text-soft);
}

.icon-button {
  width: auto;
  min-width: 2.5rem;
  padding: 0.55rem 0.8rem;
  margin-top: 0;
}

.modal-header .icon-button {
  background: var(--accent-deep);
  border: 1px solid var(--accent-deep);
  color: #fff;
  box-shadow: 0 3px 9px rgba(8, 125, 168, 0.24);
}

.modal-header .icon-button:hover,
.modal-header .icon-button:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: auto;
  min-width: 2.25rem;
  padding: 0.4rem 0.65rem;
  margin-top: 0;
  box-shadow: none;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
  align-items: stretch;
}

.modal-actions form,
.modal-actions .inline {
  display: flex;
  align-items: stretch;
  margin: 0;
}

.modal-actions button {
  width: auto;
  margin-top: 0;
}

.nav-dropdown-menu-right {
  right: 0;
  left: auto;
}

@media (max-width: 1100px) {
  html {
    font-size: 15px;
  }

  .container {
    width: min(100%, calc(100vw - 1.5rem));
    margin: 1rem auto 1.8rem;
  }

  .card {
    padding: 1rem;
  }

  th,
  td {
    padding: 0.68rem 0.62rem;
  }
}

@media (max-width: 820px) {
  html {
    font-size: 14px;
  }

  .topbar {
    padding: 0.85rem 6.4rem 0.85rem 1rem;
    align-items: flex-start;
  }

  .topbar-right {
    width: 100%;
    justify-content: space-between;
  }

  .topbar nav {
    width: 100%;
    gap: 0.35rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .topbar a,
  .nav-dropdown,
  .nav-dropdown-trigger {
    width: auto;
  }

  .topbar a,
  .nav-dropdown-trigger {
    justify-content: center;
    text-align: center;
    padding: 0.4rem 0.58rem;
    font-size: 0.82rem;
  }

  .topbar .nav-dropdown-menu a,
  .topbar .nav-submenu-trigger {
    justify-content: flex-start;
    text-align: left;
  }

  .logout-form {
    width: auto;
    margin-left: auto;
    right: 0.5rem;
  }

  .logout-form .secondary {
    width: auto;
    padding: 0.4rem 0.72rem;
    font-size: 0.8rem;
  }

  .nav-dropdown-menu,
  .nav-dropdown-menu-right {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    width: min(16rem, calc(100vw - 2rem));
    min-width: 12rem;
    margin-top: 0;
    padding: 0.35rem;
    box-shadow: 0 16px 30px rgba(16, 42, 67, 0.16);
    border-color: rgba(134, 157, 180, 0.45);
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    z-index: 30;
  }

  .nav-dropdown:hover .nav-dropdown-menu,
  .nav-dropdown:focus-within .nav-dropdown-menu {
    display: grid;
  }

  .nav-dropdown-menu-right {
    right: 0;
    left: auto;
  }

  .nav-submenu-menu {
    position: static;
    min-width: 0;
    width: 100%;
    margin-top: 0.18rem;
    padding: 0.2rem 0.2rem 0.25rem 0.55rem;
    border: none;
    border-left: 2px solid rgba(19, 181, 234, 0.28);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
  }

  .nav-submenu:hover .nav-submenu-menu,
  .nav-submenu:focus-within .nav-submenu-menu {
    display: grid;
  }

  .nav-submenu-trigger {
    padding: 0.4rem 0.58rem;
    font-size: 0.82rem;
  }

  .nav-submenu-trigger::after {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    border-bottom: 0;
  }

  .container {
    width: min(100%, calc(100vw - 1.1rem));
    margin: 0.85rem auto 1.4rem;
  }

  .directory-toolbar,
  .invoice-table-toolbar,
  .invoice-tab-header,
  .report-filter-form,
  .dashboard-action-row,
  .template-editor-topbar {
    gap: 0.65rem;
  }

  .invoice-tab-header .tab-strip,
  .invoice-tabs-shell .tab-strip {
    width: 100%;
    flex: 1 1 auto;
  }

  .invoice-table-toolbar > *,
  .report-filter-form > div,
  .directory-toolbar > *,
  .dashboard-action-row > * {
    min-width: min(100%, 14rem);
  }

  .modal-card {
    width: min(680px, 95vw);
    max-height: 92vh;
    padding: 1rem;
  }

  .login-auth-wrap {
    min-height: calc(100vh - 9rem);
    padding: 1.4rem 0.75rem;
  }

  input,
  select,
  textarea,
  button {
    font-size: 0.92rem;
    padding: 0.62rem 0.72rem;
  }

  table {
    font-size: 0.8rem;
  }

  thead th {
    font-size: 0.68rem;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 13px;
  }

  body {
    overflow-x: hidden;
  }

  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 0.7rem 6.4rem 0.7rem 0.75rem;
  }

  .topbar .brand-mark {
    min-width: 0;
  }

  .topbar-right {
    display: contents;
  }

  .logout-form {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    align-self: center;
    justify-self: end;
  }

  .logout-form .secondary {
    width: auto;
    min-width: 0;
    margin-top: 0;
  }

  .topbar nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    width: 100%;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.28rem;
  }

  .topbar a,
  .nav-dropdown-trigger {
    padding: 0.34rem 0.48rem;
    font-size: 0.74rem;
    min-height: 0;
  }

  .nav-dropdown {
    width: auto;
  }

  .logout-form .secondary {
    padding: 0.34rem 0.55rem;
    font-size: 0.72rem;
  }

  .user-pill {
    width: 100%;
    text-align: center;
  }

  .container {
    width: min(100%, calc(100vw - 0.75rem));
    margin: 0.7rem auto 1rem;
  }

  .card {
    padding: 0.8rem;
  }

  .big,
  .dashboard-widget-total {
    font-size: 1.55rem;
  }

  .card h2,
  .card h3,
  .directory-toolbar h2 {
    margin-bottom: 0.55rem;
  }

  .directory-toolbar,
  .invoice-table-toolbar,
  .invoice-tab-header,
  .modal-header,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
  }

  .directory-tab-actions,
  .directory-action-row {
    justify-content: flex-end;
  }

  .login-auth-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .login-forgot-button,
  .login-auth-actions button[type="submit"] {
    width: 100%;
  }

  .toolbar-actions > * {
    width: auto;
  }

  .invoice-table-toolbar-pagination,
  .table-tools-date-shell {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .invoice-tabs-shell .invoice-table-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
  }

  .invoice-tabs-shell .invoice-table-toolbar .table-tools-date-shell {
    order: 1;
    flex: 1 1 100%;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.32rem;
    flex-wrap: nowrap;
  }

  .invoice-tabs-shell .invoice-table-toolbar .table-tools-date {
    flex: 1 1 0;
    min-width: 0;
  }

  .invoice-tabs-shell .invoice-table-toolbar .toolbar-button {
    order: 2;
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    padding: 0.46rem 0.72rem;
    font-size: 0.82rem;
  }

  .invoice-tabs-shell .invoice-table-toolbar-pagination {
    order: 3;
    flex: 1 1 100%;
    margin-left: 0;
  }

  input[type="search"],
  .invoice-table-filter-input,
  .invoice-table-toolbar > .invoice-table-filter-input {
    display: block;
    min-width: 0;
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    min-height: 2.35rem;
    height: 2.35rem;
    max-height: 2.35rem;
    padding: 0.32rem 0.56rem;
    font-size: 16px;
    line-height: 1.2;
    box-sizing: border-box;
    -webkit-appearance: textfield;
    appearance: textfield;
  }

  input[type="search"]::-webkit-search-decoration,
  input[type="search"]::-webkit-search-cancel-button,
  input[type="search"]::-webkit-search-results-button,
  input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
  }

  .table-tools-date {
    min-width: 0;
    flex: 1 1 9rem;
  }

  table {
    font-size: 0.74rem;
  }

  thead th {
    font-size: 0.64rem;
  }

  th,
  td {
    padding: 0.52rem 0.48rem;
  }

  .row-actions {
    min-width: 8rem;
  }

  .modal-card {
    width: min(100vw - 0.6rem, 100%);
    max-height: 94vh;
    padding: 0.85rem;
  }

  .invoice-entry-topbar h3,
  #payments-reconciliation-preview-modal .invoice-entry-topbar h3 {
    font-size: 1.25rem;
  }

  .invoice-entry-total-card strong {
    font-size: 1.35rem;
  }
}

@media (max-width: 420px) {
  html {
    font-size: 12.5px;
  }

  input[type="search"],
  .invoice-table-filter-input,
  .invoice-table-toolbar > .invoice-table-filter-input {
    min-height: 2.2rem;
    height: 2.2rem;
    max-height: 2.2rem;
    padding: 0.28rem 0.5rem;
    font-size: 16px;
  }

  .topbar nav {
    grid-template-columns: 1fr;
  }

  .container {
    width: min(100%, calc(100vw - 0.4rem));
  }

  .card {
    padding: 0.72rem;
  }

  table {
    font-size: 0.7rem;
  }

  th,
  td {
    padding: 0.48rem 0.42rem;
  }
}

@media print {
  .topbar,
  .directory-toolbar,
  .table-tools,
  .table-pagination,
  .table-footer,
  .no-print,
  .row-actions,
  script {
    display: none !important;
  }

  .container,
  .card,
  .directory-shell {
    width: 100%;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border: none;
  }

  .eoy-statement-pack {
    gap: 0;
  }

  .eoy-page {
    min-height: 0;
    page-break-after: always;
    padding: 0.45in 0.5in;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .eoy-page:last-child {
    page-break-after: auto;
  }

  .performance-target-printing .performance-target-unit-details,
  .performance-target-printing .performance-target-expense-details {
    overflow: visible !important;
    max-width: none !important;
  }

  .performance-target-printing .performance-target-unit-detail-row,
  .performance-target-printing .performance-target-unit-details,
  .performance-target-printing .performance-target-expense-details {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .performance-target-printing .performance-target-unit-table,
  .performance-target-printing .performance-target-expense-table {
    min-width: 0 !important;
    font-size: 0.72rem;
  }
}



.dashboard-widget-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.dashboard-widget {
  min-height: 220px;
}

.dashboard-balance-card {
  display: flex;
  flex-direction: column;
}

.dashboard-balance-card .dashboard-widget-total {
  margin-top: 0.2rem;
  margin-bottom: 0.35rem;
}

.dashboard-balance-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  align-self: flex-start;
  text-decoration: none;
  margin-top: 0.1rem;
}

.dashboard-widget .tab-button.dashboard-balance-link,
.dashboard-widget .tab-button.dashboard-balance-link.active,
.dashboard-widget .tab-button.dashboard-balance-link[aria-selected="true"] {
  padding: 0.38rem 0.7rem;
  gap: 0.35rem;
  align-self: flex-start;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  border: 1px solid rgba(19, 181, 234, 0.18);
  box-shadow: inset 0 0 0 1px rgba(19, 181, 234, 0.18);
  text-decoration: none;
}

.dashboard-widget .tab-button.dashboard-balance-link strong {
  font-weight: 700;
}

#dashboard-bank-balance-meta {
  width: auto;
  max-width: 100%;
  justify-content: flex-start;
  white-space: nowrap;
}

.dashboard-widget .tab-button.dashboard-balance-link:hover,
.dashboard-widget .tab-button.dashboard-balance-link:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-deep);
  filter: none;
}

.dashboard-balance-selector {
  margin-top: auto;
  padding-top: 1rem;
}

.dashboard-bank-balance-subtotals {
  display: grid;
  gap: 0.22rem;
  margin: -0.05rem 0 0.45rem;
}

.dashboard-bank-balance-subtotal-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.76rem;
}

.dashboard-bank-balance-subtotal-label {
  color: var(--text-soft);
  font-weight: 600;
}

.dashboard-bank-balance-difference-ok {
  color: #287a49;
}

.dashboard-bank-balance-difference-out {
  color: #b24a46;
}

.dashboard-balance-selector .helper-text {
  display: block;
  margin-bottom: 0.35rem;
}

.dashboard-bank-account-picker {
  width: 100%;
  min-width: 0;
}

.dashboard-bank-account-trigger {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) auto;
  box-sizing: border-box;
}

.dashboard-bank-account-menu {
  width: 100%;
  max-width: 100%;
  left: 0;
  right: auto;
}

.dashboard-bank-account-menu-header,
.dashboard-bank-account-option {
  grid-template-columns: minmax(0, 1.35fr) minmax(6.4rem, 0.85fr) minmax(4.4rem, 0.5fr);
}

.dashboard-bank-account-option-bank {
  display: block;
  margin-top: 0.1rem;
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-bank-account-trigger-metrics .dashboard-bank-account-selected-balance-negative,
.dashboard-bank-account-option .dashboard-bank-account-option-balance-negative {
  color: #d64045;
}

.dashboard-balance-card .dashboard-bank-account-picker {
  width: 100%;
  min-width: 0;
}

.dashboard-balance-card .dashboard-bank-account-trigger {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.dashboard-balance-card .dashboard-bank-account-menu {
  width: min(34rem, calc(100vw - 2rem)) !important;
  max-width: min(34rem, calc(100vw - 2rem)) !important;
  min-width: 0;
  left: 0;
  right: auto;
  box-sizing: border-box;
}

.dashboard-widget-grid > .dashboard-widget:nth-child(5),
.dashboard-widget-grid > .dashboard-widget:nth-child(6),
.dashboard-widget-editor-grid > .dashboard-widget-editor-card:nth-child(5),
.dashboard-widget-editor-grid > .dashboard-widget-editor-card:nth-child(6) {
  grid-column: span 2;
}

.dashboard-widget-editor {
  margin-top: 0.85rem;
  border-top: 1px solid rgba(26, 53, 88, 0.12);
  padding-top: 0.85rem;
}

.dashboard-calendar-card {
  width: min(980px, 94vw);
}

.dashboard-calendar-detail-card {
  width: min(840px, 94vw);
}

.dashboard-calendar-detail-body {
  display: grid;
  gap: 0.8rem;
  max-height: min(68vh, 42rem);
  overflow-y: auto;
  padding-right: 0.15rem;
}

.dashboard-calendar-detail-group {
  border: 1px solid rgba(214, 184, 88, 0.34);
  border-radius: 0.75rem;
  background: #fffdf0;
  box-shadow: 0 10px 24px rgba(88, 70, 22, 0.08);
  overflow: hidden;
}

.dashboard-calendar-detail-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.72rem 0.85rem;
  border-bottom: 1px solid rgba(214, 184, 88, 0.28);
  background: #fff8d9;
  color: #4f4216;
}

.dashboard-calendar-detail-group-header strong {
  font-size: 0.98rem;
}

.dashboard-calendar-detail-group-header span {
  color: #6a5618;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-calendar-detail-table {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.86rem;
}

.dashboard-calendar-detail-table th,
.dashboard-calendar-detail-table td {
  white-space: normal;
}

.dashboard-calendar-detail-table th {
  color: #4f4216;
}

.dashboard-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.dashboard-calendar-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.1rem;
}

.dashboard-calendar-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.dashboard-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.6rem;
}

.dashboard-calendar-cell {
  min-height: 104px;
  padding: 0.75rem;
  border: 1px solid rgba(26, 53, 88, 0.14);
  background: rgba(248, 250, 253, 0.96);
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.dashboard-calendar-cell-weekday {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-calendar-cell-day {
  font-size: 1.55rem;
  line-height: 1;
  color: #0d3658;
}

.dashboard-calendar-cell-date {
  font-size: 0.82rem;
  color: var(--text-soft);
}

.dashboard-calendar-hotspots {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 0.4rem;
  width: 100%;
  margin-top: auto;
  padding-top: 0.45rem;
}

.dashboard-calendar-hotspot {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  width: auto;
  margin: 0;
  padding: 0.22rem 0.45rem;
  border: 1px solid rgba(134, 157, 180, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-soft);
  box-shadow: none;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.1;
}

.dashboard-calendar-hotspot-icon {
  font-size: 0.85rem;
  line-height: 1;
}

.dashboard-calendar-hotspot-count {
  min-width: 0.75rem;
  text-align: center;
}

.dashboard-calendar-hotspot:hover,
.dashboard-calendar-hotspot:focus-visible {
  filter: none;
  background: #eef5fb;
  color: #075f81;
}

.dashboard-calendar-tooltip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.45rem);
  z-index: 3;
  min-width: 260px;
  max-width: 360px;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(214, 184, 88, 0.42);
  border-radius: 0.45rem;
  background: #fffdf0;
  box-shadow: 0 14px 30px rgba(88, 70, 22, 0.12);
  color: #4f4216;
  text-align: left;
  display: none;
}

.dashboard-calendar-tooltip::after {
  content: "";
  position: absolute;
  left: 1.2rem;
  bottom: -0.33rem;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 1px solid rgba(214, 184, 88, 0.42);
  border-bottom: 1px solid rgba(214, 184, 88, 0.42);
  background: #fffdf0;
  transform: rotate(45deg);
}

.dashboard-calendar-hotspot:hover .dashboard-calendar-tooltip,
.dashboard-calendar-hotspot:focus-visible .dashboard-calendar-tooltip {
  display: block;
}

.dashboard-calendar-tooltip strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #4f4216;
  font-size: 0.8rem;
  font-weight: 800;
}

.dashboard-calendar-tooltip-line,
.dashboard-calendar-tooltip-group {
  font-size: 0.76rem;
  line-height: 1.35;
  color: #5f501d;
  font-weight: 600;
}

.dashboard-calendar-tooltip-line + .dashboard-calendar-tooltip-line,
.dashboard-calendar-tooltip-group + .dashboard-calendar-tooltip-group {
  margin-top: 0.28rem;
}

.dashboard-calendar-cell.is-weekend {
  background: #e5e9ee;
}

.dashboard-calendar-cell.is-outside-month {
  background: rgba(245, 247, 250, 0.9);
  color: #92a3b3;
}

.dashboard-calendar-cell.is-weekend.is-outside-month {
  background: #dfe4ea;
}

.dashboard-calendar-cell.is-outside-month .dashboard-calendar-cell-day,
.dashboard-calendar-cell.is-outside-month .dashboard-calendar-cell-weekday,
.dashboard-calendar-cell.is-outside-month .dashboard-calendar-cell-date {
  color: #92a3b3;
}

.dashboard-calendar-cell.is-today {
  background: var(--accent-soft);
  border-color: rgba(19, 181, 234, 0.34);
  box-shadow: inset 0 0 0 1px rgba(19, 181, 234, 0.12);
}

.tenant-directory-view-tabs {
  align-items: center;
  margin-bottom: 0.85rem;
}

.table-tools [data-table-leading-controls-for],
.lease-directory-view-tabs,
.system-log-view-tabs {
  margin: 0;
  flex: 0 1 auto;
}

.lease-directory-table-wrap,
.tenant-directory-table-wrap,
.contact-directory-table-wrap,
.property-directory-table-wrap,
.available-rentals-table-wrap,
.inspections-table-wrap,
.todo-items-table-wrap,
.system-log-table-wrap {
  margin-top: 0;
}

.lease-directory-table-wrap .table-tools,
.tenant-directory-table-wrap .table-tools,
.contact-directory-table-wrap .table-tools,
.property-directory-table-wrap .table-tools,
.available-rentals-table-wrap .table-tools,
.inspections-table-wrap .table-tools,
.todo-items-table-wrap .table-tools,
.system-log-table-wrap .table-tools {
  align-items: center;
  margin-bottom: 0.18rem;
  min-height: 0;
}

.lease-directory-table-wrap .table-tools-actions,
.tenant-directory-table-wrap .table-tools-actions,
.contact-directory-table-wrap .table-tools-actions,
.property-directory-table-wrap .table-tools-actions,
.available-rentals-table-wrap .table-tools-actions,
.inspections-table-wrap .table-tools-actions,
.todo-items-table-wrap .table-tools-actions,
.system-log-table-wrap .table-tools-actions {
  flex: 1 1 auto;
}

.lease-directory-table-wrap .table-tools-label:empty,
.tenant-directory-table-wrap .table-tools-label:empty,
.contact-directory-table-wrap .table-tools-label:empty,
.property-directory-table-wrap .table-tools-label:empty,
.available-rentals-table-wrap .table-tools-label:empty,
.inspections-table-wrap .table-tools-label:empty,
.todo-items-table-wrap .table-tools-label:empty,
.system-log-table-wrap .table-tools-label:empty {
  display: none;
}

body.compact-feature-mode .tenant-directory-table,
body.compact-feature-mode #property-directory-table,
body.compact-feature-mode #lease-directory-table {
  font-size: 1.08rem;
}

body.compact-feature-mode .tenant-directory-table th,
body.compact-feature-mode .tenant-directory-table td,
body.compact-feature-mode #property-directory-table th,
body.compact-feature-mode #property-directory-table td,
body.compact-feature-mode #lease-directory-table th,
body.compact-feature-mode #lease-directory-table td {
  font-size: 1.08rem;
  line-height: 1.25;
  padding: 0.78rem 0.72rem;
}

body.compact-feature-mode #tenant-directory-table th,
body.compact-feature-mode #contact-directory-table th,
body.compact-feature-mode #property-directory-table th,
body.compact-feature-mode #lease-directory-table th,
body.compact-feature-mode .available-rentals-shell #available-rentals-table th {
  font-size: 1.08rem;
  line-height: 1.25;
}

body.compact-feature-mode #tenant-directory-table th .sort-button,
body.compact-feature-mode #contact-directory-table th .sort-button,
body.compact-feature-mode #property-directory-table th .sort-button,
body.compact-feature-mode #lease-directory-table th .sort-button {
  font-size: inherit;
  line-height: inherit;
}

body.compact-feature-mode #tenant-directory-table th:nth-child(2),
body.compact-feature-mode #tenant-directory-table th:nth-child(5),
body.compact-feature-mode #tenant-directory-table th:nth-child(6),
body.compact-feature-mode #tenant-directory-table th:nth-child(7),
body.compact-feature-mode #tenant-directory-table td:nth-child(2),
body.compact-feature-mode #tenant-directory-table td:nth-child(5),
body.compact-feature-mode #tenant-directory-table td:nth-child(6),
body.compact-feature-mode #tenant-directory-table td:nth-child(7),
body.compact-feature-mode #contact-directory-table th:nth-child(3),
body.compact-feature-mode #contact-directory-table th:nth-child(5),
body.compact-feature-mode #contact-directory-table td:nth-child(3),
body.compact-feature-mode #contact-directory-table td:nth-child(5),
body.compact-feature-mode #property-directory-table th:nth-child(2),
body.compact-feature-mode #property-directory-table th:nth-child(5),
body.compact-feature-mode #property-directory-table td:nth-child(2),
body.compact-feature-mode #property-directory-table td:nth-child(5),
body.compact-feature-mode #lease-directory-table th:nth-child(2),
body.compact-feature-mode #lease-directory-table th:nth-child(3),
body.compact-feature-mode #lease-directory-table th:nth-child(4),
body.compact-feature-mode #lease-directory-table th:nth-child(6),
body.compact-feature-mode #lease-directory-table th:nth-child(7),
body.compact-feature-mode #lease-directory-table th:nth-child(8),
body.compact-feature-mode #lease-directory-table td:nth-child(2),
body.compact-feature-mode #lease-directory-table td:nth-child(3),
body.compact-feature-mode #lease-directory-table td:nth-child(4),
body.compact-feature-mode #lease-directory-table td:nth-child(6),
body.compact-feature-mode #lease-directory-table td:nth-child(7),
body.compact-feature-mode #lease-directory-table td:nth-child(8) {
  display: none;
}

.directory-action-row {
  display: flex;
  justify-content: flex-end;
  margin: -0.15rem 0 0.85rem;
}

.directory-tab-actions {
  margin-left: auto;
  align-self: center;
  justify-content: flex-end;
}

.directory-toolbar .directory-tab-actions {
  align-self: flex-start;
}

.payments-page-tabs .directory-tab-actions,
.tab-strip .directory-tab-actions {
  display: inline-flex;
  margin-bottom: 0;
}

.directory-tabs-inline-message {
  margin-left: auto;
  padding: 0.42rem 0.7rem;
  border-radius: 1px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  align-self: center;
  text-align: right;
  max-width: min(38rem, 100%);
}

.directory-tabs-inline-message.is-success {
  color: #0d6b49;
  background: #edfdf6;
  border: 1px solid #bcefd8;
}

.directory-tabs-inline-message.is-error {
  color: #a61b1b;
  background: #fff0f0;
  border: 1px solid #f4c3c3;
}

@media (max-width: 900px) {
  .directory-tabs-inline-message {
    margin-left: 0;
    width: 100%;
    text-align: left;
  }
}

.report-filter-form {
  display: flex;
  align-items: flex-end;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin: 0.9rem 0 1rem;
}

.report-filter-form > div {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.cash-summary-picker-form {
  margin: 0.9rem 0 1rem;
}

.cash-summary-picker {
  position: relative;
  width: min(27rem, 100%);
}

.app-date-range-picker-shell {
  width: min(27rem, 100%);
  min-width: min(100%, 27rem);
}

.app-date-range-picker-shell .cash-summary-picker {
  width: min(27rem, 100%);
}

.bank-account-summary-date-form {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  order: -1;
  margin-right: 0.45rem;
  width: min(27rem, 100%);
  min-width: min(27rem, 100%);
  flex: 0 0 min(27rem, 100%);
}

.bank-account-summary-date-form .app-date-range-picker-shell,
.bank-account-summary-date-form .cash-summary-picker {
  width: 100%;
  min-width: 0;
}

.cash-summary-picker-trigger {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.54rem 0.72rem;
  border: 1px solid rgba(134, 157, 180, 0.4);
  border-radius: 0.45rem;
  background: rgba(225, 233, 243, 0.95);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.cash-summary-picker-trigger::-webkit-details-marker {
  display: none;
}

.cash-summary-picker-trigger-copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.cash-summary-picker-trigger-copy strong {
  color: #0d3658;
  font-size: 0.82rem;
}

.cash-summary-picker-trigger-copy span {
  color: var(--text-soft);
  font-size: 0.72rem;
}

.cash-summary-picker-trigger-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  color: #47647c;
  flex: 0 0 auto;
}

.cash-summary-picker[open] .cash-summary-picker-trigger {
  border-color: rgba(19, 181, 234, 0.4);
  background: rgba(214, 226, 239, 0.98);
  box-shadow: 0 0 0 4px rgba(19, 181, 234, 0.1);
}

.cash-summary-picker-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  z-index: 35;
  width: min(31rem, calc(100vw - 2rem));
  padding: 0.62rem;
  border: 1px solid rgba(134, 157, 180, 0.4);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 18px 36px rgba(16, 42, 67, 0.16);
}

.cash-summary-picker-menu-header {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 0.55rem;
}

.cash-summary-picker-options {
  display: grid;
  gap: 0.25rem;
}

.cash-summary-period-option {
  width: 100%;
  margin: 0;
  padding: 0.42rem 0.56rem;
  background: #fff;
  color: var(--text);
  border: 1px solid rgba(134, 157, 180, 0.24);
  border-radius: 0.45rem;
  box-shadow: none;
  text-align: left;
  font-size: 0.8rem;
}

.cash-summary-period-option:hover,
.cash-summary-period-option:focus-visible {
  background: rgba(19, 181, 234, 0.06);
  border-color: rgba(19, 181, 234, 0.35);
}

.cash-summary-period-option.active {
  background: rgba(19, 181, 234, 0.09);
  border-color: rgba(19, 181, 234, 0.5);
}

.cash-summary-period-option-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.cash-summary-period-option-copy strong {
  color: #0d3658;
  font-size: 0.8rem;
}

.cash-summary-period-option-copy span {
  color: var(--text-soft);
  font-size: 0.7rem;
  white-space: nowrap;
}

.cash-summary-custom-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  padding-top: 0.65rem;
  margin-top: 0.6rem;
  border-top: 1px solid rgba(134, 157, 180, 0.2);
}

.cash-summary-custom-panel > div {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.cash-summary-custom-panel label {
  margin-top: 0;
  margin-bottom: 0.15rem;
  font-size: 0.78rem;
}

.cash-summary-custom-panel input {
  padding: 0.38rem 0.5rem;
  font-size: 0.8rem;
}

.cash-summary-custom-panel .report-filter-actions {
  align-self: end;
}

.cash-summary-custom-panel .report-filter-actions button {
  margin-top: 0;
  padding: 0.44rem 0.7rem;
  font-size: 0.78rem;
  width: auto;
}

.report-filter-actions {
  justify-content: flex-end;
}

.akahu-audit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}

.akahu-audit-actions button {
  width: auto;
  flex: 0 0 auto;
}

.report-summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.bank-reconciliation-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem 1rem;
}

.bank-reconciliation-account-form {
  margin: 0.9rem 0 1rem;
}

.bank-reconciliation-account-form select {
  min-width: min(22rem, 100%);
}

.status-chip-warning {
  border-color: rgba(211, 73, 62, 0.4);
  background: rgba(211, 73, 62, 0.08);
}

.audit-change-details summary {
  cursor: pointer;
  color: #0d3658;
  font-weight: 700;
}

.audit-change-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.audit-change-item {
  padding: 0.5rem;
  border: 1px solid rgba(134, 157, 180, 0.26);
  border-radius: 0.45rem;
  background: #fbfcfe;
}

.audit-change-item div {
  display: grid;
  grid-template-columns: 4.2rem minmax(0, 1fr);
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.audit-change-item code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.report-detail-cell {
  background: #fbfcfe;
}

.report-detail-table {
  margin-top: 0.35rem;
}

.report-subcard {
  margin-top: 1rem;
}

.report-table-total-row td {
  position: sticky;
  bottom: 0;
  background: #fffdf0;
  border-top: 2px solid rgba(214, 184, 88, 0.42);
  box-shadow: 0 -8px 20px rgba(88, 70, 22, 0.08);
}

.rent-roll-total-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.rent-roll-total-footer span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.36rem 0.55rem;
  border: 1px solid rgba(214, 184, 88, 0.38);
  border-radius: 999px;
  background: #fff8d9;
  color: #4f4216;
  font-weight: 800;
}

.general-ledger-detail-section {
  padding: 0;
  overflow: hidden;
}

.general-ledger-detail-controls {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.general-ledger-detail-toggle-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-left: auto;
}

.general-ledger-detail-toggle-actions .toolbar-link-button {
  white-space: nowrap;
}

.ledger-source-link {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--accent-deep);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.ledger-source-link:hover,
.ledger-source-link:focus-visible {
  color: var(--accent);
}

.general-ledger-summary-table .report-group-heading-row th {
  background: #edf5f8;
  border-top: 1px solid #cadde5;
  border-bottom: 1px solid #cadde5;
  color: #284f63;
  font-weight: 800;
}

.general-ledger-summary-table .report-section-total-row th {
  background: #f7fbfd;
  border-top: 1px solid #d9e6ec;
  color: #223d4c;
  font-weight: 800;
}

.report-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.8rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d9e6ec;
  border-radius: 0.5rem;
  background: #f7fbfd;
  color: #284f63;
}

.general-ledger-detail-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
  background: #f7fbfd;
  border-bottom: 1px solid #d9e6ec;
}

.general-ledger-detail-summary::marker {
  color: var(--accent-deep);
}

.general-ledger-detail-summary-totals {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: #445a66;
}

.report-opening-row td {
  background: #fbf7ec;
  font-weight: 700;
}

@media (max-width: 760px) {
  .general-ledger-detail-controls {
    flex-direction: column;
  }

  .general-ledger-detail-toggle-actions {
    justify-content: flex-start;
    margin-left: 0;
  }

  .general-ledger-detail-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .general-ledger-detail-summary-totals {
    justify-content: flex-start;
  }
}

.report-expand-toggle {
  padding: 0;
  font-weight: 600;
  color: var(--accent-deep);
  text-align: left;
}

.report-expand-toggle:hover,
.report-expand-toggle:focus-visible {
  text-decoration: underline;
}

.report-expandable-row > td {
  vertical-align: top;
}

.report-detail-row > td {
  background: rgba(238, 244, 247, 0.7);
}

.report-negative-value {
  color: #7a1717 !important;
}

.tenant-modal-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tenant-modal-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.2rem;
}

.tenant-modal-column {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tenant-modal-section-title {
  margin: 0 0 0.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-soft);
}

@media (max-width: 720px) {
  .tenant-modal-columns {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .dashboard-calendar-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-calendar-toolbar-actions {
    justify-content: center;
  }

  .dashboard-calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dashboard-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.dashboard-action-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.dashboard-action-tabs-right {
  margin-left: auto;
}

.dashboard-widget-editor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.dashboard-widget-editor-card {
  min-height: 130px;
  padding: 0.8rem;
  border: 1px solid rgba(26, 53, 88, 0.18);
  background: rgba(248, 250, 253, 0.95);
  border-radius: 1px;
  cursor: move;
}

.dashboard-widget-editor-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-widget-editor-card-body {
  margin-top: 0.75rem;
  color: var(--text-soft);
  font-size: 0.85rem;
}

.dashboard-widget-editor-card.is-dragging {
  opacity: 0.5;
}

.dashboard-widget-editor-card.is-drop-target {
  box-shadow: inset 0 0 0 2px rgba(19, 181, 234, 0.35);
  background: #f4fbff;
}

.dashboard-widget-editor-pool {
  margin-top: 1rem;
}

.dashboard-widget-editor-pool h4 {
  margin: 0 0 0.65rem;
}

.dashboard-widget-editor-pool-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.dashboard-widget-editor-pool-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(26, 53, 88, 0.12);
  background: rgba(248, 250, 253, 0.9);
  border-radius: 1px;
}

.dashboard-widget-editor-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.dashboard-widget-editor-buttons {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.dashboard-widget-total {
  font-size: 2.45rem;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.dashboard-widget-submetric {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(18, 44, 62, 0.08);
}

.dashboard-widget-submetric h3 {
  margin-bottom: 0.35rem;
}

.dashboard-widget-submetric .dashboard-widget-subtotal {
  font-size: 2rem;
  margin-bottom: 0.3rem;
}

.dashboard-bills-card {
  display: flex;
  flex-direction: column;
}

.dashboard-bills-import {
  margin-top: auto;
  padding-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.dashboard-bills-dropzone {
  min-height: 112px;
}

.dashboard-bill-import-modal-card {
  width: min(1320px, 97vw);
}

.dashboard-bill-import-shell {
  min-height: 0;
}

.dashboard-bill-import-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 0.9rem;
  align-items: stretch;
}

.dashboard-bill-import-form-section {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.dashboard-bill-import-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 0.55rem;
}

.dashboard-bill-supplier-card {
  grid-column: 1;
  grid-row: 1;
}

.dashboard-bill-property-card {
  grid-column: 1;
  grid-row: 2;
}

.dashboard-bill-contact-card {
  grid-column: 3;
  grid-row: 2;
}

.dashboard-bill-profile-card {
  grid-column: 2 / 4;
  grid-row: 1;
  min-height: 0;
  align-content: start;
}

.dashboard-bill-chart-account-card {
  grid-column: 1;
  grid-row: 3;
}

.dashboard-bill-amount-card {
  grid-column: 3;
  grid-row: 3;
}

.dashboard-bill-due-date-card {
  grid-column: 2;
  grid-row: 2;
}

.dashboard-bill-reference-card,
.dashboard-bill-description-card,
.dashboard-bill-notes-card {
  grid-column: 1 / -1;
  width: 100%;
}

.dashboard-bill-description-card input,
.dashboard-bill-notes-card textarea,
.dashboard-bill-reference-card input {
  width: 100%;
  display: block;
}

.dashboard-bill-amount-card input {
  text-align: right;
}

#dashboard-bill-supplier-name {
  text-transform: capitalize;
}

.dashboard-bill-import-form-section .invoice-field-card label,
.dashboard-bill-import-form-section .invoice-summary-panel label,
.dashboard-bill-import-preview-panel .invoice-summary-row span {
  font-size: 0.73rem;
  letter-spacing: 0.01em;
}

.dashboard-bill-import-form-section .invoice-field-card input,
.dashboard-bill-import-form-section .invoice-field-card select,
.dashboard-bill-import-form-section .invoice-field-card textarea,
.dashboard-bill-import-form-section .invoice-field-card .invoice-account-combo {
  font-size: 0.9rem;
  padding: 0.48rem 0.58rem;
}

.dashboard-bill-profile-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.45rem;
  align-items: center;
}

.dashboard-bill-profile-edit-button,
.dashboard-bill-profile-delete-button {
  margin-top: 0;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  min-width: 1.9rem;
}

#dashboard-bill-profile-custom {
  margin-top: 0.42rem;
}

.dashboard-bill-import-form-section .invoice-field-card textarea {
  min-height: 84px;
}

.dashboard-bill-import-summary {
  padding: 0.7rem 0.8rem;
  gap: 0.5rem;
}

.dashboard-bill-import-summary .invoice-summary-row span {
  font-size: 0.58rem;
  letter-spacing: 0.04em;
}

.dashboard-bill-import-summary .invoice-summary-row strong {
  font-size: 0.86rem;
  line-height: 1.25;
}

.dashboard-bill-import-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  margin-top: 0.5rem;
}

.dashboard-bill-outlook-button {
  justify-self: start;
}

.dashboard-bill-outlook-hint {
  font-size: 0.76rem;
  line-height: 1.4;
  color: #587189;
}

.dashboard-bill-import-actions .dashboard-balance-link {
  padding: 0.38rem 0.7rem;
  font-size: 0.76rem;
  line-height: 1.1;
  white-space: nowrap;
}

.dashboard-bills-dropzone {
  min-height: 84px;
  padding: 0.65rem 0.8rem;
}

.dashboard-bills-dropzone .invoice-upload-dropzone-copy {
  gap: 0.18rem;
}

.dashboard-bills-dropzone .invoice-upload-dropzone-copy strong {
  font-size: 0.86rem;
}

.dashboard-bills-dropzone .invoice-upload-dropzone-copy span {
  font-size: 0.74rem;
  line-height: 1.3;
}

.dashboard-bill-import-preview-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.55rem;
  min-height: 0;
}

.dashboard-bill-import-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.15rem 0.1rem;
}

.dashboard-bill-import-preview-header strong {
  color: #123a5b;
}

.dashboard-bill-import-preview-header span {
  font-size: 0.78rem;
  color: #587189;
}

.dashboard-bill-import-pdf-shell {
  position: relative;
  min-height: 560px;
  border: 1px solid rgba(117, 145, 171, 0.3);
  background: #edf5fb;
  border-radius: 0.25rem;
  overflow: hidden;
}

.dashboard-bill-import-pdf-frame {
  width: 100%;
  height: 100%;
  min-height: 560px;
  border: 0;
  background: #fff;
}

.dashboard-bill-import-pdf-shell .file-preview-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
}

.dashboard-bill-import-preview {
  margin: 0;
  min-height: 180px;
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid rgba(134, 157, 180, 0.28);
  background: rgba(246, 249, 253, 0.96);
  padding: 0.75rem;
  color: var(--text-soft);
  font-size: 0.8rem;
}

.dashboard-bill-import-mapper {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.dashboard-bill-map-button {
  align-self: flex-start;
}

.dashboard-bill-map-modal-card {
  width: min(980px, 95vw);
  display: flex;
  flex-direction: column;
}

.dashboard-bill-map-modal-card .invoice-entry-shell {
  min-height: 0;
  flex: 1;
}

.dashboard-bill-map-modal-card .invoice-entry-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.dashboard-bill-duplicate-summary {
  margin-top: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.dashboard-bill-map-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.dashboard-bill-import-mapper-controls {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.dashboard-bill-import-mapper-controls select {
  min-width: 180px;
}

.dashboard-bill-import-preview::selection {
  background: rgba(19, 181, 234, 0.28);
}

.dashboard-bill-import-preview-full {
  min-height: 0;
  height: 100%;
  max-height: none;
  flex: 1;
}

.dashboard-bill-outlook-modal-card {
  max-width: min(1180px, 96vw);
}

.dashboard-bill-outlook-shell {
  display: grid;
  gap: 0.55rem;
}

.dashboard-bill-outlook-device-panel {
  display: grid;
  grid-template-columns: minmax(128px, 156px) 1fr;
  gap: 0.65rem;
  align-items: start;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(86, 126, 160, 0.28);
  background: #edf5fb;
  border-radius: 0.8rem;
}

.dashboard-bill-outlook-device-code-wrap {
  display: grid;
  gap: 0.4rem;
  align-content: start;
}

.dashboard-bill-outlook-device-code {
  display: grid;
  place-items: center;
  min-height: 56px;
  padding: 0.45rem 0.7rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(36, 91, 132, 0.18);
  background: #ffffff;
  color: #123a5b;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dashboard-bill-outlook-copy-button {
  justify-self: center;
  min-width: 98px;
  padding: 0.35rem 0.6rem;
  font-size: 0.74rem;
}

.dashboard-bill-outlook-device-copy {
  display: grid;
  gap: 0.35rem;
}

.dashboard-bill-outlook-device-copy .toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
}

.dashboard-bill-outlook-device-copy .toolbar-actions .secondary {
  width: auto;
  min-width: 98px;
  margin-top: 0;
  text-decoration: none;
}

.dashboard-bill-outlook-device-copy p {
  margin: 0;
  color: #325977;
  line-height: 1.35;
  font-size: 0.76rem;
}

.dashboard-bill-outlook-toolbar .toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.dashboard-bill-outlook-toolbar .toolbar-actions button,
.dashboard-bill-outlook-toolbar .toolbar-actions .btn-link {
  white-space: nowrap;
  font-size: 0.74rem;
  padding-top: 0.38rem;
  padding-bottom: 0.38rem;
}

.dashboard-bill-outlook-filters {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dashboard-bill-outlook-filters input,
.dashboard-bill-outlook-filters select {
  min-height: 36px;
  font-size: 0.78rem;
}

.dashboard-bill-outlook-filters input {
  flex: 1;
  min-width: 0;
}

.dashboard-bill-outlook-filters select {
  flex: 0 0 auto;
  width: auto;
  min-width: 120px;
  max-width: 150px;
}

.dashboard-bill-outlook-table-wrap {
  max-height: 68vh;
  overflow: auto;
}

.dashboard-bill-outlook-table-wrap table {
  font-size: 0.78rem;
  table-layout: fixed;
  width: 100%;
  min-width: 940px;
}

.dashboard-bill-outlook-received-col {
  width: 8.5rem;
}

.dashboard-bill-outlook-from-col {
  width: 17%;
}

.dashboard-bill-outlook-subject-col {
  width: 23%;
}

.dashboard-bill-outlook-attachment-col {
  width: 19%;
}

.dashboard-bill-outlook-save-to-col {
  width: 14%;
}

.dashboard-bill-outlook-action-col {
  width: 4rem;
}

.dashboard-bill-outlook-table-wrap th,
.dashboard-bill-outlook-table-wrap td {
  padding: 0.4rem 0.5rem;
  vertical-align: middle;
  line-height: 1.25;
}

.dashboard-bill-outlook-table-wrap th:first-child,
.dashboard-bill-outlook-table-wrap td:first-child,
.dashboard-bill-outlook-actions-cell {
  white-space: nowrap;
}

.dashboard-bill-outlook-subject-cell {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dashboard-bill-outlook-subject-cell strong {
  font-size: 0.8rem;
  font-weight: 600;
}

.dashboard-bill-outlook-attachment-select {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  font-size: 0.76rem;
  padding: 0.35rem 0.45rem;
}

.dashboard-bill-outlook-destination-cell {
  min-width: 0;
}

.dashboard-bill-outlook-destination-cell select {
  min-width: 0;
  width: 100%;
  font-size: 0.76rem;
  padding: 0.35rem 0.45rem;
}

.dashboard-bill-outlook-actions-cell {
  width: 4rem;
  text-align: center;
  white-space: nowrap;
}

.dashboard-bill-outlook-import-button {
  white-space: nowrap;
  width: 1.95rem;
  min-width: 1.95rem;
  margin-top: 0;
  padding: 0.25rem;
  font-size: 0.75rem;
}

.dashboard-bill-outlook-detail-row > td {
  padding-top: 0;
  background: #f7fbfe;
}

.dashboard-bill-outlook-detail-cell {
  border-top: 0;
}

.dashboard-bill-outlook-detail-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.9fr) minmax(220px, 1.1fr);
  gap: 0.5rem;
  padding: 0.65rem 0.75rem 0.8rem;
  border: 1px solid rgba(90, 130, 163, 0.22);
  border-radius: 0.8rem;
  background: #eef6fb;
}

.dashboard-bill-outlook-detail-panel select,
.dashboard-bill-outlook-detail-panel input {
  min-height: 36px;
  font-size: 0.76rem;
}

.dashboard-bill-outlook-detail-panel input {
  width: 100%;
}

@media (max-width: 900px) {
  .dashboard-bill-outlook-detail-panel {
    grid-template-columns: 1fr;
  }
}

.dashboard-bill-map-preview-shell {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
}

.dashboard-bill-selection-menu {
  position: absolute;
  z-index: 2;
  width: min(250px, calc(100% - 24px));
  padding: 0.55rem;
  border: 1px solid rgba(8, 125, 168, 0.28);
  border-radius: 0.28rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 34px rgba(16, 42, 67, 0.18);
}

.dashboard-bill-selection-title {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #0d3658;
}

.dashboard-bill-selection-mode {
  display: inline-flex;
  gap: 0.25rem;
  margin-bottom: 0.45rem;
  padding: 0.18rem;
  border-radius: 999px;
  background: #eef3f7;
  border: 1px solid rgba(113, 137, 161, 0.18);
}

.dashboard-bill-selection-anchor-direction {
  display: inline-flex;
  gap: 0.2rem;
  margin: 0 0 0.45rem 0.45rem;
  padding: 0.14rem;
  border-radius: 999px;
  background: #f4f7f9;
  border: 1px solid rgba(113, 137, 161, 0.14);
}

.dashboard-bill-selection-mode-button,
.dashboard-bill-selection-option,
.dashboard-bill-anchor-direction-button {
  min-height: 1.8rem;
  padding: 0.22rem 0.45rem;
  font-size: 0.74rem;
  line-height: 1.2;
}

.dashboard-bill-selection-mode-button,
.dashboard-bill-anchor-direction-button {
  background: transparent;
  border-color: transparent;
  color: rgba(95, 116, 136, 0.62);
  border-radius: 999px;
  box-shadow: none;
  opacity: 0.58;
  transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.dashboard-bill-selection-mode-button.active,
.dashboard-bill-anchor-direction-button.active {
  background: #dceef8;
  border-color: rgba(8, 125, 168, 0.32);
  color: #0d3658;
  box-shadow: 0 1px 2px rgba(13, 54, 88, 0.12);
  opacity: 1;
}

.dashboard-bill-selection-anchor-direction[hidden] {
  display: none;
}

.dashboard-bill-selection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.dashboard-bill-selection-option {
  width: auto;
}

.dashboard-bill-map-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: auto;
  flex-wrap: wrap;
}

.dashboard-bill-map-actions .helper-text {
  margin: 0;
}

.dashboard-bill-text-highlight {
  background: #fff29b;
  border-radius: 0.12rem;
  box-shadow: inset 0 -1px 0 rgba(184, 134, 11, 0.28);
  cursor: help;
}

.dashboard-bill-text-highlight.is-anchor {
  background: #dff4d8;
  box-shadow: inset 0 -1px 0 rgba(74, 138, 65, 0.24);
}

.dashboard-overdue-tabs-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.dashboard-widget-title-row,
.dashboard-widget-tab-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
}

.dashboard-widget-title-row h3 {
  margin: 0;
}

.dashboard-widget-icon-action {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  border: 1px solid rgba(19, 181, 234, 0.22);
  background: var(--accent-soft);
  color: var(--accent-deep);
  box-shadow: none;
}

.dashboard-widget-icon-action svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
}

.dashboard-widget-icon-action:hover,
.dashboard-widget-icon-action:focus-visible {
  background: #dcecf8;
  color: #064f6b;
  filter: none;
}

.dashboard-widget-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

.dashboard-widget-tab-panel[hidden] {
  display: none !important;
}

.dashboard-widget-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
}

.dashboard-widget-table-wrap {
  margin-top: 0.1rem;
}

.dashboard-widget-mini-table th,
.dashboard-widget-mini-table td {
  font-size: 0.72rem;
  padding: 0.32rem 0.36rem;
  vertical-align: top;
}

.dashboard-widget-mini-table th:last-child,
.dashboard-widget-mini-table td:last-child {
  white-space: nowrap;
}

.dashboard-widget-mini-table .status {
  font-size: 0.68rem;
}

.dashboard-widget-mini-table .dashboard-bill-urgent-row td {
  background: #fff1f1;
  font-weight: 700;
}

.dashboard-todo-footer-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.35rem;
}

.table-pagination-actions .dashboard-todo-footer-actions-attached {
  margin-top: 0;
}

.dashboard-mini-add-button {
  min-height: 0;
  padding: 0.25rem 0.6rem;
  font-size: 0.72rem;
  line-height: 1.1;
}

.dashboard-todo-modal-actions .success-button {
  background: #2f8f55;
  border-color: #287a49;
  color: #fff;
}

.dashboard-todo-modal-actions .success-button:hover,
.dashboard-todo-modal-actions .success-button:focus-visible {
  background: #287a49;
}

.dashboard-widget.warn .dashboard-widget-total.dashboard-widget-total-overdue {
  color: #b24a46 !important;
}

.dashboard-widget-total-negative {
  color: #b24a46 !important;
}

.dashboard-month-bars {
  display: grid;
  gap: 0.42rem;
  margin: 0.55rem 0 0.35rem;
}

.dashboard-month-bar-row {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(4.8rem, 0.8fr) minmax(6rem, 1.4fr) minmax(5.6rem, auto);
  gap: 0.5rem;
  font-size: 0.76rem;
}

.dashboard-month-bar-row .portfolio-bar-label,
.dashboard-month-bar-row .portfolio-bar-value {
  color: var(--text-soft);
  font-weight: 700;
}

.dashboard-month-bar-row .portfolio-bar-value {
  color: var(--text);
  text-align: right;
  white-space: nowrap;
}

.dashboard-month-progress-track {
  position: relative;
  overflow: hidden;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(134, 157, 180, 0.2);
}

.dashboard-month-progress-track .portfolio-bar-fill {
  height: 100%;
  border-radius: inherit;
}

.dashboard-month-bar-fill-total {
  background: linear-gradient(90deg, #b24a46, #d96d66);
}

.dashboard-month-progress-fill {
  min-width: 0;
  background: linear-gradient(90deg, #4aa66a, #8bcf8c);
}

.dashboard-upcoming-table th,
.dashboard-upcoming-table td {
  font-size: 0.76rem;
  padding-top: 0.34rem;
  padding-bottom: 0.34rem;
}

.dashboard-upcoming-table th:nth-child(4),
.dashboard-upcoming-table td:nth-child(4),
.dashboard-upcoming-table th:nth-child(6),
.dashboard-upcoming-table td:nth-child(6) {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .dashboard-widget-grid,
  .dashboard-widget-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-widget-grid > .dashboard-widget:nth-child(5),
  .dashboard-widget-grid > .dashboard-widget:nth-child(6),
  .dashboard-widget-editor-grid > .dashboard-widget-editor-card:nth-child(5),
  .dashboard-widget-editor-grid > .dashboard-widget-editor-card:nth-child(6) {
    grid-column: span 1;
  }
}

@media (max-width: 900px) {
  .dashboard-widget-total {
    font-size: 2.15rem;
  }

  .dashboard-upcoming-table th,
  .dashboard-upcoming-table td {
    font-size: 0.72rem;
  }
}

@media (max-width: 640px) {
  .dashboard-action-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-action-tabs-right {
    margin-left: 0;
  }

  .dashboard-widget-grid,
  .dashboard-widget-editor-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-widget-editor-card-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-widget-total {
    font-size: 1.9rem;
  }

  .dashboard-upcoming-table th,
  .dashboard-upcoming-table td {
    font-size: 0.68rem;
  }
}


/* Header brand and shared tabs */
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  width: auto;
  max-width: 22rem;
}

.brand-mark-icon {
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 1.9rem;
  display: block;
}

.brand-mark-copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.brand-mark-title {
  display: block;
  font-size: 0.98rem;
  line-height: 1.1;
  color: #0d3658;
}

.brand-mark-subtitle {
  display: block;
  font-size: 0.7rem;
  line-height: 1.1;
  color: var(--text-soft);
}

.tab-strip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: auto;
  margin-top: 0;
  padding: 0.45rem 0.72rem;
  background: #f3f6fa;
  color: var(--text-soft);
  border: 1px solid rgba(134, 157, 180, 0.28);
  border-bottom: 2px solid rgba(134, 157, 180, 0.34);
  border-radius: 0.35rem 0.35rem 0 0;
  box-shadow: none;
  font-weight: 600;
  text-decoration: none;
}

.tab-button.active,
.tab-button[aria-selected="true"],
.tab-button:hover,
.tab-button:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-bottom-color: var(--accent-deep);
  box-shadow: inset 0 0 0 1px rgba(19, 181, 234, 0.18);
  text-decoration: none;
}


/* Reconcile Payments page */
.reconciliation-toolbar {
  align-items: flex-start;
  margin-bottom: 0.45rem;
}

.reconciliation-toolbar-heading {
  display: grid;
  gap: 0.1rem;
}

.reconciliation-toolbar-heading h2 {
  margin-bottom: 0;
}

.reconciliation-filter-form {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
  width: auto;
  margin-left: auto;
}

.reconciliation-filter-bank-group {
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  gap: 0.45rem;
}

.reconciliation-bank-account-picker {
  position: relative;
  min-width: min(38rem, calc(100vw - 4rem));
}

.reconciliation-bank-account-trigger {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr) auto;
  align-items: center;
  gap: 0.65rem;
  min-width: min(38rem, calc(100vw - 4rem));
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(134, 157, 180, 0.4);
  background: rgba(225, 233, 243, 0.95);
  border-radius: 0.45rem;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.reconciliation-bank-account-trigger::-webkit-details-marker {
  display: none;
}

.reconciliation-bank-account-trigger-copy {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.reconciliation-bank-account-trigger-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.08rem;
}

.reconciliation-bank-account-nav-button {
  width: auto;
  min-width: 1.7rem;
  margin: 0;
  padding: 0.08rem 0.34rem;
  border: 1px solid rgba(134, 157, 180, 0.38);
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  color: #36536a;
  font-size: 0.76rem;
  line-height: 1;
}

.reconciliation-bank-account-nav-button:hover:not(:disabled),
.reconciliation-bank-account-nav-button:focus-visible:not(:disabled) {
  background: rgba(255, 255, 255, 0.92);
  color: #163754;
  filter: none;
}

.reconciliation-bank-account-nav-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.reconciliation-bank-account-trigger-copy strong {
  color: #163754;
  font-size: 0.84rem;
}

.reconciliation-bank-account-trigger-copy span {
  color: var(--text-soft);
  font-size: 0.69rem;
  white-space: nowrap;
}

.reconciliation-bank-account-trigger-metrics {
  display: grid;
  justify-items: end;
  gap: 0.08rem;
  color: var(--text-soft);
  font-size: 0.68rem;
  white-space: nowrap;
}

.reconciliation-bank-account-trigger-metrics span:first-child {
  color: #163754;
  font-size: 0.81rem;
  font-weight: 700;
}

.payments-bank-difference-ok {
  color: #287a49;
}

.payments-bank-difference-out {
  color: #b24a46;
}

.reconciliation-bank-account-trigger-caret {
  width: 0.72rem;
  height: 0.72rem;
  border-right: 2px solid rgba(22, 55, 84, 0.7);
  border-bottom: 2px solid rgba(22, 55, 84, 0.7);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.reconciliation-bank-account-picker[open] .reconciliation-bank-account-trigger {
  border-color: rgba(19, 181, 234, 0.4);
  background: rgba(214, 226, 239, 0.98);
  box-shadow: 0 0 0 4px rgba(19, 181, 234, 0.1);
}

.reconciliation-bank-account-picker[open] .reconciliation-bank-account-trigger-caret {
  transform: rotate(225deg);
}

.reconciliation-bank-account-menu {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  z-index: 40;
  width: min(42rem, calc(100vw - 2rem));
  border: 1px solid var(--border-strong);
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(16, 42, 67, 0.16);
  border-radius: 0.7rem;
  overflow: hidden;
}

.reconciliation-bank-account-menu-header,
.reconciliation-bank-account-option {
  display: grid;
  grid-template-columns: minmax(10rem, 1.45fr) minmax(7.4rem, 0.95fr) minmax(6.8rem, 0.85fr) minmax(4.8rem, 0.55fr);
  gap: 0.55rem;
  align-items: center;
}

.reconciliation-bank-account-menu-header {
  padding: 0.54rem 0.7rem;
  background: var(--table-head);
  color: #34627f;
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  border-bottom: 1px solid #ccd9e6;
}

.reconciliation-bank-account-options {
  max-height: min(22rem, 50vh);
  overflow-y: auto;
  background: #ffffff;
}

.reconciliation-bank-account-option {
  width: 100%;
  margin: 0;
  padding: 0.54rem 0.7rem;
  border: 0;
  border-bottom: 1px solid #ccd9e6;
  background: #ffffff;
  background-color: #ffffff;
  background-image: none;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
  box-shadow: none;
}

.reconciliation-bank-account-options > .reconciliation-bank-account-option:nth-of-type(even) {
  background: #dde2e7 !important;
  background-color: #dde2e7 !important;
  background-image: none !important;
}

.reconciliation-bank-account-option:hover,
.reconciliation-bank-account-option:focus-visible {
  background: #cfe6f5 !important;
  background-color: #cfe6f5 !important;
  background-image: none !important;
  outline: none;
}

.reconciliation-bank-account-options > .reconciliation-bank-account-option:nth-of-type(even):hover,
.reconciliation-bank-account-options > .reconciliation-bank-account-option:nth-of-type(even):focus-visible {
  background: #cfe6f5 !important;
  background-color: #cfe6f5 !important;
  background-image: none !important;
}

.reconciliation-bank-account-option.active {
  background: #e4f1fa !important;
  background-color: #e4f1fa !important;
  background-image: none !important;
  box-shadow: inset 3px 0 0 #34627f;
}

.reconciliation-bank-account-option:last-child {
  border-bottom: 0;
}

.reconciliation-bank-account-option-name strong {
  color: #163754;
  font-size: 0.8rem;
}

.reconciliation-bank-account-option-number,
.reconciliation-bank-account-option-count {
  color: var(--text-soft);
  font-size: 0.7rem;
}

.reconciliation-bank-account-option-balance {
  color: #163754;
  font-size: 0.76rem;
  font-weight: 700;
}

.reconciliation-filter-form label {
  margin: 0;
  white-space: nowrap;
}

.reconciliation-count-summary {
  margin: 0;
  color: var(--text-soft);
  white-space: nowrap;
}

.payments-summary-account-copy {
  display: grid;
  gap: 0.16rem;
}

.payments-summary-account-copy .helper-text {
  margin-bottom: 0;
}

.payments-summary-unreconciled-count {
  margin-top: 0.05rem;
  font-size: 0.82rem;
}

.invoice-delete-preview {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(26, 53, 88, 0.12);
  background: rgba(248, 250, 253, 0.92);
  border-radius: 1px;
}

.invoice-delete-preview strong {
  font-size: 1rem;
  color: var(--text-strong);
}

.invoice-delete-preview span {
  color: var(--text-soft);
}

.reconciliation-filter-form select {
  min-width: 16rem;
}

.payments-shared-summary {
  margin-bottom: 0.95rem;
}

.payments-shared-summary-balance {
  margin-left: auto;
  text-align: right;
}

.payments-shared-summary-balance h2,
.payments-shared-summary .bank-account-header > div:first-child h2 {
  margin: 0;
}

.payments-shared-summary-balance .helper-text,
.payments-shared-summary .bank-account-header > div:first-child .helper-text {
  margin-top: 0.2rem;
}

.payments-bank-balance-subtotals {
  display: grid;
  gap: 0.22rem;
  margin-top: 0.45rem;
  font-size: 0.76rem;
}

.payments-bank-balance-subtotal-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
}

.payments-bank-balance-subtotal-label {
  color: var(--text-soft);
  font-weight: 600;
}

.payments-bank-balance-subtotal-label-with-action {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.payments-bank-balance-subtotal-label-with-action > span:first-child {
  min-width: 6.2rem;
  text-align: left;
}

.payments-tabs-card {
  padding: 0.95rem;
}

.reconciliation-shell .payments-tabs-card {
  min-height: 38rem;
}

.payments-table-date-picker-slot {
  width: min(27rem, 100%);
  min-width: min(100%, 27rem);
  flex: 0 0 min(27rem, 100%);
}

.payments-table-date-picker-spacer {
  width: min(27rem, 100%);
  min-width: min(100%, 27rem);
  min-height: 2.4rem;
  flex: 0 0 min(27rem, 100%);
}

.payments-table-date-picker-slot .app-date-range-picker-shell,
.payments-table-date-picker-slot .cash-summary-picker {
  width: 100%;
  min-width: 0;
}

.payments-disabled-date-picker {
  opacity: 0.48;
  filter: grayscale(0.35);
  pointer-events: none;
}

.payments-disabled-date-picker .cash-summary-picker-trigger {
  cursor: not-allowed;
}

.payments-page-tabs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.payments-page-tabs .tab-button {
  text-decoration: none;
}

.tab-panel[hidden] {
  display: none !important;
}

.tab-panel,
.dashboard-widget-tab-panel,
.portfolio-tab-panel {
  opacity: 1;
  transition: opacity 180ms ease;
}

.is-grid-tab-transitioning {
  overflow: hidden;
}

.tab-panel.is-grid-tab-fading-out,
.tab-panel.is-grid-tab-fading-in,
.dashboard-widget-tab-panel.is-grid-tab-fading-out,
.dashboard-widget-tab-panel.is-grid-tab-fading-in,
.portfolio-tab-panel.is-grid-tab-fading-out,
.portfolio-tab-panel.is-grid-tab-fading-in {
  opacity: 0;
}

.tenant-directory-table-wrap,
.contact-directory-table-wrap,
.property-directory-table-wrap,
.lease-directory-table-wrap,
.available-rentals-table-wrap,
.inspections-table-wrap,
.todo-items-table-wrap {
  animation: grid-tab-page-fade-in 180ms ease both;
  opacity: 1;
  transition: opacity 180ms ease;
}

.tenant-directory-table-wrap.is-grid-tab-fading-out,
.tenant-directory-table-wrap.is-grid-tab-fading-in,
.contact-directory-table-wrap.is-grid-tab-fading-out,
.contact-directory-table-wrap.is-grid-tab-fading-in,
.property-directory-table-wrap.is-grid-tab-fading-out,
.property-directory-table-wrap.is-grid-tab-fading-in,
.lease-directory-table-wrap.is-grid-tab-fading-out,
.lease-directory-table-wrap.is-grid-tab-fading-in,
.available-rentals-table-wrap.is-grid-tab-fading-out,
.available-rentals-table-wrap.is-grid-tab-fading-in,
.inspections-table-wrap.is-grid-tab-fading-out,
.inspections-table-wrap.is-grid-tab-fading-in,
.todo-items-table-wrap.is-grid-tab-fading-out,
.todo-items-table-wrap.is-grid-tab-fading-in {
  opacity: 0;
}

.is-grid-tab-link-fading-out {
  opacity: 0;
  transition: opacity 180ms ease;
}

@keyframes grid-tab-page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.payments-tabs-card .tab-panel {
  opacity: 1;
  transition: opacity 180ms ease;
  will-change: opacity;
}

.payments-tabs-card.is-view-transitioning {
  overflow: hidden;
}

.payments-tabs-card .tab-panel.is-fading-out,
.payments-tabs-card .tab-panel.is-fading-in {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .tab-panel,
  .dashboard-widget-tab-panel,
  .portfolio-tab-panel,
  .tenant-directory-table-wrap,
  .contact-directory-table-wrap,
  .property-directory-table-wrap,
  .lease-directory-table-wrap,
  .available-rentals-table-wrap,
  .inspections-table-wrap,
  .todo-items-table-wrap,
  .is-grid-tab-link-fading-out {
    animation: none;
    transition: none;
  }

  .payments-tabs-card .tab-panel {
    transition: none;
  }
}

.reconciliation-submit-cell {
  width: 2.8rem;
  min-width: 2.8rem;
  text-align: center;
  vertical-align: middle;
}

.reconciliation-submit-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 6.4rem;
  height: 100%;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

.journal-submit-button {
  width: auto;
  min-width: 2.1rem;
  margin: 0;
  padding: 0.3rem 0.42rem;
}

.reconciliation-match-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  margin-top: 1.45rem;
  border-radius: 999px;
  background: rgba(88, 168, 116, 0.18);
  color: #2f7a47;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.journal-entry-row-bill-matched > td,
.journal-entry-row-bill-matched:hover > td {
  background: #edf9f0 !important;
}

.journal-entry-row-bill-matched .reconciliation-actions-cell,
.journal-entry-row-bill-matched .journal-inline-card {
  background: #e5f6ea !important;
}

.journal-entry-row-transfer-matched > td,
.journal-entry-row-transfer-matched:hover > td {
  background: #fff9df !important;
}

.journal-entry-row-transfer-matched .reconciliation-actions-cell,
.journal-entry-row-transfer-matched .journal-inline-card {
  background: #fff7d3 !important;
}

.journal-entry-row-reconciled > td {
  animation: reconciliation-row-confirm 860ms ease-out both;
}

.reconciliation-success-tick {
  position: fixed;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #1f8f4d;
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 0.15rem 0.4rem rgba(18, 91, 48, 0.18);
  animation: reconciliation-tick-confirm 860ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.reconciliation-success-tick::before {
  content: "";
  position: absolute;
  width: clamp(3.4rem, 8vw, 5.8rem);
  height: clamp(3.4rem, 8vw, 5.8rem);
  border: 0.18rem solid rgba(31, 143, 77, 0.86);
  border-radius: 999px;
  background: rgba(232, 251, 238, 0.92);
  box-shadow: 0 0.55rem 1.6rem rgba(31, 143, 77, 0.22);
  z-index: -1;
}

@keyframes reconciliation-row-confirm {
  0% {
    background: rgba(42, 177, 96, 0);
  }
  18% {
    background: rgba(42, 177, 96, 0.32);
  }
  58% {
    background: rgba(42, 177, 96, 0.2);
  }
  100% {
    background: rgba(42, 177, 96, 0);
  }
}

@keyframes reconciliation-tick-confirm {
  0% {
    opacity: 0;
    transform: scale(0.62);
  }
  28% {
    opacity: 1;
    transform: scale(1.08);
  }
  48% {
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .journal-entry-row-reconciled > td {
    animation-duration: 220ms;
  }

  .reconciliation-success-tick {
    animation-duration: 220ms;
  }
}

.reconciliation-actions-cell {
  width: 36rem;
  min-width: 36rem;
}

.reconciliation-mobile-summary {
  display: none;
}

.reconciliation-mobile-summary-row {
  display: grid;
  gap: 0.08rem;
}

.reconciliation-mobile-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.7rem;
}

.reconciliation-mobile-summary-actions {
  display: none;
}

.reconciliation-mobile-label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6c8297;
}

.reconciliation-mobile-summary-row strong,
.reconciliation-mobile-summary-row span {
  overflow-wrap: anywhere;
}

.journal-inline-card {
  padding: 0.45rem 0.5rem;
  border: 1px solid rgba(134, 157, 180, 0.32);
  border-radius: 1px;
  background: rgba(245, 248, 252, 0.96);
}

.journal-inline-card-bill-match {
  border-color: rgba(88, 168, 116, 0.42);
  background: #eaf8ee !important;
}

.journal-inline-card-transfer-match {
  border-color: rgba(217, 172, 35, 0.44);
  background: #fff5cd !important;
}

.journal-inline-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 0.45rem;
}

.invoice-page-tabs.journal-tabs-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.18rem;
  padding: 0.18rem;
  border: 1px solid rgba(134, 157, 180, 0.4);
  border-radius: 1px;
  background: rgba(225, 233, 243, 0.95);
}

.invoice-page-tab {
  width: auto;
  margin: 0;
  padding: 0.3rem 0.55rem;
  border: none;
  border-radius: 1px;
  box-shadow: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 600;
}

.invoice-page-tab:hover,
.invoice-page-tab:focus-visible {
  filter: none;
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
}

.invoice-page-tab.active {
  background: #fff;
  color: var(--accent-deep);
  box-shadow: inset 0 0 0 1px rgba(19, 181, 234, 0.18);
}

.journal-tab-panel {
  display: none;
}

.journal-tab-panel.active {
  display: block;
}

.journal-form-grid {
  display: grid;
  gap: 0.55rem;
}

.journal-form-grid-inline,
.journal-form-grid-inline-stack {
  grid-template-columns: minmax(0, 1fr);
}

.journal-form-grid-manual {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  align-items: end;
}

.journal-form-grid > div,
.journal-form-full {
  min-width: 0;
}

.journal-form-grid-manual .journal-form-full {
  grid-column: 1 / -1;
}

.journal-form-grid label {
  margin-top: 0;
  margin-bottom: 0.22rem;
  font-size: 0.74rem;
}

.journal-form-grid input,
.journal-form-grid select {
  margin: 0;
  width: 100%;
  padding: 0.46rem 0.55rem;
  font-size: 0.8rem;
}

.journal-subtext {
  margin-top: 0.15rem;
  font-size: 0.74rem;
  color: var(--text-soft);
}
.journal-single-match {
  display: grid;
  gap: 0.14rem;
  padding: 0.48rem 0.58rem;
  border: 1px solid rgba(134, 157, 180, 0.28);
  background: #f7f9fc;
  color: var(--text-main);
}
.journal-match-choice {
  display: grid;
  gap: 0.35rem;
}

.journal-invoice-adjustment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.45rem;
  margin: 0;
  padding: 0.48rem 0.58rem;
  border: 1px solid rgba(197, 148, 36, 0.34);
  background: #fff8e6;
  color: var(--text-main);
}

.journal-invoice-adjustment[hidden] {
  display: none;
}

.journal-invoice-adjustment input {
  width: auto;
  margin-top: 0.12rem;
}

.journal-invoice-adjustment strong,
.journal-invoice-adjustment small {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.journal-invoice-adjustment strong {
  font-size: 0.78rem;
}

.journal-invoice-adjustment small {
  margin-top: 0.08rem;
  color: var(--text-soft);
  font-size: 0.72rem;
  line-height: 1.25;
}

.journal-invoice-adjustment span {
  min-width: 0;
}

.journal-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.2rem;
}

.journal-single-match-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.journal-single-match-dismiss {
  width: auto;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
}

.journal-single-match-dismiss:hover,
.journal-single-match-dismiss:focus-visible {
  color: var(--danger);
  background: transparent;
}

.journal-single-match strong {
  font-size: 0.82rem;
  font-weight: 700;
}

.journal-single-match span {
  font-size: 0.76rem;
  color: var(--text-soft);
}

.payments-status-link {
  width: auto;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: underline;
}

.payments-invoice-preview-link {
  width: auto;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
}

.invoice-preview-link {
  width: auto;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--accent-deep);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
}

.invoice-bank-match-date {
  color: var(--accent-deep);
  text-decoration: underline dotted;
  text-underline-offset: 0.12rem;
  cursor: help;
  white-space: nowrap;
}

.journal-invoice-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
}

.journal-search-button {
  width: auto;
  margin: 0;
  white-space: nowrap;
}

.journal-search-button-inline {
  width: auto;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
}

.journal-invoice-search-panel {
  margin-top: 0.55rem;
  border: 1px solid rgba(31, 84, 130, 0.16);
  background: #f9fbfd;
  padding: 0.55rem;
  overflow: hidden;
}

.journal-search-row-cell {
  padding: 0.35rem 0.45rem 0.65rem;
  background: rgba(245, 248, 252, 0.5);
}

.journal-search-row:hover .journal-search-row-cell,
.journal-search-row:focus-within .journal-search-row-cell {
  background: rgba(226, 238, 248, 0.92);
}

.journal-search-row:hover .journal-invoice-search-panel,
.journal-search-row:focus-within .journal-invoice-search-panel {
  border-color: rgba(31, 84, 130, 0.28);
  box-shadow: 0 0 0 1px rgba(31, 84, 130, 0.06);
}

.journal-invoice-search-panel-wide {
  margin-top: 0;
}

.journal-invoice-search-controls {
  margin-bottom: 0.45rem;
}

.journal-invoice-search-input {
  width: 100%;
  margin: 0;
}

.journal-invoice-search-results-wrap {
  margin: 0;
  overflow-x: visible;
}

.journal-invoice-search-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}

.journal-invoice-search-table th,
.journal-invoice-search-table td {
  font-size: 0.72rem;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

#reconciliation-table > thead > tr > th:nth-child(1),
#reconciliation-table > tbody > tr.journal-entry-row > td:nth-child(1) {
  width: 6.4rem;
  min-width: 6.4rem;
}

#reconciliation-table > thead > tr > th:nth-child(3),
#reconciliation-table > tbody > tr.journal-entry-row > td:nth-child(3) {
  width: 8rem;
  min-width: 8rem;
}

#reconciliation-table > thead > tr > th:nth-child(4),
#reconciliation-table > tbody > tr.journal-entry-row > td:nth-child(4) {
  width: 6.4rem;
  min-width: 6.4rem;
}

#reconciliation-table > tbody > tr.journal-entry-row > td:nth-child(2) strong {
  display: block;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#reconciliation-table > tbody > tr.journal-entry-row > td:nth-child(2) .helper-text {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

#bank-feeds-accounts-table th:nth-child(2),
#bank-feeds-accounts-table td:nth-child(2) {
  min-width: 10.5rem;
  white-space: nowrap;
}

.invoice-preview-shell .invoice-field-card p {
  margin: 0.2rem 0 0;
}

.invoice-preview-shell .invoice-field-card label {
  color: #214b6b;
  font-weight: 500;
}

.invoice-amount-subline {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  line-height: 1.2;
}

.invoice-preview-grid {
  grid-template-columns:
    minmax(0, 1.2fr)
    minmax(4.6rem, 0.48fr)
    minmax(0, 1fr)
    minmax(9rem, 1.08fr)
    minmax(6.8rem, 0.72fr);
}

.invoice-preview-grid .invoice-field-card {
  min-width: 0;
}

.invoice-preview-field-compact {
  padding-inline: 0.55rem;
}

.invoice-preview-field-compact p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.invoice-preview-period-value {
  white-space: nowrap;
}

.invoice-preview-shell #payments-invoice-preview-notes {
  white-space: pre-wrap;
}

.payments-status-muted {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.payments-unreconciled-placeholder {
  font-size: 0.78rem;
  color: rgba(94, 115, 136, 0.24);
}

.payments-ledger-table {
  width: 100%;
  min-width: 48rem;
}

.payments-ledger-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: scroll;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(52, 98, 127, 0.55) rgba(226, 238, 248, 0.9);
  touch-action: pan-x pan-y;
  padding-bottom: 0.45rem;
}

.payments-ledger-wrap::-webkit-scrollbar {
  height: 0.7rem;
}

.payments-ledger-wrap::-webkit-scrollbar-track {
  background: rgba(226, 238, 248, 0.9);
  border-radius: 999px;
}

.payments-ledger-wrap::-webkit-scrollbar-thumb {
  background: rgba(52, 98, 127, 0.55);
  border-radius: 999px;
}

.payments-ledger-wrap::after {
  content: "Swipe sideways to see all columns";
  display: none;
  margin-top: 0.25rem;
  color: var(--text-soft);
  font-size: 0.72rem;
}

@media (max-width: 900px) {
  .payments-ledger-wrap::after {
    display: block;
  }
}

@media (max-width: 1100px) {
  .reconciliation-actions-cell {
    width: 30rem;
    min-width: 30rem;
  }

  .journal-form-grid-manual {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .reconciliation-filter-form {
    width: 100%;
    margin-left: 0;
  }

  .reconciliation-filter-bank-group {
    width: 100%;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
  }

  .reconciliation-filter-form label {
    margin: 0 0 0.1rem;
  }

  .reconciliation-count-summary {
    margin-left: 0;
  }

  .reconciliation-filter-form select {
    min-width: 0;
  }

  .reconciliation-bank-account-picker,
  .reconciliation-bank-account-trigger,
  .reconciliation-bank-account-menu {
    width: 100%;
    min-width: 0;
  }

  .reconciliation-bank-account-trigger {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
  }

  .reconciliation-bank-account-trigger-metrics {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, auto));
    justify-content: flex-start;
    justify-items: start;
    gap: 0.18rem 0.8rem;
  }

  .bank-account-picker-unreconciled-row {
    justify-content: flex-start;
  }

  .reconciliation-bank-account-menu-header,
  .reconciliation-bank-account-option {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }

  .reconciliation-bank-account-menu-header span:nth-child(3),
  .reconciliation-bank-account-menu-header span:nth-child(4) {
    display: none;
  }

  .payments-shared-summary-balance {
    margin-left: 0;
    text-align: left;
  }

  .dashboard-bank-account-picker,
  .dashboard-bank-account-trigger,
  .dashboard-bank-account-menu {
    width: 100%;
    min-width: 0;
  }

  .dashboard-bank-account-menu-header,
  .dashboard-bank-account-option {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) minmax(0, 0.6fr);
  }

  .reconciliation-actions-cell {
    width: 24rem;
    min-width: 24rem;
  }
}

@media (max-width: 620px) {
  .reconciliation-bank-account-menu-header {
    display: none;
  }

  .reconciliation-bank-account-option {
    grid-template-columns: 1fr;
    gap: 0.18rem;
  }

  .reconciliation-bank-account-option-number,
  .reconciliation-bank-account-option-balance,
  .reconciliation-bank-account-option-count {
    font-size: 0.72rem;
  }

  .dashboard-bank-account-menu-header {
    display: none;
  }

  .dashboard-bank-account-option {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  #reconciliation-table > thead > tr > th:nth-child(1),
  #reconciliation-table > tbody > tr.journal-entry-row > td:nth-child(1),
  #reconciliation-table > thead > tr > th:nth-child(2),
  #reconciliation-table > tbody > tr.journal-entry-row > td:nth-child(2),
  #reconciliation-table > thead > tr > th:nth-child(3),
  #reconciliation-table > tbody > tr.journal-entry-row > td:nth-child(3),
  #reconciliation-table > thead > tr > th:nth-child(4),
  #reconciliation-table > tbody > tr.journal-entry-row > td:nth-child(4) {
    display: none;
  }

  #reconciliation-table > thead > tr > th:nth-child(5),
  #reconciliation-table > tbody > tr.journal-entry-row > td:nth-child(5) {
    display: none;
  }

  .reconciliation-actions-cell {
    width: 22rem;
    min-width: 22rem;
  }

  .reconciliation-mobile-summary-actions {
    display: flex;
    justify-content: center;
    margin: 0.55rem 0 0;
  }

  .reconciliation-submit-cell {
    display: none;
  }

  .reconciliation-submit-stack {
    min-height: 0;
    justify-content: center;
    padding-top: 0;
    padding-bottom: 0;
  }

  .journal-submit-button {
    min-width: 2.25rem;
    padding: 0.24rem 0.42rem;
    font-size: 0.68rem;
    margin: 0;
  }

  .journal-submit-button-mobile {
    width: auto;
    min-width: 7.5rem;
    min-height: 2.05rem;
    margin: 0;
    padding: 0.34rem 0.7rem;
    font-size: 0.95rem;
    line-height: 1;
    font-weight: 800;
  }

  .reconciliation-mobile-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(6.8rem, 0.72fr);
    grid-template-areas:
      "date reference"
      "description amount";
    align-items: start;
    gap: 0.45rem 0.65rem;
    margin-bottom: 0.55rem;
    padding: 0.5rem 0.6rem;
    border: 1px solid rgba(117, 145, 171, 0.2);
    border-radius: 0.55rem;
    background: linear-gradient(180deg, rgba(247, 251, 255, 0.98) 0%, rgba(238, 245, 252, 0.96) 100%);
  }

  .reconciliation-mobile-summary > .reconciliation-mobile-summary-row:first-child {
    grid-area: date;
  }

  .reconciliation-mobile-summary-grid {
    display: contents;
  }

  .reconciliation-mobile-summary-grid > .reconciliation-mobile-summary-row:first-child {
    grid-area: reference;
  }

  .reconciliation-mobile-summary-row-description {
    grid-area: description;
  }

  .reconciliation-mobile-summary-row-description strong {
    line-height: 1.3;
  }

  .reconciliation-mobile-summary-row-amount {
    grid-area: amount;
    text-align: right;
  }

  .reconciliation-mobile-summary-row-amount .reconciliation-mobile-label {
    text-align: right;
  }

  .reconciliation-mobile-summary-row-amount strong {
    color: #0d3658;
  }

  .reconciliation-mobile-panel-submit {
    padding-top: 0.15rem;
  }

  .journal-detail-card.journal-inline-card {
    min-width: 0;
  }

  .journal-inline-topbar .journal-tabs-inline {
    width: 100%;
  }

  .journal-inline-mobile-panels {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }

  .reconciliation-actions-cell.compact-action-cell {
    white-space: normal;
  }

  .journal-search-row-cell {
    display: block;
    width: min(100vw - 1rem, 100%);
    padding: 0.28rem 0.18rem 0.55rem;
  }

  .journal-invoice-search-panel {
    padding: 0.42rem;
  }

  .journal-inline-mobile-panels > [data-mobile-search-host]:empty,
  .journal-inline-mobile-panels > [data-mobile-manual-host]:empty {
    display: none;
  }

  .journal-invoice-search-results-wrap,
  .journal-manual-line-items-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .journal-invoice-search-table {
    min-width: 28rem;
    table-layout: auto;
  }

  .journal-inline-mobile-panels .journal-invoice-search-table th,
  .journal-inline-mobile-panels .journal-invoice-search-table td,
  .journal-inline-mobile-panels .journal-manual-line-items-table th,
  .journal-inline-mobile-panels .journal-manual-line-items-table td {
    display: table-cell;
    visibility: visible;
    color: inherit;
  }

  .journal-manual-overlay-grid {
    grid-template-columns: 1fr;
  }

  .journal-inline-mobile-panels .journal-invoice-search-table thead {
    display: none;
  }

  .journal-invoice-search-mobile-row td {
    padding: 0.3rem 0;
    border-bottom: none;
    background: transparent;
  }

  .journal-invoice-search-mobile-card {
    display: grid;
    gap: 0.32rem;
    padding: 0.5rem 0.55rem;
    border: 1px solid rgba(134, 157, 180, 0.22);
    border-radius: 0.5rem;
    background: #fff;
  }

  .journal-invoice-search-mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
  }

  .journal-invoice-search-mobile-top strong {
    font-size: 0.78rem;
    color: #0d3658;
  }

  .journal-invoice-search-mobile-primary {
    font-size: 0.76rem;
    font-weight: 600;
    color: #15354f;
    line-height: 1.2;
  }

  .journal-invoice-search-mobile-secondary {
    font-size: 0.71rem;
    color: var(--text-soft);
    line-height: 1.2;
  }

  .journal-invoice-search-mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.65rem;
    align-items: start;
  }

  .journal-invoice-search-mobile-field {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
  }

  .journal-invoice-search-mobile-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #62819c;
  }

  .journal-invoice-search-mobile-field strong {
    font-size: 0.74rem;
    color: #15354f;
    line-height: 1.2;
  }

  .journal-invoice-search-mobile-field-amount strong {
    color: #0d3658;
  }

  .journal-manual-line-items-table {
    min-width: 34rem;
  }

  .journal-manual-line-items-toolbar,
  .journal-manual-line-items-footer,
  .journal-manual-line-items-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .journal-manual-line-items-actions {
    margin-left: 0;
  }

  .journal-manual-line-items-footer > *,
  .journal-manual-line-items-actions > * {
    width: 100%;
  }

  .journal-manual-line-items-actions {
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .journal-manual-line-items-actions > * {
    width: auto;
    min-width: 7.5rem;
  }

  .journal-detail-card.journal-inline-card {
    font-size: 0.96rem;
  }

  .journal-detail-card.journal-inline-card .invoice-page-tab {
    font-size: 0.91rem;
  }

  .journal-detail-card.journal-inline-card .journal-form-grid label,
  .journal-detail-card.journal-inline-card .journal-manual-overlay-grid label {
    font-size: 0.89rem;
  }

  .journal-detail-card.journal-inline-card .journal-form-grid input,
  .journal-detail-card.journal-inline-card .journal-form-grid select,
  .journal-detail-card.journal-inline-card .journal-invoice-search-input,
  .journal-detail-card.journal-inline-card .journal-manual-overlay-grid input {
    font-size: 0.96rem;
  }

  .journal-detail-card.journal-inline-card .journal-search-button-inline,
  .journal-detail-card.journal-inline-card .journal-single-match-dismiss {
    font-size: 0.86rem;
  }

  .journal-detail-card.journal-inline-card .journal-single-match strong {
    font-size: 0.98rem;
  }

  .journal-detail-card.journal-inline-card .journal-single-match span,
  .journal-detail-card.journal-inline-card .journal-invoice-adjustment small,
  .journal-detail-card.journal-inline-card .payments-status-link,
  .journal-detail-card.journal-inline-card .payments-invoice-preview-link {
    font-size: 0.91rem;
  }

  .journal-detail-card.journal-inline-card .journal-invoice-search-table th,
  .journal-detail-card.journal-inline-card .journal-invoice-search-table td,
  .journal-detail-card.journal-inline-card .journal-manual-line-items-table th,
  .journal-detail-card.journal-inline-card .journal-manual-line-items-table td {
    font-size: 0.86rem;
  }

  .journal-detail-card.journal-inline-card .journal-invoice-search-mobile-top strong {
    font-size: 0.94rem;
  }

  .journal-detail-card.journal-inline-card .journal-invoice-search-mobile-primary {
    font-size: 0.91rem;
  }

  .journal-detail-card.journal-inline-card .journal-invoice-search-mobile-secondary {
    font-size: 0.85rem;
  }

  .journal-detail-card.journal-inline-card .journal-invoice-search-mobile-label {
    font-size: 0.74rem;
  }

  .journal-detail-card.journal-inline-card .journal-invoice-search-mobile-field strong,
  .journal-detail-card.journal-inline-card .chart-account-picker-line .chart-account-combo,
  .journal-detail-card.journal-inline-card .journal-manual-line-items-table input {
    font-size: 0.88rem;
  }

  .journal-detail-card.journal-inline-card .journal-manual-line-items-toolbar,
  .journal-detail-card.journal-inline-card .journal-manual-line-items-footer,
  .journal-detail-card.journal-inline-card .journal-manual-line-items-actions,
  .journal-detail-card.journal-inline-card .journal-manual-line-items-add-group {
    font-size: 0.96rem;
  }
}

.invoice-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin: 0 0 0.55rem;
}

.invoice-table-toolbar .table-pagination {
  margin: 0;
}

.invoice-table-toolbar-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  flex: 0 0 15rem;
  min-width: 15rem;
}

.invoice-table-toolbar-pagination:empty {
  display: none;
}

.invoice-table-toolbar .table-pagination-inline {
  margin: 0;
}

.invoice-table-toolbar .table-pagination-status {
  white-space: nowrap;
}

.invoice-table-toolbar .invoice-table-filter-input {
  flex: 0 1 16rem;
  width: 16rem;
  min-width: 12rem;
  max-width: 16rem;
  margin: 0;
  padding: 0.34rem 0.58rem;
  font-size: 0.76rem;
  line-height: 1.1;
  border-radius: 1px;
}

.invoice-table-filter-bar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0.55rem;
}

.invoice-table-filter-input {
  width: 16rem;
  min-width: 12rem;
  margin: 0;
  padding: 0.34rem 0.58rem;
  font-size: 0.76rem;
  line-height: 1.1;
  border-radius: 1px;
}

.invoice-table-filter-input::placeholder,
.table-tools-filter::placeholder {
  color: #6d8195;
  opacity: 1;
}

.statement-preview-shell {
  max-height: 62vh;
  overflow: auto;
  padding-right: 0.2rem;
}

.statement-preview-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  background: #fff;
}

.statement-preview-card + .statement-preview-card {
  margin-top: 1rem;
}

.statement-preview-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.statement-preview-header h3 {
  margin: 0;
  font-size: 1rem;
}

.statement-preview-header p,
.statement-preview-meta span,
.statement-preview-meta strong {
  display: block;
  margin: 0.12rem 0;
}

.statement-preview-meta {
  text-align: right;
  font-size: 0.82rem;
  color: var(--text-soft);
}

.statement-preview-table-wrap {
  overflow-x: auto;
}

#invoice-statement-print-modal .modal-card {
  max-height: 92vh;
  min-height: auto;
}

#invoice-statement-print-modal .file-preview-shell {
  flex: 0 0 auto;
  height: min(60vh, 680px);
  min-height: 320px;
}

#invoice-statement-print-modal .file-preview-frame,
#invoice-statement-print-modal .file-preview-empty {
  min-height: 0;
}

#invoice-statement-print-modal .modal-actions {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  margin-top: 0.85rem;
  padding-top: 0.4rem;
  background: #fff;
}

.statement-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.statement-preview-table th,
.statement-preview-table td {
  padding: 0.42rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  white-space: nowrap;
}

.statement-preview-table th {
  background: var(--surface-muted);
  font-weight: 700;
}

.statement-opening-row td {
  font-weight: 600;
  background: rgba(15, 23, 42, 0.04);
}

.bank-account-header {
  align-items: stretch;
  gap: 0.9rem;
}

.bank-account-header-identity,
.bank-account-balance-display {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bank-account-header-identity {
  min-width: 13rem;
}

.bank-account-meta-summary-compact {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(8.2rem, 1fr));
  gap: 0.35rem 0.75rem;
  align-content: center;
  box-sizing: border-box;
  margin: 0;
  padding: 0.55rem 0.8rem;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  background: #fff8d9;
  box-shadow: inset 0 0 0 1px #9fc0df;
}

.bank-account-meta-summary-compact .bank-account-meta-item {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.bank-account-meta-summary-compact .bank-account-meta-item-wide {
  grid-column: span 2;
}

.bank-account-meta-summary-compact label {
  font-size: 0.68rem;
  line-height: 1.1;
  color: #62819c;
  margin: 0;
}

.bank-account-meta-summary-compact span {
  font-size: 0.82rem;
  line-height: 1.2;
  color: #15354f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bank-account-table-toolbar {
  margin-top: 0.35rem;
}

@media (max-width: 1100px) {
  .bank-account-header {
    flex-wrap: wrap;
  }

  .bank-account-header-identity,
  .bank-account-balance-display {
    min-width: 0;
  }

  .bank-account-meta-summary-compact {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    order: 3;
  }

  .bank-account-meta-summary-compact .bank-account-meta-item-wide {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .bank-account-meta-summary-compact {
    grid-template-columns: 1fr;
  }

  .bank-account-meta-summary-compact .bank-account-meta-item-wide {
    grid-column: auto;
  }
}

/* Invoices page and invoice entry modals */
.invoice-tabs-shell .tab-strip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.9rem;
}

.invoice-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.invoice-tab-header .tab-strip {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.invoice-tab-actions {
  margin-left: auto;
}

.invoice-heading-group,
.invoice-header-action-stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.invoice-header-action-stack {
  align-items: flex-end;
  margin-left: auto;
}

.invoice-primary-actions {
  justify-content: flex-end;
}

.invoice-compact-date-slot,
.invoice-compact-bulk-slot,
.invoice-compact-table-tools-slot {
  display: none;
}

.invoice-compact-create-action {
  display: none;
}

.bill-compact-create-action {
  display: none;
}

body:not(.compact-feature-mode) .invoice-desktop-create-action {
  display: flex;
}

body:not(.compact-feature-mode) .invoice-compact-create-action {
  display: none !important;
}

body:not(.compact-feature-mode) .bill-desktop-create-action {
  display: flex;
}

body:not(.compact-feature-mode) .bill-compact-create-action {
  display: none !important;
}

.invoice-tab-label-compact {
  display: none;
}

.invoice-tabs-shell .tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: auto;
  margin-top: 0;
  padding: 0.45rem 0.72rem;
  background: #f3f6fa;
  color: var(--text-soft);
  border: 1px solid rgba(134, 157, 180, 0.28);
  border-bottom: 2px solid rgba(134, 157, 180, 0.34);
  border-radius: 0.35rem 0.35rem 0 0;
  box-shadow: none;
  font-weight: 600;
  text-decoration: none;
}

.invoice-tabs-shell .tab-button.active,
.invoice-tabs-shell .tab-button[aria-selected="true"],
.invoice-tabs-shell .tab-button:hover,
.invoice-tabs-shell .tab-button:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-bottom-color: var(--accent-deep);
  box-shadow: inset 0 0 0 1px rgba(19, 181, 234, 0.18);
  text-decoration: none;
}

.invoice-tabs-shell .tab-panel {
  margin-top: 0;
}

.invoice-tabs-shell .bill-account-column {
  max-width: 7rem;
  min-width: 4.75rem;
  white-space: nowrap;
}

.invoice-tabs-shell td.bill-account-column {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-summary-bar {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.invoice-tab-summary-bar {
  justify-content: flex-end;
  margin-bottom: 0;
  margin-left: auto;
}

.invoice-tab-summary-bar .stat-chip {
  margin: 0;
}

.invoice-compact-search-slot {
  display: none;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.34rem 0.58rem;
  border: 1px solid #9fc0df;
  border-radius: 999px;
  background: #fff8d9;
  color: #5f4b18;
  font-size: 0.78rem;
  white-space: nowrap;
}

.stat-chip strong {
  color: #123a5b;
  font-size: inherit;
  line-height: 1.2;
}

.stat-chip span {
  font-size: inherit;
  color: inherit;
  line-height: 1.2;
}

@media (max-width: 900px) {
  .invoice-tab-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .invoice-tab-summary-bar {
    justify-content: flex-start;
    margin-left: 0;
  }
}

.modal-card-wide {
  width: min(1160px, 95vw);
}

.modal-card-email-preview {
  width: min(840px, 94vw);
}

.two-column-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.two-column-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.fixed-asset-primary-grid,
.fixed-asset-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem 0.85rem;
}

.fixed-asset-primary-grid label,
.fixed-asset-detail-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.fixed-asset-label-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.fixed-asset-field-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  border: 1px solid rgba(52, 98, 127, 0.32);
  border-radius: 999px;
  background: #f5fafc;
  color: #34627f;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.fixed-asset-field-help:hover,
.fixed-asset-field-help:focus-visible {
  border-color: rgba(52, 98, 127, 0.56);
  background: #eef7fb;
  outline: none;
}

.fixed-assets-shell .fixed-assets-tab-panel table {
  table-layout: auto;
}

.fixed-assets-shell .fixed-assets-depreciation-column {
  min-width: 9.8rem;
  white-space: nowrap;
}

.fixed-assets-shell .fixed-assets-asset-account-column {
  min-width: 5.5rem;
  max-width: 7rem;
  white-space: nowrap;
}

.fixed-assets-shell td.fixed-assets-asset-account-column {
  font-weight: 700;
  color: #284f63;
}

.fixed-assets-shell .row-actions.compact-action-cell {
  min-width: 9.8rem;
  padding-left: 0.7rem;
}

.fixed-asset-form textarea {
  min-height: 5.2rem;
}

.fixed-asset-detail-grid textarea {
  min-height: 4.2rem;
}

.fixed-assets-tab-strip .tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  text-decoration: none;
  border-radius: 0.35rem 0.35rem 0 0;
  border-bottom: 2px solid rgba(134, 157, 180, 0.34);
}

.fixed-assets-tab-strip .tab-button.active,
.fixed-assets-tab-strip .tab-button[aria-selected="true"],
.fixed-assets-tab-strip .tab-button:hover,
.fixed-assets-tab-strip .tab-button:focus-visible {
  text-decoration: none;
  border-bottom-color: var(--accent-deep);
}

.fixed-assets-tab-strip .tab-button strong,
.tab-button .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(8, 125, 168, 0.12);
  color: #075f81;
}

.todo-status-tabs .tab-button {
  gap: 0.65rem;
}

.todo-status-tabs .tab-button strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(8, 125, 168, 0.12);
  color: #075f81;
}

.inspection-status-tabs .tab-button {
  gap: 0.65rem;
}

.inspection-status-tabs .tab-button strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(8, 125, 168, 0.12);
  color: #075f81;
}

.todo-item-row td:first-child strong {
  display: block;
  margin-bottom: 0.18rem;
}

.todo-modal-card {
  padding-top: 0;
}

.todo-form-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.7rem 0.85rem;
}

.todo-form-compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 0.85rem;
}

.todo-form-two-column label,
.todo-form-compact-grid label,
.todo-details-field {
  margin-top: 0.35rem;
}

.todo-form .voice-input-status {
  min-height: 0.85rem;
}

.todo-details-field textarea {
  min-height: 5rem;
}

@media (max-width: 760px) {
  .todo-form-two-column,
  .todo-form-compact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .invoice-tabs-shell .tab-strip {
    align-items: center;
    gap: 0.4rem;
  }

  .invoice-tabs-shell .tab-button {
    padding: 0.45rem 0.72rem;
    font-size: 0.95rem;
  }

  .invoice-tab-actions {
    margin-left: auto;
  }

  .invoice-tab-actions .toolbar-button {
    min-width: 0;
    padding: 0.45rem 0.72rem;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .invoice-tab-label-full {
    display: none;
  }

  .invoice-tab-label-compact {
    display: inline;
  }

  .invoice-tab-summary-bar {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
    width: 100%;
  }

  .invoice-tab-summary-bar .stat-chip {
    flex: 0 1 auto;
    padding: 0.34rem 0.5rem;
  }

  .invoice-tab-summary-bar .stat-chip strong,
  .invoice-tab-summary-bar .stat-chip span {
    font-size: 0.78rem;
  }

  .invoice-compact-search-slot {
    display: flex;
    flex: 1 1 9rem;
    min-width: 8.5rem;
    align-items: stretch;
  }

  .invoice-compact-search-slot:empty,
  .invoice-compact-search-slot[hidden] {
    display: none;
  }

  .invoice-compact-search-slot .invoice-table-filter-input {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 2.25rem;
    max-height: none;
    margin: 0;
  }
}

body.compact-feature-mode .invoice-tab-summary-bar {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  width: auto;
  margin-left: 0;
}

body.compact-feature-mode .invoice-tabs-shell > .directory-toolbar {
  align-items: flex-start;
}

body.compact-feature-mode .invoice-heading-group {
  flex: 0 1 auto;
  width: min(100%, 34rem);
  min-width: min(100%, 24rem);
}

body.compact-feature-mode .invoice-tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.18rem;
}

body.compact-feature-mode .invoice-tabs-shell .tab-strip {
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
}

body.compact-feature-mode .invoice-tabs-shell .tab-button {
  padding: 0.45rem 0.72rem;
  font-size: 0.95rem;
}

body.compact-feature-mode .invoice-tab-actions {
  margin-left: auto;
}

body.compact-feature-mode .invoice-desktop-create-action {
  display: flex !important;
  margin-left: auto;
}

body.compact-feature-mode .invoice-compact-create-action {
  display: none !important;
}

body.compact-feature-mode .invoice-compact-date-slot,
body.compact-feature-mode .invoice-compact-bulk-slot,
body.compact-feature-mode .invoice-compact-table-tools-slot {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

body.compact-feature-mode .invoice-compact-date-slot {
  justify-content: flex-start;
  width: 100%;
  max-width: 34rem;
}

body.compact-feature-mode .invoice-compact-date-slot .table-tools-date-shell {
  display: flex;
  align-items: center;
  gap: 0.32rem;
  flex-wrap: nowrap;
  width: 100%;
}

body.compact-feature-mode .invoice-compact-date-slot .table-tools-date {
  flex: 1 1 10rem;
  min-width: 10rem;
}

body.compact-feature-mode .invoice-compact-bulk-slot,
body.compact-feature-mode .invoice-compact-table-tools-slot {
  justify-content: flex-end;
  min-width: 0;
}

body.compact-feature-mode .invoice-compact-bulk-slot {
  flex: 0 1 auto;
  flex-wrap: wrap;
}

body.compact-feature-mode .invoice-compact-date-slot[hidden],
body.compact-feature-mode .invoice-compact-date-slot:empty,
body.compact-feature-mode .invoice-compact-bulk-slot[hidden],
body.compact-feature-mode .invoice-compact-bulk-slot:empty,
body.compact-feature-mode .invoice-compact-table-tools-slot[hidden],
body.compact-feature-mode .invoice-compact-table-tools-slot:empty {
  display: none;
}

body.compact-feature-mode .invoice-compact-table-tools-slot {
  flex: 1 1 auto;
  flex-wrap: wrap;
}

body.compact-feature-mode .bill-desktop-create-action {
  display: flex !important;
  margin-left: auto;
}

body.compact-feature-mode .bill-compact-create-action {
  display: none !important;
}

body.compact-feature-mode .invoice-tab-actions .toolbar-button {
  min-width: 0;
  padding: 0.38rem 0.56rem;
  font-size: 0.74rem;
  white-space: nowrap;
}

body.compact-feature-mode .invoice-tab-label-full {
  display: none;
}

body.compact-feature-mode .invoice-tab-label-compact {
  display: inline;
}

body.compact-feature-mode .invoice-tab-summary-bar .stat-chip {
  flex: 0 1 auto;
  padding: 0.34rem 0.5rem;
  font-size: 1.01rem;
  line-height: 1.2;
}

body.compact-feature-mode .invoice-tab-summary-bar .stat-chip strong,
body.compact-feature-mode .invoice-tab-summary-bar .stat-chip span {
  font-size: 1.01rem;
  line-height: 1.2;
}

body.compact-feature-mode .invoice-compact-search-slot {
  display: flex;
  flex: 1 1 9rem;
  min-width: 8.5rem;
  align-items: stretch;
}

body.compact-feature-mode .invoice-compact-search-slot:empty,
body.compact-feature-mode .invoice-compact-search-slot[hidden] {
  display: none;
}

body.compact-feature-mode .invoice-compact-search-slot .invoice-table-filter-input {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 2.25rem;
  max-height: none;
  margin: 0;
}

body.compact-feature-mode .invoice-tabs-shell .invoice-table-toolbar {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
}

body.compact-feature-mode .invoice-tabs-shell .invoice-table-toolbar:empty {
  display: none;
}

body.compact-feature-mode .invoice-tabs-shell .invoice-table-toolbar .table-tools-date-shell {
  order: 1;
  flex: 1 1 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.32rem;
  flex-wrap: nowrap;
}

body.compact-feature-mode .invoice-tabs-shell .invoice-table-toolbar .table-tools-date {
  flex: 1 1 0;
  min-width: 0;
}

body.compact-feature-mode .invoice-tabs-shell .invoice-table-toolbar .toolbar-button {
  order: 2;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  padding: 0.46rem 0.72rem;
  font-size: 0.82rem;
}

body.compact-feature-mode .invoice-tabs-shell .invoice-table-toolbar-pagination {
  order: 3;
  flex: 0 0 auto;
  margin-left: 0;
}

body.compact-feature-mode .invoice-tabs-shell .invoice-table-toolbar > .invoice-table-filter-input,
body.compact-feature-mode .invoice-compact-table-tools-slot > .invoice-table-filter-input {
  order: 3;
  flex: 1 1 10rem;
  min-width: 8.5rem;
  width: auto;
  margin-left: 0;
}

body.compact-feature-mode .invoice-tabs-shell table {
  font-size: 1.08rem;
}

body.compact-feature-mode .invoice-tabs-shell table th,
body.compact-feature-mode .invoice-tabs-shell table td {
  font-size: 1.08rem;
  line-height: 1.25;
}

body.compact-feature-mode .invoice-tabs-shell .invoice-phone-hide-property,
body.compact-feature-mode .invoice-tabs-shell .invoice-phone-hide-match-date {
  display: none !important;
}

body.compact-feature-mode .invoice-tabs-shell #bill-table-all th:nth-child(4),
body.compact-feature-mode .invoice-tabs-shell #bill-table-all td:nth-child(4),
body.compact-feature-mode .invoice-tabs-shell #bill-table-due-soon th:nth-child(4),
body.compact-feature-mode .invoice-tabs-shell #bill-table-due-soon td:nth-child(4),
body.compact-feature-mode .invoice-tabs-shell #bill-table-outstanding th:nth-child(4),
body.compact-feature-mode .invoice-tabs-shell #bill-table-outstanding td:nth-child(4) {
  display: none !important;
}

body.compact-feature-mode .bank-accounts-shell #bank-account-transactions-table {
  font-size: 1.08rem;
}

body.compact-feature-mode .bank-accounts-shell #bank-account-summary-table {
  font-size: 1.08rem;
}

body.compact-feature-mode .bank-accounts-shell #bank-account-summary-table th,
body.compact-feature-mode .bank-accounts-shell #bank-account-summary-table td {
  font-size: 1.08rem;
  line-height: 1.25;
}

body.compact-feature-mode .bank-accounts-shell #bank-account-transactions-table th,
body.compact-feature-mode .bank-accounts-shell #bank-account-transactions-table td {
  font-size: 1.08rem;
  line-height: 1.25;
}

body.compact-feature-mode .fixed-assets-shell .fixed-assets-tab-panel table {
  font-size: 1.08rem;
}

body.compact-feature-mode .fixed-assets-shell .fixed-assets-tab-panel table th,
body.compact-feature-mode .fixed-assets-shell .fixed-assets-tab-panel table td {
  font-size: 1.08rem;
  line-height: 1.25;
}

body.compact-feature-mode .fixed-assets-shell > .directory-toolbar .toolbar-actions {
  justify-content: flex-end;
  margin-left: auto;
  width: 100%;
}

body.compact-feature-mode .tenant-directory-shell > .directory-toolbar,
body.compact-feature-mode .property-directory-shell > .directory-toolbar,
body.compact-feature-mode .lease-directory-shell > .directory-toolbar,
body.compact-feature-mode .available-rentals-shell > .directory-toolbar,
body.compact-feature-mode .todo-items-shell > .directory-toolbar,
body.compact-feature-mode .fixed-assets-shell > .directory-toolbar {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

body.compact-feature-mode .tenant-directory-shell > .directory-toolbar > *,
body.compact-feature-mode .property-directory-shell > .directory-toolbar > *,
body.compact-feature-mode .lease-directory-shell > .directory-toolbar > *,
body.compact-feature-mode .available-rentals-shell > .directory-toolbar > *,
body.compact-feature-mode .todo-items-shell > .directory-toolbar > *,
body.compact-feature-mode .fixed-assets-shell > .directory-toolbar > * {
  min-width: 0;
}

body.compact-feature-mode .tenant-directory-shell > .directory-toolbar h2,
body.compact-feature-mode .property-directory-shell > .directory-toolbar h2,
body.compact-feature-mode .lease-directory-shell > .directory-toolbar h2,
body.compact-feature-mode .available-rentals-shell > .directory-toolbar h2,
body.compact-feature-mode .todo-items-shell > .directory-toolbar h2,
body.compact-feature-mode .fixed-assets-shell > .directory-toolbar h2 {
  margin-bottom: 0;
}

body.compact-feature-mode .tenant-directory-shell > .directory-toolbar .directory-tab-actions,
body.compact-feature-mode .property-directory-shell > .directory-toolbar .directory-tab-actions,
body.compact-feature-mode .lease-directory-shell > .directory-toolbar .directory-tab-actions,
body.compact-feature-mode .available-rentals-shell > .directory-toolbar .toolbar-actions,
body.compact-feature-mode .todo-items-shell > .directory-toolbar .directory-tab-actions,
body.compact-feature-mode .fixed-assets-shell > .directory-toolbar .toolbar-actions {
  align-self: center;
  justify-content: flex-end;
  margin-left: auto;
  width: auto;
}

body.compact-feature-mode .tenant-directory-table-wrap .table-tools,
body.compact-feature-mode .contact-directory-table-wrap .table-tools,
body.compact-feature-mode .property-directory-table-wrap .table-tools,
body.compact-feature-mode .lease-directory-table-wrap .table-tools,
body.compact-feature-mode .available-rentals-table-wrap .table-tools,
body.compact-feature-mode .inspections-table-wrap .table-tools,
body.compact-feature-mode .todo-items-table-wrap .table-tools {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 0.4rem 0.55rem;
}

body.compact-feature-mode .tenant-directory-table-wrap .table-tools,
body.compact-feature-mode .property-directory-table-wrap .table-tools,
body.compact-feature-mode .lease-directory-table-wrap .table-tools,
body.compact-feature-mode .available-rentals-table-wrap .table-tools,
body.compact-feature-mode .todo-items-table-wrap .table-tools {
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 0.45rem;
}

body.compact-feature-mode .tenant-directory-table-wrap .table-tools-actions,
body.compact-feature-mode .contact-directory-table-wrap .table-tools-actions,
body.compact-feature-mode .property-directory-table-wrap .table-tools-actions,
body.compact-feature-mode .lease-directory-table-wrap .table-tools-actions,
body.compact-feature-mode .available-rentals-table-wrap .table-tools-actions,
body.compact-feature-mode .inspections-table-wrap .table-tools-actions,
body.compact-feature-mode .todo-items-table-wrap .table-tools-actions {
  display: contents;
}

body.compact-feature-mode .tenant-directory-table-wrap .table-tools-filter-shell,
body.compact-feature-mode .contact-directory-table-wrap .table-tools-filter-shell,
body.compact-feature-mode .property-directory-table-wrap .table-tools-filter-shell,
body.compact-feature-mode .lease-directory-table-wrap .table-tools-filter-shell,
body.compact-feature-mode .available-rentals-table-wrap .table-tools-filter-shell,
body.compact-feature-mode .inspections-table-wrap .table-tools-filter-shell,
body.compact-feature-mode .todo-items-table-wrap .table-tools-filter-shell {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: stretch;
  width: 100%;
}

body.compact-feature-mode .tenant-directory-table-wrap .table-tools-filter-shell {
  grid-column: 1 / 3;
}

body.compact-feature-mode .property-directory-table-wrap .table-tools-filter-shell,
body.compact-feature-mode .lease-directory-table-wrap .table-tools-filter-shell,
body.compact-feature-mode .available-rentals-table-wrap .table-tools-filter-shell,
body.compact-feature-mode .todo-items-table-wrap .table-tools-filter-shell {
  grid-column: 1 / 3;
}

body.compact-feature-mode .tenant-directory-table-wrap .table-tools-filter,
body.compact-feature-mode .contact-directory-table-wrap .table-tools-filter,
body.compact-feature-mode .property-directory-table-wrap .table-tools-filter,
body.compact-feature-mode .lease-directory-table-wrap .table-tools-filter,
body.compact-feature-mode .available-rentals-table-wrap .table-tools-filter,
body.compact-feature-mode .inspections-table-wrap .table-tools-filter,
body.compact-feature-mode .todo-items-table-wrap .table-tools-filter {
  width: 100%;
  min-width: 0;
}

.tenant-search-row-add-button {
  display: none;
}

.directory-search-row-add-button {
  display: none;
}

body.compact-feature-mode .tenant-directory-shell > .directory-toolbar .directory-tab-actions {
  display: none;
}

body.compact-feature-mode .property-directory-shell > .directory-toolbar .directory-tab-actions,
body.compact-feature-mode .lease-directory-shell > .directory-toolbar .directory-tab-actions,
body.compact-feature-mode .available-rentals-shell > .directory-toolbar .toolbar-actions,
body.compact-feature-mode .todo-items-shell > .directory-toolbar .directory-tab-actions {
  display: none;
}

body.compact-feature-mode .tenant-directory-table-wrap .tenant-search-row-add-button {
  display: inline-flex;
  grid-column: 3;
  grid-row: 1;
  align-self: stretch;
  justify-self: end;
  align-items: center;
  padding-left: 0.62rem;
  padding-right: 0.62rem;
  white-space: nowrap;
}

body.compact-feature-mode .property-directory-table-wrap .directory-search-row-add-button,
body.compact-feature-mode .lease-directory-table-wrap .directory-search-row-add-button,
body.compact-feature-mode .available-rentals-table-wrap .directory-search-row-add-button,
body.compact-feature-mode .todo-items-table-wrap .directory-search-row-add-button {
  display: inline-flex;
  grid-column: 3;
  grid-row: 1;
  align-self: stretch;
  justify-self: end;
  align-items: center;
  padding-left: 0.62rem;
  padding-right: 0.62rem;
  white-space: nowrap;
}

body.compact-feature-mode .tenant-directory-table-wrap .table-pagination-inline {
  grid-column: 2 / 4;
}

body.compact-feature-mode .property-directory-table-wrap .table-pagination-inline,
body.compact-feature-mode .lease-directory-table-wrap .table-pagination-inline,
body.compact-feature-mode .available-rentals-table-wrap .table-pagination-inline,
body.compact-feature-mode .todo-items-table-wrap .table-pagination-inline {
  grid-column: 2 / 4;
}

body.compact-feature-mode .tenant-directory-table-wrap .tenant-directory-view-tabs,
body.compact-feature-mode .contact-directory-table-wrap .tenant-directory-view-tabs,
body.compact-feature-mode .property-directory-table-wrap .tenant-directory-view-tabs,
body.compact-feature-mode .lease-directory-table-wrap .tenant-directory-view-tabs,
body.compact-feature-mode .available-rentals-table-wrap .tenant-directory-view-tabs,
body.compact-feature-mode .inspections-table-wrap .inspection-status-tabs,
body.compact-feature-mode .todo-items-table-wrap .todo-status-tabs {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

body.compact-feature-mode .tenant-directory-table-wrap .table-pagination-inline,
body.compact-feature-mode .contact-directory-table-wrap .table-pagination-inline,
body.compact-feature-mode .property-directory-table-wrap .table-pagination-inline,
body.compact-feature-mode .lease-directory-table-wrap .table-pagination-inline,
body.compact-feature-mode .available-rentals-table-wrap .table-pagination-inline,
body.compact-feature-mode .inspections-table-wrap .table-pagination-inline,
body.compact-feature-mode .todo-items-table-wrap .table-pagination-inline {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: 0;
}

body.compact-feature-mode .tenant-directory-table-wrap .table-pagination-inline,
body.compact-feature-mode .property-directory-table-wrap .table-pagination-inline,
body.compact-feature-mode .lease-directory-table-wrap .table-pagination-inline,
body.compact-feature-mode .available-rentals-table-wrap .table-pagination-inline,
body.compact-feature-mode .todo-items-table-wrap .table-pagination-inline {
  grid-column: 2 / 4;
  justify-self: end;
  flex-wrap: nowrap;
  white-space: nowrap;
}

body.compact-feature-mode .tenant-directory-table-wrap .table-pagination-inline .table-pagination-status,
body.compact-feature-mode .property-directory-table-wrap .table-pagination-inline .table-pagination-status,
body.compact-feature-mode .lease-directory-table-wrap .table-pagination-inline .table-pagination-status,
body.compact-feature-mode .available-rentals-table-wrap .table-pagination-inline .table-pagination-status,
body.compact-feature-mode .todo-items-table-wrap .table-pagination-inline .table-pagination-status {
  min-width: 0;
}

body.compact-feature-mode .todo-items-shell #todo-items-table,
body.compact-feature-mode .available-rentals-shell #available-rentals-table {
  font-size: 1.08rem;
}

body.compact-feature-mode .todo-items-shell #todo-items-table th,
body.compact-feature-mode .todo-items-shell #todo-items-table td,
body.compact-feature-mode .available-rentals-shell #available-rentals-table th,
body.compact-feature-mode .available-rentals-shell #available-rentals-table td {
  font-size: 1.08rem;
  line-height: 1.25;
}

body.compact-feature-mode .available-rentals-shell #available-rentals-table th {
  font-size: 1.08rem;
  line-height: 1.25;
}

body.compact-feature-mode .available-rentals-shell #available-rentals-table th:nth-child(2),
body.compact-feature-mode .available-rentals-shell #available-rentals-table td:nth-child(2),
body.compact-feature-mode .available-rentals-shell #available-rentals-table th:nth-child(7),
body.compact-feature-mode .available-rentals-shell #available-rentals-table td:nth-child(7) {
  display: none !important;
}

body.compact-feature-mode .account-tabs-shell #account-users-table,
body.compact-feature-mode .account-tabs-shell #account-scheduled-events-table,
body.compact-feature-mode .account-tabs-shell #account-bank-sync-coverage-table,
body.compact-feature-mode .account-tabs-shell #account-database-backups-table,
body.compact-feature-mode .account-tabs-shell #account-businesses-table,
body.compact-feature-mode .account-tabs-shell #system-activity-log-table,
body.compact-feature-mode .account-tabs-shell #system-email-log-table {
  font-size: 1.08rem;
}

body.compact-feature-mode .account-tabs-shell #account-users-table th,
body.compact-feature-mode .account-tabs-shell #account-users-table td,
body.compact-feature-mode .account-tabs-shell #account-scheduled-events-table th,
body.compact-feature-mode .account-tabs-shell #account-scheduled-events-table td,
body.compact-feature-mode .account-tabs-shell #account-bank-sync-coverage-table th,
body.compact-feature-mode .account-tabs-shell #account-bank-sync-coverage-table td,
body.compact-feature-mode .account-tabs-shell #account-database-backups-table th,
body.compact-feature-mode .account-tabs-shell #account-database-backups-table td,
body.compact-feature-mode .account-tabs-shell #account-businesses-table th,
body.compact-feature-mode .account-tabs-shell #account-businesses-table td,
body.compact-feature-mode .account-tabs-shell #system-activity-log-table th,
body.compact-feature-mode .account-tabs-shell #system-activity-log-table td,
body.compact-feature-mode .account-tabs-shell #system-email-log-table th,
body.compact-feature-mode .account-tabs-shell #system-email-log-table td {
  font-size: 1.08rem;
  line-height: 1.25;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-phone-hide-reference,
body.compact-feature-mode .bank-accounts-shell .bank-account-phone-hide-other-account,
body.compact-feature-mode .bank-accounts-shell .bank-account-phone-hide-account-number,
body.compact-feature-mode .bank-accounts-shell .bank-account-phone-hide-unreconciled,
body.compact-feature-mode .fixed-assets-shell .fixed-assets-phone-hide-purchase-date,
body.compact-feature-mode .fixed-assets-shell .fixed-assets-phone-hide-depreciation,
body.compact-feature-mode .fixed-assets-shell .fixed-assets-phone-hide-asset-account {
  display: none !important;
}

body.compact-feature-mode .invoice-tabs-shell .invoice-table-filter-input,
body.compact-feature-mode .bank-accounts-shell .invoice-table-filter-input,
body.compact-feature-mode .account-tabs-shell .table-tools-filter,
body.compact-feature-mode .reconciliation-shell .table-tools-filter {
  font-size: 1.14rem;
  line-height: 1.2;
  min-height: 2.8rem;
  height: auto;
  max-height: none;
  padding: 0.5rem 0.7rem;
}

body.compact-feature-mode .fixed-assets-shell .invoice-table-filter-input,
body.compact-feature-mode .tenant-directory-table-wrap .table-tools-filter,
body.compact-feature-mode .contact-directory-table-wrap .table-tools-filter,
body.compact-feature-mode .property-directory-table-wrap .table-tools-filter,
body.compact-feature-mode .lease-directory-table-wrap .table-tools-filter,
body.compact-feature-mode .available-rentals-table-wrap .table-tools-filter {
  font-size: 1.14rem;
  line-height: 1.2;
  min-height: 2.8rem;
  height: auto;
  max-height: none;
  padding: 0.5rem 0.7rem;
}

body.compact-feature-mode .fixed-assets-shell .fixed-assets-tab-panel .invoice-table-filter-input {
  flex: 0 1 13rem;
  width: 13rem;
  min-width: min(10rem, 100%);
  max-width: 100%;
  font-size: 0.95rem;
  line-height: 1.2;
  min-height: 2.25rem;
  height: auto;
  padding: 0.38rem 0.55rem;
}

body.compact-feature-mode .fixed-assets-shell .fixed-assets-tab-panel .invoice-table-toolbar {
  justify-content: flex-start;
  margin-bottom: 0.35rem;
}

body.compact-feature-mode .todo-items-shell .invoice-table-filter-input {
  flex: 0 1 13rem;
  width: 13rem;
  min-width: min(10rem, 100%);
  max-width: 100%;
  font-size: 0.95rem;
  line-height: 1.2;
  min-height: 2.25rem;
  height: auto;
  padding: 0.38rem 0.55rem;
}

body.compact-feature-mode .todo-items-shell .todo-item-description {
  display: -webkit-box;
  max-width: 20rem;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

body.compact-feature-mode .invoice-tabs-shell .table-tools-date-label,
body.compact-feature-mode .bank-accounts-shell .table-tools-date-label,
body.compact-feature-mode .reconciliation-shell .table-tools-date-label {
  font-size: 1.11rem;
  line-height: 1.2;
}

body.compact-feature-mode .invoice-tabs-shell .table-tools-date,
body.compact-feature-mode .bank-accounts-shell .table-tools-date,
body.compact-feature-mode .reconciliation-shell .table-tools-date {
  font-size: 1.14rem;
  line-height: 1.2;
  min-height: 2.8rem;
  height: auto;
  max-height: none;
  padding: 0.5rem 0.6rem;
}

body.compact-feature-mode .invoice-tabs-shell .table-tools-date-shell,
body.compact-feature-mode .bank-accounts-shell .table-tools-date-shell,
body.compact-feature-mode .reconciliation-shell .table-tools-date-shell {
  gap: 0.5rem;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-table-toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.12rem;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-table-toolbar .app-date-range-picker-shell,
body.compact-feature-mode .bank-accounts-shell .bank-account-table-toolbar .cash-summary-picker {
  order: 1;
  flex: 1 1 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-table-toolbar .cash-summary-picker-trigger {
  min-height: 2.2rem;
  padding: 0.34rem 0.52rem;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-table-toolbar .cash-summary-picker-trigger-copy {
  gap: 0.02rem;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-table-toolbar .cash-summary-picker-trigger-copy strong {
  font-size: 0.92rem;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-table-toolbar .cash-summary-picker-trigger-copy span {
  font-size: 0.78rem;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-table-toolbar .invoice-table-filter-input {
  order: 2;
  flex: 1 1 9rem;
  width: auto;
  min-width: min(8.5rem, 100%);
  max-width: 14rem;
  font-size: 1.14rem;
  line-height: 1.2;
  min-height: 2.8rem;
  height: auto;
  padding: 0.5rem 0.7rem;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-table-toolbar #open-bank-account-description-summary-modal {
  order: 2;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  min-height: 2.05rem;
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-table-toolbar .table-tools-date-label {
  font-size: 0.95rem;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-table-toolbar .table-tools-date {
  font-size: 0.95rem;
  min-height: 2.25rem;
  padding: 0.38rem 0.5rem;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-table-toolbar .invoice-table-toolbar-pagination {
  order: 2;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: 0;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-table-toolbar .table-pagination-inline {
  flex: 0 1 auto;
  gap: 0.25rem;
  margin-left: 0;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-table-toolbar .table-pagination-status {
  min-width: 0;
  font-size: 0.74rem;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-table-toolbar .table-pagination-button {
  min-width: 2.1rem;
  padding: 0.28rem 0.36rem;
}

body.compact-feature-mode .bank-accounts-shell .bank-account-summary-toggle-metrics span,
body.compact-feature-mode .bank-accounts-shell .bank-account-summary-metrics .status-chip {
  font-size: 1.01rem;
  line-height: 1.2;
  padding: 0.44rem 0.65rem;
  gap: 0.35rem;
}

body.compact-feature-mode #todo-create-modal input[type="date"],
body.compact-feature-mode #todo-edit-modal input[type="date"],
body.compact-feature-mode #rental-listing-modal input[type="date"] {
  font-size: 1.14rem;
  line-height: 1.2;
  min-height: 2.8rem;
  padding: 0.5rem 0.6rem;
}

body.compact-feature-mode .reconciliation-shell #reconciliation-table,
body.compact-feature-mode .reconciliation-shell .payments-ledger-table {
  font-size: 1.08rem;
}

body.compact-feature-mode .reconciliation-shell #reconciliation-table th,
body.compact-feature-mode .reconciliation-shell #reconciliation-table td,
body.compact-feature-mode .reconciliation-shell .payments-ledger-table th,
body.compact-feature-mode .reconciliation-shell .payments-ledger-table td {
  font-size: 1.08rem;
  line-height: 1.25;
}

body.compact-feature-mode .reconciliation-shell .payments-bank-statements-table th:nth-child(3),
body.compact-feature-mode .reconciliation-shell .payments-bank-statements-table td:nth-child(3),
body.compact-feature-mode .reconciliation-shell .payments-bank-statements-table th:nth-child(4),
body.compact-feature-mode .reconciliation-shell .payments-bank-statements-table td:nth-child(4),
body.compact-feature-mode .reconciliation-shell .payments-account-transactions-table th:nth-child(3),
body.compact-feature-mode .reconciliation-shell .payments-account-transactions-table td:nth-child(3) {
  display: none !important;
}

body.compact-feature-mode .dashboard-widget {
  font-size: 1.5em;
}

body.compact-feature-mode .dashboard-widget > h3,
body.compact-feature-mode .dashboard-widget-title-row h3,
body.compact-feature-mode .dashboard-widget-tab-row h3,
body.compact-feature-mode .dashboard-widget-submetric h3 {
  font-size: 0.78em;
}

body.compact-feature-mode .dashboard-widget-total {
  font-size: 2.45rem;
}

body.compact-feature-mode .dashboard-widget-submetric .dashboard-widget-subtotal {
  font-size: 2rem;
}

body.compact-feature-mode .dashboard-widget-mini-table th,
body.compact-feature-mode .dashboard-widget-mini-table td,
body.compact-feature-mode .dashboard-upcoming-table th,
body.compact-feature-mode .dashboard-upcoming-table td {
  font-size: 1.08rem;
  line-height: 1.25;
}

body.compact-feature-mode .dashboard-widget-mini-table .status {
  font-size: 1.02rem;
}

body.compact-feature-mode .dashboard-upcoming-table th:nth-child(3),
body.compact-feature-mode .dashboard-upcoming-table td:nth-child(3) {
  display: none !important;
}

body.compact-feature-mode .dashboard-bills-due-table th:nth-child(3),
body.compact-feature-mode .dashboard-bills-due-table td:nth-child(3) {
  display: none !important;
}

body.compact-feature-mode .dashboard-invoices-paid-table th:nth-child(3),
body.compact-feature-mode .dashboard-invoices-paid-table td:nth-child(3),
body.compact-feature-mode .dashboard-invoices-paid-table th:nth-child(4),
body.compact-feature-mode .dashboard-invoices-paid-table td:nth-child(4),
body.compact-feature-mode .dashboard-todo-table th:nth-child(5),
body.compact-feature-mode .dashboard-todo-table td:nth-child(5) {
  display: none !important;
}

.dashboard-tab-with-count {
  gap: 0.55rem;
}

.dashboard-tab-with-count strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: rgba(8, 125, 168, 0.12);
  color: #075f81;
  font-size: 0.72rem;
}

.dashboard-tab-with-count.active strong {
  background: rgba(255, 255, 255, 0.85);
  color: inherit;
}

.chart-account-code-link {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #075f81;
  box-shadow: none;
  text-align: left;
  width: auto;
}

.chart-account-code-link:hover,
.chart-account-code-link:focus-visible {
  color: var(--accent-deep);
  text-decoration: underline;
  filter: none;
}

.chart-account-page-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  margin-bottom: 0.85rem;
  padding: 0.2rem;
  border: 1px solid rgba(134, 157, 180, 0.4);
  border-radius: 0.35rem;
  background: rgba(225, 233, 243, 0.95);
}

.chart-account-page-tabs .invoice-page-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
}

.chart-account-page-tabs .tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(86, 113, 141, 0.12);
  color: inherit;
  font-size: 0.72rem;
  font-weight: 800;
}

.chart-account-reconciliations-card {
  min-height: min(78vh, 860px);
}

.chart-account-reconciliation-filter {
  margin-bottom: 1rem;
}

.chart-account-reconciliation-summary {
  margin-bottom: 0.9rem;
}

.chart-account-reconciliations-table-wrap {
  max-height: 48vh;
  overflow: auto;
}

.manual-journal-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.manual-journal-summary-grid .summary-card {
  background: #f7fbfd;
  border: 1px solid #d9e6ec;
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
}

.manual-journal-summary-grid .summary-card span {
  display: block;
  color: #60737f;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.manual-journal-summary-grid .summary-card strong {
  display: block;
  color: #18323f;
  font-size: 1.45rem;
  margin-top: 0.25rem;
}

.manual-journals-table-wrap .table-tools {
  align-items: center;
  margin-bottom: 0.25rem;
  min-height: 0;
}

.manual-journals-table-wrap .table-tools-label:empty {
  display: none;
}

.manual-journals-table-wrap .table-tools-actions {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.manual-journals-table-wrap .manual-journals-table-filter-input {
  width: min(18rem, 100%);
  min-width: min(12rem, 100%);
  margin: 0;
}

.manual-journal-lines {
  background: #f8fafb;
  border: 1px solid #e2ebef;
  border-radius: 0.65rem;
  overflow: hidden;
}

.manual-journal-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  padding: 0.75rem;
  border-top: 1px solid #e2ebef;
}

.manual-journal-detail-grid h4 {
  margin: 0 0 0.4rem;
  color: #18323f;
  font-size: 0.92rem;
}

.manual-journal-detail-panel {
  display: grid;
  grid-template-rows: auto minmax(2.7rem, auto) auto;
  align-content: start;
  gap: 0.45rem;
  min-width: 0;
}

.manual-journal-detail-helper {
  min-height: 2.7rem;
}

.manual-journal-detail-helper .helper-text,
.manual-journal-detail-helper .compact-document-list {
  margin-bottom: 0;
}

.compact-document-list {
  margin: 0 0 0.6rem;
  padding-left: 1rem;
}

.compact-inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
}

.manual-journal-detail-panel .compact-inline-form:has(select) {
  grid-template-columns: minmax(8rem, 0.85fr) minmax(8.5rem, 1fr) auto;
}

.compact-inline-form input,
.compact-inline-form select {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.compact-inline-form .table-tools-button {
  align-self: stretch;
  margin: 0;
  white-space: nowrap;
}

.budget-edit-table-wrap {
  overflow-x: auto;
}

.budget-edit-table {
  min-width: 920px;
}

.budget-month-input {
  width: 7.5rem;
  min-width: 7.5rem;
  margin: 0;
  text-align: right;
}

.manual-journal-lines table,
.manual-journal-entry-table {
  width: 100%;
  border-collapse: collapse;
}

.manual-journal-lines th,
.manual-journal-lines td,
.manual-journal-entry-table th,
.manual-journal-entry-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #e2ebef;
  font-size: 0.86rem;
}

.manual-journal-entry-table-wrap {
  margin-top: 1rem;
  border: 1px solid #d9e6ec;
  border-radius: 0.85rem;
  overflow: hidden;
}

.manual-journal-entry-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem;
  background: #f7fbfd;
  border-bottom: 1px solid #d9e6ec;
}

.manual-journal-entry-toolbar h3 {
  margin: 0;
  font-size: 1rem;
}

.manual-journal-entry-table input,
.manual-journal-entry-table select {
  width: 100%;
  margin: 0;
}

.manual-journal-total-label,
.manual-journal-total-value {
  font-weight: 800;
}

.manual-journal-balance-message {
  color: #7a4b00;
  background: #fff8e6;
  font-weight: 700;
}

.manual-journal-balance-message.is-balanced {
  color: #0c7c55;
  background: #e9f8f1;
}

.manual-journal-balance-message.is-unbalanced {
  color: #9a6700;
  background: #fff4d6;
}

.manual-journal-modal-card .form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.manual-journal-modal-card .form-actions button {
  width: auto;
  min-width: 8.5rem;
  margin-top: 0;
}

.opening-balances-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.75fr) minmax(0, 1.25fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.opening-balances-panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.8rem;
  margin-bottom: 0.85rem;
}

.opening-balances-panel-header h3,
.opening-balances-help-card h3 {
  margin-top: 0;
}

.opening-balances-panel-header .toolbar-link-button {
  white-space: nowrap;
}

.opening-balances-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.opening-balances-file-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.opening-balances-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.85rem 0;
}

.opening-balances-quick-actions > * {
  width: auto;
  min-width: 11rem;
}

.opening-balances-modal-card {
  max-width: min(980px, calc(100vw - 2rem));
}

.opening-balances-entry-panel {
  display: grid;
  gap: 0.55rem;
  padding: 0.8rem;
  border: 1px solid #d9e6ec;
  border-radius: 0.75rem;
  background: #f7fbfd;
}

.opening-balances-entry-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.opening-balances-entry-table-wrap {
  max-height: min(52vh, 34rem);
  overflow: auto;
}

.opening-balances-entry-table th,
.opening-balances-entry-table td {
  padding: 0.45rem 0.5rem;
  font-size: 0.86rem;
  vertical-align: top;
}

.opening-balances-entry-table select,
.opening-balances-entry-table input {
  width: 100%;
  min-width: 9rem;
  margin: 0;
}

.opening-balances-entry-table td:first-child {
  min-width: 14rem;
}

.opening-balances-entry-table td:nth-child(3) {
  min-width: 16rem;
}

.opening-balances-shell .opening-journal-link {
  display: inline;
  width: auto;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: #1f5f8b;
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.16rem;
  cursor: pointer;
}

.opening-balances-shell .opening-journal-link:hover,
.opening-balances-shell .opening-journal-link:focus-visible {
  color: #16496d;
}

.opening-balances-shell .inline-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  white-space: nowrap;
}

.opening-balances-shell .inline-form {
  margin: 0;
}

.opening-balances-shell .compact-button {
  width: auto;
  min-width: 4.5rem;
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  margin: 0;
}

.opening-balances-shell .danger-button {
  border-color: #f3b4b4;
  background: #fff5f5;
  color: #8a2424;
}

.opening-journal-detail-modal-card {
  max-width: min(900px, calc(100vw - 2rem));
}

.opening-journal-modal-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid #d9e6ec;
  border-radius: 0.55rem;
  background: #f7fbfd;
  font-size: 0.9rem;
}

.opening-journal-lines-table {
  margin: 0;
}

.opening-journal-lines-table th,
.opening-journal-lines-table td {
  padding: 0.42rem 0.5rem;
  font-size: 0.86rem;
}

.opening-journal-lines-table tfoot th {
  border-top: 1px solid #cfdde4;
  background: #f1f6f9;
}

.opening-balances-example {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.8rem;
  padding: 0.8rem;
  border: 1px solid #d9e6ec;
  border-radius: 0.75rem;
  background: #f7fbfd;
}

.opening-balances-example code {
  display: block;
  padding: 0.35rem 0.45rem;
  border-radius: 0.4rem;
  background: #eef4f7;
  color: #18323f;
  white-space: nowrap;
  overflow-x: auto;
}

@media (max-width: 920px) {
  .opening-balances-layout {
    grid-template-columns: 1fr;
  }

  .opening-balances-panel-header {
    grid-template-columns: 1fr;
  }

  .opening-balances-panel-header .toolbar-link-button {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .manual-journal-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .manual-journal-detail-panel,
  .manual-journal-detail-helper {
    min-height: 0;
  }

  .compact-inline-form,
  .manual-journal-detail-panel .compact-inline-form:has(select) {
    grid-template-columns: 1fr;
  }

  .manual-journal-modal-card .form-actions {
    flex-direction: row;
    justify-content: flex-end;
  }

  .manual-journal-modal-card .form-actions button {
    width: auto;
    flex: 0 0 auto;
  }

  .manual-journal-entry-table-wrap {
    overflow-x: auto;
  }

  .manual-journal-entry-table {
    min-width: 720px;
  }
}

@media (max-width: 520px) {
  .manual-journal-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .two-column-form-grid,
  .fixed-asset-primary-grid,
  .fixed-asset-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 721px) and (max-width: 980px) {
  .fixed-asset-primary-grid,
  .fixed-asset-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.modal-card-lease {
  width: min(980px, 94vw);
}

.modal-card-preview {
  width: min(1160px, 95vw);
  min-height: min(82vh, 860px);
  display: flex;
  flex-direction: column;
}

.file-preview-shell {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  min-width: 0;
}

.file-preview-frame,
.file-preview-image,
.file-preview-empty {
  position: absolute;
  inset: 0;
  min-height: 68vh;
  min-width: 0;
  width: 100%;
  height: 100%;
}

.file-preview-frame[hidden],
.file-preview-image[hidden],
.file-preview-empty[hidden] {
  display: none !important;
}

.file-preview-frame {
  border: 0;
  display: block;
}

.file-preview-image {
  object-fit: contain;
  background: #f7f9fc;
}

.file-preview-empty {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem;
}

.file-preview-empty-mobile {
  position: relative;
  inset: auto;
  min-height: 12rem;
  border: 1px solid rgba(134, 157, 180, 0.32);
  border-radius: 0.55rem;
  background: #f3f8fc;
  color: #173f63;
}

.file-preview-empty-mobile p {
  max-width: 24rem;
  margin: 0;
  font-weight: 600;
}

.pdf-document-viewer {
  position: absolute;
  inset: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.85rem;
  padding: 0.85rem;
  background: #eef3f7;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
}

.pdf-document-viewer[hidden] {
  display: none !important;
}

.pdf-document-page {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-right: auto;
  margin-left: auto;
  width: auto;
  max-width: none;
  border-radius: 0.35rem;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 42, 67, 0.16);
  overflow: hidden;
}

.pdf-document-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem;
  border: 1px solid rgba(134, 157, 180, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(16, 42, 67, 0.13);
}

.pdf-document-toolbar button {
  width: 2.15rem;
  min-width: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.pdf-document-zoom-label {
  min-width: 3.4rem;
  color: #173f63;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.pdf-document-page canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
}

.pdf-document-loading {
  align-self: center;
  justify-self: center;
  margin-top: 2rem;
  padding: 0.75rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  color: #173f63;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(16, 42, 67, 0.12);
}

.invoice-entry-shell {
  display: grid;
  gap: 0.7rem;
}

.invoice-entry-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(134, 157, 180, 0.2);
  border-radius: 1px;
  background: linear-gradient(180deg, #f7fbfe 0%, #eef5fb 100%);
}

.invoice-entry-kicker {
  display: inline-block;
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.invoice-entry-topbar h3,
.invoice-section-heading h4 {
  margin: 0;
}

.invoice-entry-topbar h3 {
  font-size: 1.5rem;
  line-height: 1.15;
}

.modal-header-minimal {
  padding-bottom: 0.15rem;
}

#invoice-create-modal .invoice-create-modal-header,
#invoice-edit-modal .invoice-create-modal-header {
  padding: 1rem 1.2rem;
}

#invoice-create-modal .invoice-create-modal-header .invoice-entry-topbar,
#invoice-edit-modal .invoice-create-modal-header .invoice-entry-topbar {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}

#invoice-create-modal .invoice-create-modal-header .invoice-entry-total-card,
#invoice-edit-modal .invoice-create-modal-header .invoice-entry-total-card {
  border-color: rgba(19, 181, 234, 0.26);
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(19, 181, 234, 0.12);
}

.invoice-entry-topbar p,
.invoice-section-heading p {
  margin: 0.2rem 0 0;
  color: var(--text-soft);
}

.invoice-entry-total-card {
  min-width: 10rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(134, 157, 180, 0.24);
  border-radius: 1px;
  background: #fff;
  text-align: right;
}

.invoice-entry-total-card span {
  display: block;
  font-size: 0.76rem;
  color: var(--text-soft);
}

.invoice-entry-total-card strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1.6rem;
  line-height: 1.05;
  color: #0d3658;
}

.invoice-entry-section {
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(134, 157, 180, 0.18);
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.96);
}

.invoice-entry-grid {
  display: grid;
  gap: 0.65rem;
}

.invoice-entry-grid-3 {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.95fr) minmax(0, 0.75fr);
}

.invoice-entry-grid-4 {
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) minmax(0, 0.78fr) minmax(0, 0.72fr);
}

.invoice-entry-grid-5 {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 0.55fr) minmax(0, 0.72fr) minmax(0, 0.62fr);
}

.invoice-entry-grid-notes {
  grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 0.85fr);
  align-items: start;
}

.bill-bottom-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.25fr) minmax(13rem, 0.7fr);
  align-items: start;
}

.bill-bottom-card {
  min-width: 0;
}

.bill-attachments-card,
.bill-bottom-grid .invoice-summary-panel {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.invoice-field-card,
.invoice-summary-panel {
  min-width: 0;
}

.invoice-field-card label,
.invoice-summary-panel label {
  margin-top: 0;
}

.invoice-field-card-wide {
  grid-column: span 1;
}

.invoice-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.invoice-entry-table-wrap {
  overflow-x: auto;
}

.invoice-line-items-table th,
.invoice-line-items-table td {
  vertical-align: middle;
  padding-top: 0.38rem;
  padding-bottom: 0.38rem;
}

.invoice-entry-table-wrap {
  margin-top: 0.35rem;
}

.invoice-entry-actions {
  padding-top: 0.1rem;
}

.invoice-line-description-cell {
  width: 36%;
}

.bill-line-description-field {
  display: block;
}

.bill-line-description-field input {
  min-width: 0;
  width: 100%;
}

.bill-line-description-suggestion-button {
  width: 1.85rem;
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0;
}

.bill-line-description-suggestion-panel {
  position: fixed;
  z-index: 1250;
  min-width: 12rem;
  max-width: min(22rem, calc(100vw - 1rem));
  max-height: min(16rem, calc(100vh - 1rem));
  overflow-y: auto;
  padding: 0.3rem;
  border: 1px solid rgba(58, 82, 104, 0.22);
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 38, 63, 0.18);
  box-sizing: border-box;
}

.bill-line-description-suggestion-panel[hidden] {
  display: none;
}

.bill-line-description-suggestion-option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.58rem 0.65rem;
  border: 0;
  border-radius: 0.6rem;
  background: transparent;
  color: #24384c;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.bill-line-description-suggestion-option:hover,
.bill-line-description-suggestion-option:focus-visible {
  background: rgba(52, 109, 170, 0.12);
  color: #123c63;
  outline: none;
}

.bill-line-description-suggestion-empty {
  padding: 0.55rem 0.65rem;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.invoice-line-quantity-cell {
  width: 10%;
}

.invoice-line-price-cell {
  width: 14%;
}

.bill-line-tax-trigger {
  width: 1.85rem;
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0;
}

.bill-line-tax-popover {
  right: 0;
  width: min(23rem, calc(100vw - 2rem));
}

.invoice-line-account-cell {
  width: 24%;
}

.invoice-line-total {
  font-weight: 700;
  color: #0d3658;
  white-space: nowrap;
  text-align: right;
}

.invoice-line-remove-heading,
.invoice-line-remove-cell {
  width: 1%;
  min-width: 1.9rem;
  max-width: 1.9rem;
  text-align: center;
  white-space: nowrap;
  padding-left: 0.1rem;
  padding-right: 0.1rem;
}

.invoice-line-remove-x {
  width: 1.45rem;
  min-width: 1.45rem;
  height: 1.45rem;
  padding: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  text-transform: lowercase;
}

.invoice-line-amount-heading,
.invoice-line-amount-cell {
  text-align: right;
}

.invoice-account-picker {
  display: grid;
}

.invoice-account-combo {
  width: 100%;
}

.chart-account-picker {
  display: grid;
}

.chart-account-combo {
  width: 100%;
}

.invoice-notes-card textarea {
  min-height: 9rem;
  resize: vertical;
}

.invoice-linked-bill-attachment-field {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.invoice-summary-panel {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(134, 157, 180, 0.18);
  border-radius: 1px;
  background: rgba(246, 249, 253, 0.96);
}

.invoice-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.invoice-summary-row strong {
  font-size: 1.15rem;
  color: #0d3658;
}

.invoice-upload-dropzone {
  position: relative;
  border: 1px dashed rgba(134, 157, 180, 0.55);
  border-radius: 1px;
  background: #fff;
  padding: 0.95rem 1rem;
  cursor: pointer;
}

.invoice-upload-dropzone.is-dragover {
  border-color: rgba(19, 181, 234, 0.8);
  background: #f4fbff;
}

.invoice-upload-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.invoice-upload-dropzone-copy {
  display: grid;
  gap: 0.2rem;
}

.invoice-upload-dropzone-copy strong {
  color: #0d3658;
}

.bank-account-flow-modal-card {
  max-width: min(1100px, calc(100vw - 2rem));
}

.bank-account-flow-shell {
  display: grid;
  gap: 1rem;
}

.bank-account-description-summary-modal-card {
  width: min(78rem, calc(100vw - 3rem));
}

.bank-account-description-summary-shell {
  display: grid;
  gap: 0.9rem;
}

.bank-account-description-summary-table-wrap {
  max-height: min(58vh, 34rem);
  overflow: auto;
}

.bank-account-description-summary-table th[data-description-summary-sort] {
  cursor: pointer;
  user-select: none;
}

.bank-account-description-summary-table th[data-description-summary-sort]::after {
  content: " \25BE";
  color: var(--text-soft);
  font-size: 0.68rem;
  font-weight: 600;
}

.bank-account-flow-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.bank-account-flow-date-shell {
  margin: 0;
  width: min(27rem, 100%);
}

.bank-account-flow-date-shell .app-date-range-picker-shell,
.bank-account-flow-date-shell .cash-summary-picker,
[data-bank-account-import-form] .app-date-range-picker-shell,
[data-bank-account-import-form] .cash-summary-picker {
  width: min(27rem, 100%);
  min-width: 0;
}

.bank-account-flow-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.15fr) minmax(260px, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.bank-account-flow-chart-card,
.bank-account-flow-summary-card {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(134, 157, 180, 0.18);
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.98);
}

.bank-account-flow-chart-head h3 {
  margin: 0;
  color: #0d3658;
}

.bank-account-flow-chart-head p {
  margin: 0.18rem 0 0;
}

.bank-account-flow-line-chart {
  min-height: 24rem;
  margin-top: 0.8rem;
}

.bank-account-flow-svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 26px rgba(24, 46, 74, 0.06));
}

.bank-account-flow-area {
  fill: url(#bank-account-flow-balance-fill);
}

.bank-account-flow-grid-line {
  stroke: rgba(134, 157, 180, 0.24);
  stroke-width: 1;
}

.bank-account-flow-grid-line-zero {
  stroke: rgba(61, 95, 123, 0.45);
  stroke-width: 1.5;
}

.bank-account-flow-axis-label {
  fill: #6b8095;
  font-size: 11px;
}

.bank-account-flow-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bank-account-flow-line-in {
  stroke: #16835f;
  stroke-dasharray: 7 6;
}

.bank-account-flow-line-out {
  stroke: #c0564b;
}

.bank-account-flow-line-balance {
  stroke: #1f5f9c;
}

.bank-account-flow-point {
  stroke: #fff;
  stroke-width: 1.5;
}

.bank-account-flow-series-label {
  font-size: 0.74rem;
  font-weight: 700;
}

.bank-account-flow-series-label-balance {
  fill: #1f5f9c;
}

.bank-account-flow-series-label-in {
  fill: #16835f;
}

.bank-account-flow-series-label-out {
  fill: #c0564b;
}

.bank-account-flow-point-in {
  fill: #16835f;
}

.bank-account-flow-point-out {
  fill: #c0564b;
}

.bank-account-flow-point-balance {
  fill: #1f5f9c;
}

.bank-account-flow-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.7rem;
  color: #496273;
  font-size: 0.84rem;
}

.bank-account-flow-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.bank-account-flow-legend-swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.28rem;
  border-radius: 999px;
}

.bank-account-flow-legend-in {
  background: #16835f;
}

.bank-account-flow-legend-out {
  background: #c0564b;
}

.bank-account-flow-legend-balance {
  background: #1f5f9c;
}

.bank-account-flow-bar-chart {
  margin-top: 0.85rem;
}

.bank-account-flow-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem;
}

.bank-account-flow-bar-group {
  display: grid;
  justify-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.65rem 0.8rem;
  border: 1px solid rgba(134, 157, 180, 0.16);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(248, 251, 254, 0.95), rgba(241, 246, 251, 0.88));
}

.bank-account-flow-bar-group-head {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.bank-account-flow-bar-track {
  position: relative;
  width: 100%;
  min-height: 8rem;
  border-radius: 1px;
  background: linear-gradient(180deg, rgba(233, 241, 248, 0.62), rgba(245, 249, 252, 0.96));
  border: 1px solid rgba(134, 157, 180, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.bank-account-flow-bar {
  position: absolute;
  left: 50%;
  width: 24%;
  transform: translateX(-50%);
  bottom: 0.45rem;
  border-radius: 0.75rem 0.75rem 0.28rem 0.28rem;
}

.bank-account-flow-bar-in {
  background: linear-gradient(180deg, #35b088, #16835f);
}

.bank-account-flow-bar-out {
  background: linear-gradient(180deg, #db7b6d, #c0564b);
}

.bank-account-flow-bar-label,
.bank-account-flow-bar-value {
  color: #334f65;
  font-size: 0.82rem;
  text-align: center;
}

.bank-account-flow-bar-label {
  font-weight: 700;
}

.bank-account-flow-bar-value {
  text-align: right;
}

.bank-account-flow-metrics {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.bank-account-flow-metric {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.3rem;
  border-top: 1px solid rgba(134, 157, 180, 0.16);
}

.bank-account-flow-metric strong {
  color: #0d3658;
}

.bank-account-flow-metric strong.is-negative {
  color: #b24a46;
}

.invoice-existing-attachments {
  display: grid;
  gap: 0.5rem;
}

.invoice-attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(134, 157, 180, 0.2);
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.95);
}

.invoice-entry-actions {
  margin-top: 0;
}

#bill-edit-form .invoice-entry-shell {
  gap: 0.55rem;
}

#bill-edit-form .invoice-entry-topbar {
  margin-bottom: 0.05rem;
}

#bill-edit-form .invoice-entry-topbar .invoice-entry-kicker {
  margin-bottom: 0.1rem;
}

#bill-edit-form .invoice-entry-topbar h3 {
  margin-bottom: 0.1rem;
}

#bill-edit-form .invoice-entry-topbar p {
  margin: 0;
}

#bill-edit-form .invoice-entry-section {
  padding: 0.78rem 0.85rem;
}

#bill-edit-form .bill-edit-grid-top {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.9fr) minmax(0, 0.76fr) minmax(0, 0.72fr);
  gap: 0.55rem;
  align-items: end;
}

#bill-edit-form .bill-edit-reference-card {
  grid-column: span 2;
}

#bill-edit-form .invoice-section-heading {
  margin-bottom: 0.45rem;
}

#bill-edit-form .invoice-section-heading p {
  margin: 0.08rem 0 0;
}

#bill-edit-form .invoice-entry-table-wrap {
  margin-top: 0.12rem;
}

#bill-edit-form .invoice-line-items-table th,
#bill-edit-form .invoice-line-items-table td {
  padding-top: 0.28rem;
  padding-bottom: 0.28rem;
}

#bill-edit-form .invoice-notes-card textarea {
  min-height: 6.5rem;
}

#bill-edit-form .bill-edit-attachments-block {
  display: grid;
  gap: 0.45rem;
}

#bill-edit-form .invoice-summary-panel {
  gap: 0.5rem;
  padding: 0.72rem 0.78rem;
  align-content: start;
}

#bill-edit-form .invoice-existing-attachments {
  gap: 0.35rem;
}

#bill-edit-form .invoice-attachment-item {
  padding: 0.35rem 0.45rem;
}

@media (max-width: 980px) {
  .bank-account-flow-layout {
    grid-template-columns: 1fr;
  }

  .dashboard-bill-import-columns {
    grid-template-columns: 1fr;
  }

  .dashboard-bill-import-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-bill-import-grid > .invoice-field-card,
  .dashboard-bill-supplier-card,
  .dashboard-bill-property-card,
  .dashboard-bill-contact-card,
  .dashboard-bill-profile-card,
  .dashboard-bill-chart-account-card,
  .dashboard-bill-amount-card,
  .dashboard-bill-due-date-card,
  .dashboard-bill-reference-card,
  .dashboard-bill-description-card,
  .dashboard-bill-notes-card {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    min-width: 0;
    width: 100%;
  }

  .dashboard-bill-import-pdf-shell,
  .dashboard-bill-import-pdf-frame {
    min-height: 360px;
  }

  .invoice-entry-grid-3,
  .invoice-entry-grid-4,
  .invoice-entry-grid-5,
  .invoice-entry-grid-notes {
    grid-template-columns: 1fr;
  }

  .bill-bottom-grid {
    grid-template-columns: 1fr;
  }

  .invoice-entry-topbar {
    flex-direction: column;
  }

  .invoice-entry-total-card {
    width: 100%;
    text-align: left;
  }

  #bill-edit-form .bill-edit-grid-top {
    grid-template-columns: 1fr;
  }

  #bill-edit-form .bill-edit-reference-card {
    grid-column: span 1;
  }
}


/* Fixed bottom status bar */
body {
  padding-bottom: 4.4rem;
}

.app-status-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  z-index: 30;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(134, 157, 180, 0.75);
  box-shadow: 0 -8px 24px rgba(16, 42, 67, 0.08);
  backdrop-filter: blur(10px);
  padding-right: 13.2rem;
}

.app-status-inner {
  width: min(1280px, 95vw);
  margin: 0 auto;
  padding: 0.6rem 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  align-items: center;
  gap: 0.75rem;
}

.status-group {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.status-group-left {
  justify-content: flex-start;
  min-width: 0;
}

.status-group-right {
  justify-content: flex-end;
  min-width: 0;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.34rem 0.58rem;
  border: 1px solid #9fc0df;
  border-radius: 999px;
  background: #fff8d9;
  color: #5f4b18;
  font-size: 0.78rem;
  white-space: nowrap;
}

.status-chip strong {
  color: #0d3658;
}

.status-chip.muted {
  border-color: #bfd2e4;
  background: #f4f8fb;
  color: #48687f;
}

.bank-account-summary-metrics .status-chip {
  border-color: #9fc0df;
  background: #fff8d9;
  color: #5f4b18;
}

.bank-account-summary-metrics .status-chip strong {
  color: #123a5b;
}

.status-compact-toggle {
  position: absolute;
  right: 6.9rem;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  flex-shrink: 0;
  width: auto !important;
  min-width: 0;
  max-width: max-content;
  min-height: 0;
  margin: 0;
  padding: 0.34rem 0.55rem;
  border: 1px solid #9fc0df;
  border-radius: 999px;
  background: #eef5fb;
  color: #1e557d;
  box-shadow: 0 8px 20px rgba(21, 65, 103, 0.1);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.status-compact-toggle:hover,
.status-compact-toggle:focus-visible {
  background: #d9ebfa;
  box-shadow: 0 10px 24px rgba(21, 65, 103, 0.16);
}

.status-compact-toggle.is-active {
  border-color: #78afd6;
  background: #d9ebfa;
  color: #174a74;
}

.status-compact-toggle.is-forced {
  border-color: #2d6f9f;
  background: #c8e1f5;
  color: #123f63;
  box-shadow: 0 10px 24px rgba(21, 65, 103, 0.18);
}

.status-compact-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 0.82rem;
  height: 1.05rem;
  color: #2d6f9f;
  font-size: 0;
}

.status-compact-toggle-icon::before {
  content: "";
  width: 0.56rem;
  height: 0.82rem;
  border: 1.5px solid currentColor;
  border-radius: 0.18rem;
  box-shadow: inset 0 -0.14rem 0 currentColor;
}

@media (max-width: 820px) {
  .cash-summary-picker {
    width: 100%;
  }

  .cash-summary-picker-menu {
    width: min(100%, calc(100vw - 1.6rem));
  }

  .cash-summary-custom-panel {
    grid-template-columns: 1fr;
  }

  .cash-summary-period-option-copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .cash-summary-period-option-copy span {
    white-space: normal;
  }

  body {
    padding-bottom: 5.8rem;
  }

  .app-status-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-group-right {
    justify-content: flex-start;
  }
}

/* Shared table row actions */
.row-actions {
  min-width: 150px;
  white-space: nowrap;
}

.compact-action-cell {
  width: 1%;
  white-space: nowrap;
}

td.row-actions.compact-action-cell,
td.compact-action-cell.row-actions {
  display: flex;
  align-items: center;
  gap: 0.22rem;
}

td.row-actions.compact-action-cell > .action-icon-button,
td.row-actions.compact-action-cell > .inline,
td.row-actions.compact-action-cell > form.inline,
td.compact-action-cell.row-actions > .action-icon-button,
td.compact-action-cell.row-actions > .inline,
td.compact-action-cell.row-actions > form.inline {
  flex: 0 0 auto;
  align-self: center;
  margin: 0;
  line-height: 0;
}

td.row-actions.compact-action-cell .action-icon-button,
td.compact-action-cell.row-actions .action-icon-button {
  margin: 0;
}

.compact-action-cell .inline,
.compact-action-cell form.inline {
  display: inline-flex;
  align-items: center;
  width: auto;
  margin: 0;
}

.action-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 1.95rem;
  height: 1.95rem;
  padding: 0.25rem 0.45rem;
  margin: 0 0.22rem 0 0;
  border: 1px solid rgba(8, 125, 168, 0.24);
  border-radius: 1px;
  background: #eef5fb;
  color: #075f81;
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
}

.inline .action-icon-button,
form.inline .action-icon-button {
  width: auto;
  min-width: 1.95rem;
  height: 1.95rem;
  padding: 0.25rem 0.45rem;
  margin: 0 0.22rem 0 0;
  font-size: 0.78rem;
  line-height: 1;
  vertical-align: middle;
}

.action-icon-button svg {
  width: 0.9rem;
  height: 0.9rem;
  display: block;
  fill: currentColor;
}

.action-icon-button:hover,
.action-icon-button:focus-visible {
  filter: none;
  background: #dcecf8;
  color: #064f6b;
}

.invoice-public-view-button {
  gap: 0.22rem;
  min-width: 2.35rem;
}

.invoice-public-view-button span {
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.action-icon-danger {
  border-color: rgba(207, 46, 46, 0.22);
  background: #fff1f1;
  color: #b42323;
}

.action-icon-danger:hover,
.action-icon-danger:focus-visible {
  background: #ffe4e4;
  color: #951d1d;
}

body.role-visitor form[method="post"][action^="/tenants"],
body.role-visitor form[method="post"][action^="/contacts"],
body.role-visitor form[method="post"][action^="/properties"],
body.role-visitor form[method="post"][action^="/leases"],
body.role-visitor form[method="post"][action^="/available-rentals"],
body.role-visitor form[method="post"][action^="/portfolio"],
body.role-visitor form[method="post"][action^="/payments"],
body.role-visitor form[method="post"][action$="/send"],
body.role-visitor form[method="post"][action$="/mark-paid"],
body.role-visitor #open-tenant-modal,
body.role-visitor #open-contact-modal,
body.role-visitor #open-property-modal,
body.role-visitor #open-lease-modal,
body.role-visitor #open-todo-modal,
body.role-visitor .edit-tenant-button,
body.role-visitor .delete-tenant-button,
body.role-visitor .edit-contact-button,
body.role-visitor .delete-contact-button,
body.role-visitor .edit-property-button,
body.role-visitor .delete-property-button,
body.role-visitor .edit-lease-button,
body.role-visitor .delete-lease-button,
body.role-visitor .email-lease-tenant-button,
body.role-visitor .rental-listing-edit-button,
body.role-visitor .rental-listing-photos-button,
body.role-visitor .rental-listing-delete-button,
body.role-visitor .todo-item-edit-button,
body.role-visitor .todo-item-complete-button,
body.role-visitor .todo-item-delete-button,
body.role-visitor [data-open-todo-modal],
body.role-visitor [data-open-property-modal],
body.role-visitor [data-open-lease-modal],
body.role-visitor [data-open-tenant-modal],
body.role-visitor [data-open-contact-modal] {
  display: none !important;
}

.btn-link {
  width: auto;
  margin-top: 0;
  margin-right: 0.22rem;
  padding: 0.38rem 0.58rem;
  border: 1px solid rgba(8, 125, 168, 0.24);
  border-radius: 1px;
  background: #eef5fb;
  color: #075f81;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  vertical-align: middle;
}

.btn-link:hover,
.btn-link:focus-visible {
  filter: none;
  background: #dcecf8;
  color: #064f6b;
}

.inline button {
  width: auto;
  margin-top: 0;
  margin-right: 0.22rem;
  padding: 0.38rem 0.58rem;
  font-size: 0.78rem;
}

.inline .action-icon-button,
form.inline .action-icon-button {
  width: auto;
  min-width: 1.95rem;
  height: 1.95rem;
  padding: 0.25rem 0.45rem;
  margin: 0 0.22rem 0 0;
  font-size: 0.78rem;
  line-height: 1;
  vertical-align: middle;
}

/* Shared table tools */
.table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  flex-wrap: wrap;
}

.table-tools-label {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 600;
}

.table-tools-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-left: auto;
  flex-wrap: wrap;
}

.table-tools-button {
  width: auto;
  margin-top: 0;
  padding: 0.3rem 0.52rem;
  font-size: 0.74rem;
  line-height: 1.1;
  border-radius: 1px;
}

.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}

.table-pagination-status {
  color: var(--text-soft);
  font-size: 0.78rem;
  min-width: 8.4rem;
  white-space: nowrap;
}

.table-pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}

.table-pagination-button {
  width: auto;
  margin-top: 0;
  min-width: 2.55rem;
  padding: 0.32rem 0.45rem;
  font-size: 0.74rem;
  line-height: 1.1;
  border-radius: 1px;
}

.table-pagination-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 15rem;
  margin: 0 0 0 0.35rem;
}

.table-pagination-inline .table-pagination-status {
  white-space: nowrap;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(204, 217, 230, 0.75);
}

.table-footer-total {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 600;
}

.table-pagination-button:disabled {
  background: #edf2f7;
  color: #8aa0b5;
  border-color: rgba(134, 157, 180, 0.22);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}

.table-pagination-button:disabled:hover,
.table-pagination-button:disabled:focus-visible {
  filter: none;
  background: #edf2f7;
  color: #8aa0b5;
}

.table-tools-filter {
  width: 16rem;
  min-width: 12rem;
  margin: 0;
  padding: 0.34rem 0.58rem;
  font-size: 0.76rem;
  line-height: 1.1;
  border-radius: 1px;
}

@media (max-width: 820px) {
  .table-tools-filter {
    width: 100%;
    min-width: 0;
  }
}

.table-tools-filter-shell {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.table-tools-date-shell {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.table-tools-date-label {
  color: var(--text-soft);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.table-tools-date {
  width: auto;
  min-width: 8.75rem;
  margin: 0;
  padding: 0.34rem 0.5rem;
  font-size: 0.76rem;
  line-height: 1.1;
  border-radius: 1px;
}

.table-tools-filter-clear {
  width: auto;
  min-width: 1.9rem;
  margin: 0;
  padding: 0.28rem 0.45rem;
  font-size: 0.74rem;
  line-height: 1;
  border-radius: 1px;
}

input[type="search"],
.table-tools-filter,
.invoice-table-filter-input,
.journal-invoice-search-input {
  padding: 0.46rem 0.62rem;
  border-radius: 0.35rem;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(134, 157, 180, 0.18);
}

@media (max-width: 820px) {
  .table-tools-date-shell {
    width: 100%;
  }

  .table-tools-date {
    min-width: 0;
    flex: 1 1 10rem;
  }
}

.payments-statement-summary .bank-account-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.payments-statement-header-actions {
  margin-left: auto;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.payments-statement-summary .bank-account-balance-display {
  text-align: right;
}

.payments-statement-summary .bank-account-balance-display h2,
.payments-statement-summary .bank-account-header > div:first-child h2 {
  margin: 0;
}

.payments-statement-summary .bank-account-balance-display .helper-text,
.payments-statement-summary .bank-account-header > div:first-child .helper-text {
  margin-top: 0.2rem;
}

.bank-account-summary-card .bank-account-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.bank-account-summary-card .bank-account-header > div:first-child h2,
.bank-account-summary-card .bank-account-balance-display h2 {
  margin: 0;
}

.bank-account-summary-card .bank-account-balance-display {
  margin-left: auto;
  text-align: right;
}

.bank-account-summary-card .bank-account-balance-display .helper-text,
.bank-account-summary-card .bank-account-header > div:first-child .helper-text {
  margin-top: 0.2rem;
}

.bank-balance-breakdown-inline-button {
  width: auto;
  min-height: 0;
  padding: 0.2rem 0.45rem;
  margin: 0;
  border: 1px solid #cfdde4;
  border-radius: 0.35rem;
  background: #ffffff;
  color: #244b5d;
  font-size: 0.78rem;
  font-weight: 700;
}

.bank-account-picker-unreconciled-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.bank-balance-breakdown-modal-card {
  max-width: min(1100px, calc(100vw - 2rem));
}

.bank-balance-breakdown-shell {
  gap: 0.9rem;
}

.bank-balance-breakdown-metrics {
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.bank-balance-breakdown-section {
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem;
  border: 1px solid #d9e6ec;
  border-radius: 0.65rem;
  background: #f8fbfd;
}

.bank-balance-breakdown-section h3 {
  margin: 0;
  font-size: 1rem;
}

.bank-balance-warning-section {
  border-color: #f0d58a;
  background: #fffaf0;
}

.bank-balance-breakdown-table {
  width: 100%;
  margin: 0;
}

.bank-balance-breakdown-table th,
.bank-balance-breakdown-table td {
  padding: 0.45rem 0.55rem;
  font-size: 0.86rem;
  vertical-align: top;
}

.bank-balance-breakdown-table tbody th {
  width: 14rem;
  text-align: left;
}

.bank-balance-breakdown-exception-wrap {
  max-height: min(45vh, 28rem);
  overflow: auto;
}

.bank-account-pending-panel {
  margin: 0.85rem 0 1rem;
  padding: 0.85rem;
  border: 1px solid rgba(204, 164, 58, 0.32);
  border-radius: 0.45rem;
  background: #fff9e6;
}

.bank-account-pending-heading {
  align-items: flex-start;
  margin-bottom: 0.7rem;
}

.bank-account-pending-heading h3 {
  margin: 0;
}

.bank-account-pending-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
  color: #675219;
  font-size: 0.82rem;
}

.bank-account-pending-summary span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.48rem;
  border: 1px solid rgba(204, 164, 58, 0.34);
  border-radius: 999px;
  background: #fffdf4;
  white-space: nowrap;
}

.bank-account-pending-table-wrap {
  border: 1px solid rgba(204, 164, 58, 0.24);
  border-radius: 0.4rem;
  background: #fff;
}

.bank-account-pending-row td {
  background: #fffdf4;
}

.bank-account-summary-collapsible {
  margin-bottom: 1rem;
}

.bank-account-summary-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}

.bank-account-summary-toggle::-webkit-details-marker {
  display: none;
}

.bank-account-summary-toggle::after {
  content: "v";
  flex: 0 0 auto;
  width: 1.8rem;
  height: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(19, 181, 234, 0.3);
  background: rgba(214, 226, 239, 0.72);
  color: var(--accent-deep);
  font-weight: 800;
  transition: transform 0.18s ease, background 0.18s ease;
}

.bank-account-summary-collapsible[open] .bank-account-summary-toggle::after {
  transform: rotate(180deg);
  background: var(--accent-soft);
}

.bank-account-summary-toggle h2 {
  margin: 0;
}

.bank-account-summary-toggle .helper-text {
  margin: 0.15rem 0 0;
}

.bank-account-summary-toggle-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-left: auto;
}

.bank-account-summary-toggle-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0.34rem 0.5rem;
  border: 1px solid #9fc0df;
  border-radius: 999px;
  background: #fff8d9;
  color: #5f4b18;
  font-size: 0.78rem;
  white-space: nowrap;
}

.bank-account-summary-toggle-metrics strong {
  color: #0d3658;
}

.bank-account-summary-collapsible-body {
  margin-top: 0.95rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(31, 84, 130, 0.1);
}

.bank-account-import-runs-panel {
  margin-top: 0.85rem;
  border-top: 1px solid rgba(31, 84, 130, 0.12);
  padding-top: 0.85rem;
}

.bank-account-import-runs-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: auto;
  margin: 0;
  padding: 0.45rem 0.72rem;
  border: 1px solid rgba(134, 157, 180, 0.28);
  border-radius: 0.35rem;
  background: #f3f6fa;
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  list-style: none;
  box-shadow: none;
}

.bank-account-import-runs-toggle::-webkit-details-marker {
  display: none;
}

.bank-account-import-runs-toggle::after {
  content: "v";
  font-size: 0.8rem;
  color: var(--accent-deep);
}

.bank-account-import-runs-panel[open] .bank-account-import-runs-toggle {
  background: var(--accent-soft);
  color: var(--accent-deep);
  box-shadow: inset 0 0 0 1px rgba(19, 181, 234, 0.18);
}

.bank-account-import-runs-panel[open] .bank-account-import-runs-toggle::after {
  transform: rotate(180deg);
}

.bank-account-import-runs-card {
  margin-top: 0.85rem;
}

.bank-account-meta-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  margin: 0.85rem 0 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(31, 84, 130, 0.12);
}

.bank-account-meta-item {
  min-width: 0;
}

.bank-account-meta-item label {
  display: block;
  margin: 0 0 0.18rem;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
}

.bank-account-meta-item span {
  display: block;
  color: var(--text-main);
  font-size: 0.86rem;
  font-weight: 500;
  word-break: break-word;
}

@media (max-width: 720px) {
  .payments-statement-summary .bank-account-header {
    flex-direction: column;
    align-items: stretch;
  }

  .payments-statement-header-actions {
    margin-left: 0;
    justify-content: flex-start;
  }

  .payments-statement-summary .bank-account-balance-display {
    text-align: left;
  }

  .bank-account-summary-card .bank-account-header {
    flex-direction: column;
    align-items: stretch;
  }

  .bank-account-summary-card .bank-account-balance-display {
    margin-left: 0;
    text-align: left;
  }

  .bank-account-meta-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.payments-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  background: rgba(248, 251, 253, 0.55);
  backdrop-filter: blur(4px);
}

.payments-loading-overlay[hidden] {
  display: none !important;
}

.journal-manual-line-items {
  margin-top: 0.35rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(204, 217, 230, 0.75);
}

.journal-manual-line-items[hidden] {
  display: none !important;
}

.journal-manual-line-items-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}

.journal-manual-overlay-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.45fr);
  gap: 0.55rem 0.75rem;
  margin-bottom: 0.65rem;
  align-items: end;
}

.journal-manual-overlay-grid label {
  display: block;
  margin-bottom: 0.14rem;
  color: var(--text-soft);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.journal-manual-overlay-grid input {
  width: 100%;
  margin: 0;
  padding: 0.3rem 0.4rem;
  font-size: 0.75rem;
  line-height: 1.15;
}

.journal-manual-overlay-grid .chart-account-combo {
  font-size: 0.75rem;
}

.journal-manual-line-items-wrap {
  margin-bottom: 0.5rem;
}

.journal-manual-line-items-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
  border: 1px solid rgba(196, 208, 220, 0.95);
  background: #fff;
}

.journal-manual-line-items-table th,
.journal-manual-line-items-table td {
  vertical-align: middle;
  border: 1px solid rgba(210, 220, 230, 0.95);
}

.journal-manual-line-items-table thead th {
  padding: 0.34rem 0.42rem;
  background: #eef3f7;
  color: #5f788d;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.journal-manual-line-items-foot td {
  padding: 0.32rem 0.42rem;
  background: #f4f8fb;
  border: 1px solid rgba(196, 208, 220, 0.95);
}

.journal-manual-total-label {
  color: #5f788d;
  font-size: 0.7rem;
  font-weight: 700;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding-right: 1.35rem !important;
}

.journal-manual-total-value {
  color: #0d3658;
  font-size: 0.84rem;
  font-weight: 800;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-right: 1.35rem !important;
}

.journal-manual-line-items-foot.is-unbalanced .journal-manual-total-label,
.journal-manual-line-items-foot.is-unbalanced .journal-manual-total-value {
  color: #b24a46;
}

.journal-manual-line-items-foot.is-unbalanced tr:first-child td {
  background: rgba(214, 64, 69, 0.08);
}

.journal-manual-col-description {
  width: 44%;
}

.journal-manual-col-account {
  width: 24%;
}

.journal-manual-col-qty {
  width: 8%;
}

.journal-manual-col-amount {
  width: 10%;
}

.journal-manual-col-total {
  width: 10%;
}

.journal-manual-col-remove {
  width: 4%;
}

.journal-manual-line-items-table tbody td {
  padding: 0;
  background: #fff;
}

.journal-manual-line-items-table td:nth-child(3),
.journal-manual-line-items-table td:nth-child(4),
.journal-manual-line-items-table td:nth-child(5),
.journal-manual-line-items-table th:nth-child(3),
.journal-manual-line-items-table th:nth-child(4),
.journal-manual-line-items-table th:nth-child(5) {
  text-align: right;
}

.journal-manual-line-items-table td:nth-child(6),
.journal-manual-line-items-table th:nth-child(6) {
  text-align: center;
}

.journal-manual-line-items-table th:nth-child(2),
.journal-manual-line-items-table td:nth-child(2),
.journal-manual-line-items-table th:nth-child(3),
.journal-manual-line-items-table td:nth-child(3),
.journal-manual-line-items-table th:nth-child(4),
.journal-manual-line-items-table td:nth-child(4),
.journal-manual-line-items-table th:nth-child(5),
.journal-manual-line-items-table td:nth-child(5),
.journal-manual-line-items-table th:nth-child(6),
.journal-manual-line-items-table td:nth-child(6) {
  white-space: nowrap;
}

.journal-manual-line-items-table input {
  width: 100%;
  margin: 0;
  padding: 0.28rem 0.38rem;
  font-size: 0.75rem;
  line-height: 1.2;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.journal-manual-line-items-table input:focus {
  position: relative;
  z-index: 1;
  background: #f7fbff;
  box-shadow: inset 0 0 0 1px rgba(47, 123, 194, 0.45);
  outline: none;
}

.journal-manual-line-items-table td:nth-child(3) input,
.journal-manual-line-items-table td:nth-child(4) input,
.journal-manual-line-items-table td:nth-child(5) input {
  display: block;
  min-width: 0;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.journal-manual-line-items-table td:nth-child(5) input {
  background: #f4f7fa;
  color: #0d3658;
  font-weight: 700;
}

.journal-manual-line-items-table td:nth-child(1),
.journal-manual-line-items-table td:nth-child(2) {
  padding-right: 0;
}

.journal-manual-line-items-table td:nth-child(3),
.journal-manual-line-items-table td:nth-child(4),
.journal-manual-line-items-table td:nth-child(5) {
  padding-left: 0;
  padding-right: 0;
}

.journal-manual-line-items-table td:nth-child(6) {
  padding-left: 0;
  padding-right: 0;
  background: #fafcfe;
}

.chart-account-picker-line {
  min-width: 0;
  display: block;
}

.chart-account-picker-line .chart-account-combo {
  font-size: 0.73rem;
}

.journal-manual-line-items-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.journal-manual-line-items-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.journal-manual-line-items-add-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.journal-manual-outstanding-label {
  color: #5f788d;
  font-size: 0.7rem;
  font-weight: 700;
}

.journal-manual-outstanding-value {
  color: #0d3658;
  font-size: 0.84rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.journal-manual-outstanding-value.is-balanced {
  color: #0c7c55;
}

.journal-manual-outstanding-value.is-unbalanced {
  color: #b24a46;
}

.reconciliation-learned-suggestion {
  margin: 0;
  color: #0c7c55;
  font-size: 0.78rem;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.reconciliation-suggestion-host {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.45rem;
  max-width: 100%;
}

.reconciliation-suggestion-host:empty {
  display: none;
}

.reconciliation-suggestion-host .tax-suggestion-card {
  width: 100%;
  margin-top: 0;
  box-sizing: border-box;
}

.reconciliation-suggestion-host .tax-suggestion-item p,
.reconciliation-suggestion-host .tax-suggestion-item strong {
  white-space: normal;
  overflow-wrap: anywhere;
}

.journal-inline-help-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.journal-inline-help-field > input {
  flex: 1 1 auto;
  min-width: 0;
}

.tax-suggestion-trigger {
  flex: 0 0 auto;
  min-width: 0;
  width: auto;
  margin: 0;
  padding: 0.42rem 0.6rem;
  font-size: 0.72rem;
  line-height: 1;
  white-space: nowrap;
}

.reconciliation-suggestion-popover {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  z-index: 40;
  width: min(24rem, calc(100vw - 2rem));
  margin-top: 0;
}

.reconciliation-suggestion-popover[hidden] {
  display: none;
}

.reconciliation-suggestion-popover .tax-suggestion-card {
  box-shadow: 0 16px 34px rgba(15, 38, 63, 0.18);
}

.contact-autocomplete-panel {
  position: fixed;
  z-index: 1200;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid rgba(58, 82, 104, 0.18);
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 38, 63, 0.2);
  box-sizing: border-box;
}

.contact-autocomplete-panel[hidden] {
  display: none;
}

.contact-autocomplete-option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.7rem 0.75rem;
  border: 0;
  border-radius: 0.65rem;
  background: transparent;
  color: #24384c;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.contact-autocomplete-option:hover,
.contact-autocomplete-option:focus-visible,
.contact-autocomplete-option.is-active {
  background: rgba(52, 109, 170, 0.12);
  color: #123c63;
  outline: none;
}

body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card {
  font-size: 1.08rem;
}

body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .invoice-page-tab {
  font-size: 1.02rem;
}

body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-form-grid label,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-manual-overlay-grid label,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-field-label-row label {
  font-size: 1rem;
}

body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-form-grid input,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-form-grid select,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-invoice-search-input,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-manual-overlay-grid input,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .chart-account-combo,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .chart-account-picker-line .chart-account-combo {
  font-size: 1.08rem;
  line-height: 1.25;
}

body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-search-button-inline,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-single-match-dismiss,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .table-tools-button,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .secondary {
  font-size: 1.02rem;
}

body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-single-match strong {
  font-size: 1.1rem;
}

body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-single-match span,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-invoice-adjustment small,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .payments-status-link,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .payments-invoice-preview-link {
  font-size: 1.02rem;
}

body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-invoice-search-mobile-top strong {
  font-size: 1.06rem;
}

body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-invoice-search-mobile-primary {
  font-size: 1.04rem;
}

body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-invoice-search-mobile-secondary {
  font-size: 1rem;
}

body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-invoice-search-mobile-label {
  font-size: 0.92rem;
}

body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-invoice-search-mobile-field strong {
  font-size: 1.03rem;
}

body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-invoice-search-table th,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-invoice-search-table td,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-manual-line-items-table th,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-manual-line-items-table td {
  font-size: 1.02rem;
}

body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-manual-line-items-table input {
  font-size: 1.05rem;
  line-height: 1.25;
}

body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-manual-line-items-toolbar,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-manual-line-items-footer,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-manual-line-items-actions,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-manual-line-items-add-group,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-manual-outstanding-label,
body.compact-feature-mode .reconciliation-shell .journal-detail-card.journal-inline-card .journal-manual-outstanding-value {
  font-size: 1.08rem;
}

body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel {
  font-size: 1.08rem;
}

body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-manual-overlay-grid label {
  font-size: 1rem;
}

body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-manual-overlay-grid input,
body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-manual-line-items-table input,
body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .chart-account-picker-line .chart-account-combo {
  font-size: 1.08rem;
  line-height: 1.25;
}

body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-manual-line-items-toolbar,
body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-manual-line-items-toolbar strong,
body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-manual-line-items-toolbar .helper-text,
body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-manual-line-items-footer,
body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-manual-line-items-add-group,
body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-manual-line-items-actions,
body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-manual-outstanding-label,
body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-manual-outstanding-value {
  font-size: 1.08rem;
}

body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-manual-line-items-table th,
body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-manual-line-items-table td,
body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-manual-total-label {
  font-size: 1.02rem;
}

body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-manual-total-value {
  font-size: 1.08rem;
}

body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .table-tools-button {
  font-size: 1.02rem;
  line-height: 1.2;
  padding: 0.5rem 0.75rem;
}

body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-remove-line-button {
  width: 1.5rem;
  height: 1.5rem;
}

body.compact-feature-mode .reconciliation-shell .journal-manual-line-items-panel .journal-remove-line-button svg {
  width: 0.95rem;
  height: 0.95rem;
}

body.compact-feature-mode .contact-autocomplete-panel .contact-autocomplete-option {
  font-size: 1.08rem;
}

.journal-remove-line-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #b24a46;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 0;
}

.journal-remove-line-button svg {
  width: 0.72rem;
  height: 0.72rem;
  display: block;
  fill: currentColor;
}

.journal-remove-line-button:hover,
.journal-remove-line-button:focus-visible {
  color: #8f2f2f;
  background: rgba(214, 64, 69, 0.12);
  border-radius: 999px;
}

.account-schedule-grid {
  margin-bottom: 1rem;
}

.account-schedule-form .settings-actions {
  margin: 0 0 1rem;
  display: flex;
  justify-content: center;
}

.account-schedule-form .settings-actions button {
  width: auto;
  min-width: 9rem;
  padding: 0.5rem 1rem;
}

.account-schedule-card h3,
.account-schedule-log-header h3 {
  margin-bottom: 0.5rem;
}

.account-schedule-edit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 0.75rem;
  margin: 0.8rem 0;
}

.account-schedule-edit-grid label {
  margin-top: 0;
  margin-bottom: 0.2rem;
  font-size: 0.82rem;
}

.account-schedule-edit-grid select,
.account-schedule-edit-grid input {
  padding: 0.52rem 0.68rem;
  font-size: 0.9rem;
}

.account-schedule-log-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.5rem 0 0.85rem;
}

.template-selector-row {
  display: grid;
  grid-template-columns: minmax(16rem, 20rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.template-selector-field label,
.template-editor-field label {
  margin-top: 0;
  margin-bottom: 0.2rem;
  font-size: 0.82rem;
}

.account-template-selector,
.template-editor-field input,
.template-editor-field textarea {
  width: 100%;
  padding: 0.56rem 0.72rem;
  font-size: 0.92rem;
}

.template-token-help {
  background: #eef5fb;
  border: 1px solid #c9dced;
  border-radius: 0.7rem;
  padding: 0.7rem 0.85rem;
  color: #35516f;
}

.template-token-help strong {
  display: block;
  margin-bottom: 0.18rem;
  color: #23415d;
}

.template-editor-shell {
  border: 1px solid #d7e4f0;
  border-radius: 0.9rem;
  background: #f8fbfe;
  padding: 1rem;
}

.template-editor-topbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.template-body-mode-tabs {
  display: inline-flex;
  gap: 0.4rem;
  align-self: flex-start;
}

.template-mode-button,
.template-tool-button {
  border: 1px solid #c6d8e9;
  background: #ffffff;
  color: #264766;
  border-radius: 0.55rem;
  padding: 0.38rem 0.65rem;
  font-size: 0.84rem;
  line-height: 1;
}

.template-mode-button.active {
  background: #dfeef9;
  border-color: #8fb5d7;
  color: #143b63;
  font-weight: 600;
}

.template-editor-panel {
  display: none;
}

.template-editor-panel.active {
  display: block;
}

.template-editor-grid {
  display: grid;
  gap: 0.9rem;
}

.template-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.85fr);
  gap: 1rem;
  align-items: start;
}

.template-editor-field {
  min-width: 0;
}

.template-editor-surface,
.template-tinymce-shell {
  display: none;
  min-height: 24rem;
  border: 1px solid #c7d8e8;
  border-radius: 0.75rem;
  background: #ffffff;
}

.template-editor-surface.active,
.template-tinymce-shell.active {
  display: block;
}

.template-editor-text {
  padding: 0.9rem 1rem;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.45;
  white-space: pre-wrap;
}

.template-tinymce-shell textarea {
  width: 100%;
  min-height: 24rem;
  border: 0;
  background: transparent;
}

.template-body-editor .tox-tinymce {
  border: 1px solid #c7d8e8 !important;
  border-radius: 0.75rem !important;
  box-shadow: none !important;
}

.template-body-editor .tox .tox-editor-header {
  border-bottom: 1px solid #d6e2ee;
  background: #f6fafd;
}

.template-body-editor .tox .tox-toolbar,
.template-body-editor .tox .tox-toolbar__primary,
.template-body-editor .tox .tox-toolbar-overlord {
  background: #f6fafd;
}

.template-body-editor .tox .tox-edit-area::before {
  border: 0 !important;
}

.template-body-editor .tox .tox-edit-area__iframe {
  background: #ffffff;
}

.template-body-editor .tox .tox-statusbar {
  border-top: 1px solid #d6e2ee;
  background: #f8fbfe;
}

.template-body-editor .tox .tox-toolbar__group {
  border-color: rgba(199, 216, 232, 0.92);
}

.template-body-editor .tox .tox-tbtn {
  border-radius: 0.45rem;
}

.template-body-editor .tox .tox-tbtn:hover,
.template-body-editor .tox .tox-tbtn--enabled,
.template-body-editor .tox .tox-tbtn--enabled:hover {
  background: #dfeef9 !important;
  color: #143b63 !important;
}

.template-body-editor .tox .tox-edit-area {
  min-height: 21rem;
}

.template-body-editor .tox .tox-dialog {
  border-radius: 0.75rem;
}

.template-body-editor .tox .tox-notifications-container {
  left: auto !important;
  right: 0.75rem !important;
  top: 0.75rem !important;
  width: min(24rem, calc(100% - 1.5rem)) !important;
  max-width: min(24rem, calc(100% - 1.5rem)) !important;
}

.template-body-editor .tox .tox-notification {
  width: auto !important;
  max-width: 100% !important;
  white-space: normal !important;
}

.template-body-editor .tox .tox-notification__body {
  min-width: 0 !important;
  overflow-wrap: anywhere;
  white-space: normal !important;
}

.template-body-editor .tox .tox-collection__item--active {
  background: #dfeef9 !important;
}

.template-body-editor .tox .tox-sidebar-wrap,
.template-body-editor .tox .tox-edit-area iframe,
.template-body-editor .tox .tox-edit-area img {
  max-width: 100%;
}

.template-layout-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  padding: 0.32rem 0.36rem;
  border: 1px solid #d7e4f0;
  border-radius: 0.65rem;
  background: #f3f8fc;
}

.template-layout-buttons .template-tool-button {
  width: auto;
  margin: 0;
  padding: 0.28rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 0.45rem;
}

.template-live-preview-card {
  border: 1px solid #d7e4f0;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfe 100%);
  padding: 0.95rem;
  position: sticky;
  top: 1rem;
}

.template-live-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}

.template-live-preview-header h3 {
  margin-bottom: 0.2rem;
}

.template-live-preview-header p {
  margin-top: 0;
  margin-bottom: 0;
}

.template-live-preview-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.template-preview-button {
  width: auto;
  margin: 0;
  white-space: nowrap;
  padding: 0.34rem 0.58rem;
  font-size: 0.78rem;
}

.template-live-preview-subject {
  font-weight: 700;
  color: #1f4468;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d5e3ef;
  border-radius: 0.7rem;
  background: #eef6fc;
  margin-bottom: 0.55rem;
}

.template-live-preview-body {
  border: 1px solid #d5e3ef;
  border-radius: 0.7rem;
  background: #ffffff;
  padding: 0.75rem 0.85rem;
  min-height: 14rem;
  max-height: 48vh;
  overflow: auto;
  line-height: 1.45;
}

.template-live-preview-body img {
  max-width: 100%;
  height: auto;
}

.template-live-preview-body table {
  width: 100%;
}

.template-body-storage {
  display: none !important;
}

.template-editor-notes {
  margin-top: 0.9rem;
}

.template-email-preview-shell {
  display: grid;
  gap: 0.55rem;
}

.account-templates-form .settings-actions {
  margin-top: 0.85rem;
  justify-content: center;
}

.account-templates-form .settings-actions button {
  width: auto;
  min-width: 10rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: capitalize;
  white-space: nowrap;
}

.status-pill.subtle {
  background: #eef4f8;
  color: #4a667d;
}

.status-pill.success {
  background: #e8f5ed;
  color: #2f6a48;
}

.status-pill.failed {
  background: #fbeaea;
  color: #a83e3a;
}

.status-pill.skipped {
  background: #f7f1e6;
  color: #8d6730;
}

.status-pill.running {
  background: #edf4fc;
  color: #2f6ea8;
}

#payments-reconciliation-preview-modal .invoice-entry-section {
  padding: 0.68rem;
  border-color: rgba(96, 122, 148, 0.42);
  background: #dcebf6;
}

#payments-reconciliation-preview-modal .invoice-entry-shell {
  gap: 0.62rem;
}

#payments-reconciliation-preview-modal .invoice-entry-topbar {
  padding: 0.75rem 0.9rem;
}

#payments-reconciliation-preview-modal .invoice-entry-total-card {
  padding: 0.55rem 0.75rem;
}

#payments-reconciliation-preview-modal .invoice-entry-total-card strong {
  font-size: 1.35rem;
}

#payments-reconciliation-preview-modal .invoice-entry-grid {
  gap: 0.45rem;
}

#payments-reconciliation-preview-modal .reconciliation-outcome-panel {
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#payments-reconciliation-preview-modal .reconciliation-outcome-panel-manual {
  border-color: rgba(96, 122, 148, 0.42);
  background: #dcebf6;
}

#payments-reconciliation-preview-modal #payments-reconciliation-preview-outcome-panel.reconciliation-outcome-panel-matched {
  border-color: rgba(31, 143, 77, 0.58);
  background: #c9f3d5;
  box-shadow: inset 0 0 0 1px rgba(31, 143, 77, 0.2);
}

#payments-reconciliation-preview-modal .reconciliation-outcome-panel-matched .invoice-field-card {
  border-color: rgba(31, 143, 77, 0.36);
  background: #def9e6;
}

#payments-reconciliation-preview-modal #payments-reconciliation-preview-outcome-panel.reconciliation-outcome-panel-transfer {
  border-color: rgba(216, 179, 78, 0.34);
  background: #fff9df;
}

#payments-reconciliation-preview-modal .invoice-field-card {
  padding: 0.36rem 0.48rem;
  border: 1px solid rgba(110, 137, 164, 0.45);
  background: #eef5fb;
  border-radius: 0.2rem;
}

#payments-reconciliation-preview-modal .invoice-field-card label,
#payments-reconciliation-preview-modal .invoice-summary-panel label {
  font-weight: 800;
  color: #304b63;
  letter-spacing: 0.01em;
}

#payments-reconciliation-preview-modal .invoice-field-card p,
#payments-reconciliation-preview-modal #payments-reconciliation-preview-outcome-help,
#payments-reconciliation-preview-modal .invoice-section-heading p {
  margin-top: 0.12rem;
  font-size: 0.86rem;
  line-height: 1.28;
  color: #4d6478;
}

#payments-reconciliation-preview-modal #payments-reconciliation-preview-outcome-help strong {
  color: #123a5b;
  font-weight: 900;
}

#payments-reconciliation-preview-modal .reconciliation-outcome-panel-transfer #payments-reconciliation-preview-outcome-help,
#payments-reconciliation-preview-modal .reconciliation-outcome-panel-transfer .invoice-section-heading p,
#payments-reconciliation-preview-modal .reconciliation-outcome-panel-transfer .invoice-field-card p {
  color: #755b18;
}

#payments-reconciliation-preview-modal .reconciliation-outcome-panel-matched #payments-reconciliation-preview-outcome-help,
#payments-reconciliation-preview-modal .reconciliation-outcome-panel-matched .invoice-section-heading p,
#payments-reconciliation-preview-modal .reconciliation-outcome-panel-matched .invoice-field-card p {
  color: #4d6478;
}

#payments-reconciliation-preview-modal .reconciliation-outcome-panel-transfer #payments-reconciliation-preview-outcome-help strong,
#payments-reconciliation-preview-modal .reconciliation-outcome-panel-transfer .invoice-section-heading h4 {
  color: #5d4300;
}

#payments-reconciliation-preview-modal .reconciliation-outcome-panel-matched #payments-reconciliation-preview-outcome-help strong,
#payments-reconciliation-preview-modal .reconciliation-outcome-panel-matched .invoice-section-heading h4 {
  color: #123a5b;
}

#payments-reconciliation-preview-modal .invoice-section-heading h4,
#payments-reconciliation-preview-modal .invoice-entry-topbar h3 {
  margin-bottom: 0.12rem;
  color: #123a5b;
}

#general-ledger-reconciliation-preview-modal .invoice-entry-section {
  padding: 0.68rem;
  border-color: rgba(96, 122, 148, 0.42);
  background: #dcebf6;
}

#general-ledger-reconciliation-preview-modal .invoice-entry-shell {
  gap: 0.62rem;
}

#general-ledger-reconciliation-preview-modal .invoice-entry-topbar {
  padding: 0.75rem 0.9rem;
}

#general-ledger-reconciliation-preview-modal .invoice-entry-total-card {
  padding: 0.55rem 0.75rem;
}

#general-ledger-reconciliation-preview-modal .invoice-entry-total-card strong {
  font-size: 1.35rem;
}

#general-ledger-reconciliation-preview-modal .invoice-entry-grid {
  gap: 0.45rem;
}

#general-ledger-reconciliation-preview-modal .reconciliation-outcome-panel {
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#general-ledger-reconciliation-preview-modal .reconciliation-outcome-panel-manual {
  border-color: rgba(96, 122, 148, 0.42);
  background: #dcebf6;
}

#general-ledger-reconciliation-preview-modal #general-ledger-reconciliation-preview-outcome-panel.reconciliation-outcome-panel-matched {
  border-color: rgba(31, 143, 77, 0.58);
  background: #c9f3d5;
  box-shadow: inset 0 0 0 1px rgba(31, 143, 77, 0.2);
}

#general-ledger-reconciliation-preview-modal .reconciliation-outcome-panel-matched .invoice-field-card {
  border-color: rgba(31, 143, 77, 0.36);
  background: #def9e6;
}

#general-ledger-reconciliation-preview-modal #general-ledger-reconciliation-preview-outcome-panel.reconciliation-outcome-panel-transfer {
  border-color: rgba(216, 179, 78, 0.34);
  background: #fff9df;
}

#general-ledger-reconciliation-preview-modal .invoice-field-card {
  padding: 0.36rem 0.48rem;
  border: 1px solid rgba(110, 137, 164, 0.45);
  background: #eef5fb;
  border-radius: 0.2rem;
}

#general-ledger-reconciliation-preview-modal .invoice-field-card label,
#general-ledger-reconciliation-preview-modal .invoice-summary-panel label {
  font-weight: 800;
  color: #304b63;
  letter-spacing: 0.01em;
}

#general-ledger-reconciliation-preview-modal .invoice-field-card p,
#general-ledger-reconciliation-preview-modal #general-ledger-reconciliation-preview-outcome-help,
#general-ledger-reconciliation-preview-modal .invoice-section-heading p {
  margin-top: 0.12rem;
  font-size: 0.86rem;
  line-height: 1.28;
  color: #4d6478;
}

#general-ledger-reconciliation-preview-modal #general-ledger-reconciliation-preview-outcome-help strong {
  color: #123a5b;
  font-weight: 900;
}

#general-ledger-reconciliation-preview-modal .reconciliation-outcome-panel-transfer #general-ledger-reconciliation-preview-outcome-help,
#general-ledger-reconciliation-preview-modal .reconciliation-outcome-panel-transfer .invoice-section-heading p,
#general-ledger-reconciliation-preview-modal .reconciliation-outcome-panel-transfer .invoice-field-card p {
  color: #755b18;
}

#general-ledger-reconciliation-preview-modal .reconciliation-outcome-panel-matched #general-ledger-reconciliation-preview-outcome-help,
#general-ledger-reconciliation-preview-modal .reconciliation-outcome-panel-matched .invoice-section-heading p,
#general-ledger-reconciliation-preview-modal .reconciliation-outcome-panel-matched .invoice-field-card p {
  color: #4d6478;
}

#general-ledger-reconciliation-preview-modal .reconciliation-outcome-panel-transfer #general-ledger-reconciliation-preview-outcome-help strong,
#general-ledger-reconciliation-preview-modal .reconciliation-outcome-panel-transfer .invoice-section-heading h4 {
  color: #5d4300;
}

#general-ledger-reconciliation-preview-modal .reconciliation-outcome-panel-matched #general-ledger-reconciliation-preview-outcome-help strong,
#general-ledger-reconciliation-preview-modal .reconciliation-outcome-panel-matched .invoice-section-heading h4 {
  color: #123a5b;
}

#general-ledger-reconciliation-preview-modal .invoice-section-heading h4,
#general-ledger-reconciliation-preview-modal .invoice-entry-topbar h3 {
  margin-bottom: 0.12rem;
  color: #123a5b;
}

#dashboard-reconciliation-preview-modal .invoice-entry-total-card {
  padding: 0.55rem 0.75rem;
}

#dashboard-reconciliation-preview-modal .invoice-entry-total-card strong {
  font-size: 1.35rem;
}

#dashboard-reconciliation-preview-modal .invoice-entry-grid {
  gap: 0.45rem;
}

#dashboard-reconciliation-preview-modal .reconciliation-outcome-panel {
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#dashboard-reconciliation-preview-modal .reconciliation-outcome-panel-manual {
  border-color: rgba(96, 122, 148, 0.42);
  background: #dcebf6;
}

#dashboard-reconciliation-preview-modal #dashboard-reconciliation-preview-outcome-panel.reconciliation-outcome-panel-matched {
  border-color: rgba(31, 143, 77, 0.58);
  background: #c9f3d5;
  box-shadow: inset 0 0 0 1px rgba(31, 143, 77, 0.2);
}

#dashboard-reconciliation-preview-modal .reconciliation-outcome-panel-matched .invoice-field-card {
  border-color: rgba(31, 143, 77, 0.36);
  background: #def9e6;
}

#dashboard-reconciliation-preview-modal #dashboard-reconciliation-preview-outcome-panel.reconciliation-outcome-panel-transfer {
  border-color: rgba(216, 179, 78, 0.34);
  background: #fff9df;
}

#dashboard-reconciliation-preview-modal .invoice-field-card {
  padding: 0.36rem 0.48rem;
  border: 1px solid rgba(110, 137, 164, 0.45);
  background: #eef5fb;
  border-radius: 0.2rem;
}

#dashboard-reconciliation-preview-modal .invoice-field-card label,
#dashboard-reconciliation-preview-modal .invoice-summary-panel label {
  font-weight: 800;
  color: #304b63;
  letter-spacing: 0.01em;
}

#dashboard-reconciliation-preview-modal .invoice-field-card p,
#dashboard-reconciliation-preview-modal #dashboard-reconciliation-preview-outcome-help,
#dashboard-reconciliation-preview-modal .invoice-section-heading p {
  margin-top: 0.12rem;
  font-size: 0.86rem;
  line-height: 1.28;
  color: #4d6478;
}

#dashboard-reconciliation-preview-modal #dashboard-reconciliation-preview-outcome-help strong,
#dashboard-reconciliation-preview-modal .reconciliation-outcome-panel-matched .invoice-section-heading h4,
#dashboard-reconciliation-preview-modal .invoice-section-heading h4,
#dashboard-reconciliation-preview-modal .invoice-entry-topbar h3 {
  color: #123a5b;
}

#dashboard-reconciliation-preview-modal .reconciliation-outcome-panel-transfer #dashboard-reconciliation-preview-outcome-help,
#dashboard-reconciliation-preview-modal .reconciliation-outcome-panel-transfer .invoice-section-heading p,
#dashboard-reconciliation-preview-modal .reconciliation-outcome-panel-transfer .invoice-field-card p {
  color: #755b18;
}

#dashboard-reconciliation-preview-modal .reconciliation-outcome-panel-transfer #dashboard-reconciliation-preview-outcome-help strong,
#dashboard-reconciliation-preview-modal .reconciliation-outcome-panel-transfer .invoice-section-heading h4 {
  color: #5d4300;
}

.dashboard-reconciliation-evidence-button {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  width: 100%;
  padding: 0.28rem 0.42rem;
  border: 1px solid rgba(31, 143, 77, 0.42);
  border-radius: 0.45rem;
  background: #def9e6;
  color: #123a5b;
  cursor: pointer;
  text-align: left;
}

.dashboard-reconciliation-evidence-button span {
  font-weight: 800;
}

.dashboard-reconciliation-evidence-button small {
  color: #4d6478;
  font-weight: 700;
}

.dashboard-reconciliation-evidence-button:hover {
  background: #c9f3d5;
  border-color: rgba(31, 143, 77, 0.62);
}

.dashboard-reconciliation-evidence-missing {
  display: inline-flex;
  padding: 0.28rem 0.42rem;
  border: 1px solid rgba(190, 84, 84, 0.34);
  border-radius: 0.45rem;
  background: #fff1ee;
  color: #923d32;
  font-weight: 800;
}

.dashboard-reconciliation-evidence-loading {
  color: #4d6478;
  font-weight: 800;
}

.dashboard-todo-toast {
  position: fixed;
  right: 1.1rem;
  bottom: 3.4rem;
  z-index: 1500;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  width: min(24rem, calc(100vw - 2rem));
  padding: 0.75rem;
  border: 1px solid rgba(190, 84, 84, 0.34);
  border-left: 0.45rem solid #be5454;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, #fff7ed 0%, #fffaf5 100%);
  box-shadow: 0 1.2rem 2.8rem rgba(26, 43, 59, 0.22);
  opacity: 0;
  transform: translateX(calc(100% + 1.5rem));
  transition: opacity 0.24s ease, transform 0.28s ease;
}

.dashboard-todo-toast.show {
  opacity: 1;
  transform: translateX(0);
}

.dashboard-todo-toast-body {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #293f54;
  text-align: left;
  cursor: pointer;
}

.nav-submenu-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.dashboard-todo-toast-body strong {
  color: #123a5b;
  font-size: 0.98rem;
  line-height: 1.25;
}

.dashboard-todo-toast-body span:last-child {
  color: #5d6f80;
  font-size: 0.82rem;
  line-height: 1.25;
}

.dashboard-todo-toast-kicker {
  width: fit-content;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: #ffe1d9;
  color: #923d32;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dashboard-todo-toast-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border: 1px solid rgba(146, 61, 50, 0.22);
  border-radius: 999px;
  background: #fff1ee;
  color: #923d32;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-todo-toast-close:hover {
  background: #ffe1d9;
  border-color: rgba(146, 61, 50, 0.38);
}

@media (max-width: 640px) {
  .dashboard-todo-toast {
    right: 0.75rem;
    bottom: 4rem;
    width: min(22rem, calc(100vw - 1.5rem));
  }
}

#payments-reconciliation-preview-modal .payments-reconciliation-lines-table th,
#payments-reconciliation-preview-modal .payments-reconciliation-lines-table td {
  padding: 0.3rem 0.4rem;
  font-size: 0.82rem;
}

.compact-settings-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.75rem 0.9rem;
  align-items: end;
}

.compact-settings-grid > div {
  min-width: 0;
}

.compact-settings-grid label {
  margin-top: 0;
  margin-bottom: 0.2rem;
  font-size: 0.82rem;
}

.compact-settings-grid input,
.compact-settings-grid select {
  padding: 0.52rem 0.68rem;
  font-size: 0.9rem;
}

.settings-span-12 {
  grid-column: span 12;
}

.settings-span-4 {
  grid-column: span 4;
}

.settings-span-3 {
  grid-column: span 3;
}

.settings-span-2 {
  grid-column: span 2;
}

.settings-checkbox-cell {
  align-self: end;
  display: flex;
  align-items: center;
  min-height: 2.45rem;
}

.compact-settings-grid .checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  line-height: 1.2;
}

.compact-settings-grid .checkbox-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
  padding: 0;
}

.compact-settings-grid .settings-actions {
  margin-top: 0.2rem;
}

.compact-settings-grid .settings-actions button {
  width: auto;
  min-width: 12rem;
}

@media (max-width: 980px) {
  .compact-settings-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .settings-span-12 {
    grid-column: span 6;
  }

  .settings-span-4 {
    grid-column: span 6;
  }

  .settings-span-3 {
    grid-column: span 3;
  }

  .settings-span-2 {
    grid-column: span 3;
  }
}

@media (max-width: 640px) {
  .account-schedule-edit-grid {
    grid-template-columns: 1fr;
  }

  .template-selector-row {
    grid-template-columns: 1fr;
  }

  .template-editor-topbar {
    align-items: stretch;
  }

  .template-editor-layout {
    grid-template-columns: 1fr;
  }

  .template-live-preview-card {
    position: static;
  }

  .compact-settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-span-12,
  .settings-span-4,
  .settings-span-3,
  .settings-span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 820px) {
  .journal-manual-overlay-grid {
    grid-template-columns: 1fr;
  }
}

.payments-loading-card {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(134, 157, 180, 0.28);
  border-radius: 1px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(16, 42, 67, 0.14);
}

.payments-loading-card strong {
  display: block;
  color: #0d3658;
}

.payments-loading-card p {
  margin: 0.18rem 0 0;
  color: var(--text-soft);
}

.payments-loading-spinner {
  width: 1.2rem;
  height: 1.2rem;
  border: 2px solid rgba(13, 159, 209, 0.18);
  border-top-color: var(--accent-deep);
  border-radius: 999px;
  animation: payments-loading-spin 0.8s linear infinite;
}

@keyframes payments-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.dashboard-wait-backdrop {
  background: rgba(13, 30, 45, 0.42);
  backdrop-filter: blur(1px);
}

.dashboard-wait-card {
  width: min(24rem, calc(100vw - 2rem));
  display: grid;
  gap: 0.9rem;
}

.dashboard-wait-card .modal-header {
  padding: 1rem 1.2rem;
}

.dashboard-wait-card .modal-header h2 {
  margin-bottom: 0.2rem;
}

.dashboard-wait-card .modal-header p {
  margin: 0;
  color: var(--text-soft);
}

.wait-indicator-row {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(134, 157, 180, 0.28);
  border-radius: 1px;
  background: rgba(248, 251, 253, 0.98);
  color: #0d3658;
  font-weight: 600;
}

.wait-indicator-row[hidden] {
  display: none;
}

.wait-spinner {
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 1.25rem;
  border: 2px solid rgba(13, 159, 209, 0.2);
  border-top-color: var(--accent-deep);
  border-right-color: rgba(13, 159, 209, 0.42);
  border-radius: 999px;
  animation: payments-loading-spin 0.8s linear infinite;
}




.lease-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 0.9rem;
  align-items: end;
}

.lease-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  min-width: 0;
}

.lease-form-field-wide {
  grid-column: span 1;
}

.lease-form-field-account {
  grid-column: span 1;
}

.lease-form-field input,
.lease-form-field select {
  width: 100%;
}

.lease-form-actions {
  grid-column: 1 / -1;
  margin-top: 0.25rem;
}

.lease-review-due-soon > td {
  background: rgba(214, 64, 69, 0.12) !important;
}

.lease-review-due-soon:hover > td {
  background: rgba(214, 64, 69, 0.16) !important;
}

#lease-directory-table .lease-review-due-soon > td.row-actions.compact-action-cell,
#lease-directory-table .lease-review-due-soon:hover > td.row-actions.compact-action-cell {
  display: table-cell;
  vertical-align: middle;
  min-width: 12rem;
  white-space: nowrap;
}

#lease-directory-table .lease-review-due-soon > td.row-actions.compact-action-cell > .action-icon-button {
  vertical-align: middle;
}

.lease-directory-tools {
  margin-bottom: 0.75rem;
}

.lease-documents-button {
  position: relative;
  min-width: 2.2rem;
  padding: 0.25rem 0.4rem;
}

.lease-documents-button svg {
  width: 1rem;
  height: 1rem;
}

#lease-directory-table .lease-date-cell {
  white-space: nowrap;
}

.lease-upload-dropzone {
  position: relative;
  border: 1px dashed rgba(134, 157, 180, 0.55);
  border-radius: 1px;
  background: #fff;
  padding: 0.95rem 1rem;
  cursor: pointer;
}

.lease-upload-dropzone.is-dragover {
  border-color: rgba(19, 181, 234, 0.8);
  background: #f4fbff;
}

.lease-upload-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.lease-upload-dropzone-copy {
  display: grid;
  gap: 0.2rem;
}

.lease-upload-dropzone-copy strong {
  color: #0d3658;
}

.property-documents-modal-card {
  width: min(1180px, 96vw);
}

.property-documents-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  gap: 1rem;
  align-items: stretch;
}

.property-market-default-grid,
.property-market-filter-grid,
.property-market-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.property-market-url-field {
  grid-column: 1 / -1;
}

.property-market-research-modal-card {
  width: min(1240px, 96vw);
}

.property-market-research-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(360px, 1fr);
  gap: 1rem;
  align-items: start;
}

.property-market-panel {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.property-market-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.property-market-source-grid section,
.property-market-summary-grid > div,
.property-market-comparable-card {
  border: 1px solid rgba(134, 157, 180, 0.26);
  border-radius: 0.65rem;
  background: #fff;
  padding: 0.65rem;
}

.property-market-source-grid h4,
.property-market-section-header h4,
.property-market-section-header h3 {
  margin: 0;
}

.property-market-stat-grid label {
  margin: 0;
  font-size: 0.74rem;
}

.property-market-stat-grid input {
  margin-top: 0.22rem;
}

.property-market-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.property-market-add-comparable {
  flex: 0 0 auto;
  width: auto;
  margin-top: 0;
}

.property-market-comparables {
  display: grid;
  gap: 0.45rem;
}

.property-market-comparable-row {
  display: grid;
  grid-template-columns: minmax(9rem, 1.1fr) minmax(5rem, 0.55fr) minmax(7rem, 0.75fr) repeat(2, minmax(4rem, 0.45fr));
  gap: 0.4rem;
}

.property-market-comparable-row input:nth-child(n + 6) {
  grid-column: span 1;
}

.property-market-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.property-market-summary-grid span,
.property-market-comparable-card span {
  display: block;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.property-market-summary-grid strong {
  display: block;
  margin-top: 0.12rem;
  color: #0d3658;
  font-size: 1rem;
}

.property-market-map {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid rgba(134, 157, 180, 0.32);
  border-radius: 0.7rem;
  background:
    linear-gradient(90deg, rgba(134, 157, 180, 0.16) 1px, transparent 1px),
    linear-gradient(0deg, rgba(134, 157, 180, 0.16) 1px, transparent 1px),
    linear-gradient(135deg, #eef7fb 0%, #f8fbf5 100%);
  background-size: 38px 38px, 38px 38px, auto;
}

.property-market-map-label {
  position: absolute;
  left: 0.65rem;
  top: 0.55rem;
  z-index: 1;
  color: #42647f;
  font-size: 0.76rem;
  font-weight: 700;
}

.property-market-map-empty {
  position: absolute;
  inset: auto 1rem 1rem;
  margin: 0;
  color: #5d7890;
  font-size: 0.84rem;
}

.property-market-pin {
  position: absolute;
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: #0d9fd1;
  box-shadow: 0 8px 18px rgba(13, 54, 88, 0.22);
  transform: translate(-50%, -100%) rotate(-45deg);
}

.property-market-pin-home {
  width: 1.05rem;
  height: 1.05rem;
  background: #d8b84f;
  z-index: 2;
}

.property-market-comparable-list {
  display: grid;
  gap: 0.5rem;
  max-height: 18rem;
  overflow-y: auto;
}

.property-market-comparable-card {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr);
  gap: 0.6rem;
}

.property-market-comparable-card img {
  width: 5.5rem;
  height: 4.2rem;
  object-fit: cover;
  border-radius: 0.45rem;
  background: #e8f0f7;
}

.property-market-comparable-card p {
  margin: 0.25rem 0 0;
  color: #38536c;
  font-size: 0.8rem;
}

.lease-email-modal-card {
  width: min(1040px, 95vw);
}

.lease-email-form {
  gap: 0.75rem;
}

.lease-email-header-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(54, 100, 136, 0.2);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.42);
}

.lease-email-header-controls label {
  margin: 0;
  color: #214864;
  font-size: 0.8rem;
  font-weight: 700;
}

.lease-email-header-controls select,
.lease-email-field-control input {
  width: auto;
  min-width: 11rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid rgba(54, 100, 136, 0.28);
  border-radius: 0.55rem;
  background: #fff;
  color: #17324d;
  font-size: 0.84rem;
}

.lease-email-control-strip {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.lease-email-left-controls,
.lease-email-review-controls {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.lease-email-left-controls {
  flex: 1 1 34rem;
}

.lease-email-review-controls {
  justify-content: flex-end;
  margin-left: auto;
}

.lease-email-field-control {
  margin-left: 0;
  min-width: 0;
}

.lease-email-to-control {
  flex: 0 1 17rem;
}

.lease-email-subject-control {
  flex: 1 1 22rem;
}

.lease-email-money-control input {
  min-width: 7rem;
  width: 7rem;
}

.lease-email-date-control input {
  min-width: 8.5rem;
  width: 8.5rem;
}

.lease-email-to-control input,
.lease-email-subject-control input {
  width: 100%;
  min-width: 0;
}

.lease-email-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem 0.9rem;
}

.lease-email-subject-field {
  grid-column: span 3;
}

.lease-email-body-field textarea {
  min-height: 18rem;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.4;
}

.lease-email-editor-field {
  display: grid;
  gap: 0.35rem;
}

.lease-email-editor-field > label {
  color: #244b68;
  font-size: 0.82rem;
  font-weight: 700;
}

.lease-email-body-editor {
  width: 100%;
}

.lease-email-body-editor .template-editor-topbar {
  align-items: flex-end;
  margin-bottom: 0.45rem;
}

.lease-email-body-editor .template-editor-surface,
.lease-email-body-editor .template-tinymce-shell {
  min-height: 22rem;
}

.lease-email-body-editor .template-tinymce-shell textarea {
  min-height: 22rem;
}

.lease-email-body-editor .tox .tox-edit-area {
  min-height: 19rem;
}

.lease-email-form.is-loading {
  opacity: 0.78;
}

.property-document-upload-panel,
.property-document-stored-panel {
  border: 1px solid rgba(134, 157, 180, 0.32);
  border-radius: 0.75rem;
  background: #f8fbfd;
  padding: 1rem;
  min-width: 0;
}

.property-document-upload-panel {
  order: 2;
}

.property-document-stored-panel {
  order: 1;
}

.property-document-upload-panel .compact-form {
  margin-top: 0.7rem;
}

.property-document-stored-panel {
  display: flex;
  min-height: 22rem;
  max-height: min(62vh, 38rem);
  flex-direction: column;
}

.property-document-stored-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.property-document-stored-header .section-title {
  margin-bottom: 0;
}

.property-document-stored-header span {
  color: #607a94;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.property-document-list {
  display: grid;
  gap: 0.65rem;
  overflow: auto;
  padding-right: 0.25rem;
}

.property-document-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(134, 157, 180, 0.32);
  border-radius: 0.65rem;
  background: #ffffff;
}

.property-document-item-main {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.property-document-item-main strong,
.property-document-item-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-document-item-main strong {
  color: #183c5b;
}

.property-document-item-main span {
  color: #607a94;
  font-size: 0.82rem;
}

.property-document-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.property-document-actions .secondary {
  width: auto;
  padding: 0.32rem 0.58rem;
  font-size: 0.78rem;
}

.property-document-empty-state {
  margin: 0;
}

@media (max-width: 980px) {
  .lease-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .property-documents-layout,
  .property-market-research-layout,
  .property-market-source-grid {
    grid-template-columns: 1fr;
  }

  .property-market-default-grid,
  .property-market-filter-grid,
  .property-market-stat-grid,
  .property-market-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .lease-email-subject-field {
    grid-column: span 1;
  }

  .lease-email-left-controls {
    flex-basis: 100%;
  }

  .lease-email-review-controls {
    margin-left: 0;
    justify-content: flex-start;
  }

  .property-document-stored-panel {
    max-height: none;
  }

  .lease-form-field-account {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .lease-form-grid {
    grid-template-columns: 1fr;
  }

  .lease-email-grid {
    grid-template-columns: 1fr;
  }

  .lease-email-header-controls {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .lease-email-header-controls select {
    min-width: 0;
    flex: 1;
  }

  .lease-email-left-controls,
  .lease-email-review-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .lease-email-to-control,
  .lease-email-subject-control,
  .lease-email-money-control input,
  .lease-email-date-control input {
    width: 100%;
    flex-basis: auto;
  }

  .lease-email-field-control input {
    min-width: 0;
    flex: 1;
  }

  .lease-form-field-wide,
  .lease-form-field-account,
  .lease-form-actions {
    grid-column: auto;
  }
}

.business-access-toggle svg {
  transition: transform 0.16s ease;
}

.business-access-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.business-access-row td {
  background: #f8fbfd;
  padding: 0.8rem;
}

.business-access-panel {
  display: grid;
  gap: 0.75rem;
  border: 1px solid #d7e4f0;
  border-radius: 8px;
  background: #ffffff;
  padding: 0.85rem;
}

.business-access-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.business-access-panel-header div {
  display: grid;
  gap: 0.15rem;
}

.business-access-panel-header strong {
  color: #102a43;
}

.business-access-panel-header span {
  color: #5b7189;
  font-size: 0.88rem;
}

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

.business-access-subgrid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.business-access-subgrid th,
.business-access-subgrid td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #e1ebf3;
  text-align: left;
  vertical-align: middle;
}

.business-access-subgrid th {
  background: #eef5fb;
  color: #102a43;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.business-access-subgrid tbody tr.has-business-access {
  background: #f7fbfe;
}

.business-access-subgrid tbody tr.business-access-admin {
  color: #486176;
}

.business-access-subgrid tbody tr:last-child td {
  border-bottom: 0;
}

.business-access-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
}

.notification-settings-form {
  margin-top: 1rem;
}

.notification-settings-form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.notification-settings-form-header h2 {
  margin-bottom: 0.15rem;
}

.notification-settings-form-header .toolbar-button {
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
  white-space: nowrap;
}

#notification-settings-table {
  table-layout: fixed;
}

#notification-settings-table th,
#notification-settings-table td {
  vertical-align: middle;
}

#notification-settings-table select,
#notification-settings-table input[type="time"] {
  width: 100%;
  min-width: 0;
  padding: 0.45rem 0.55rem;
}

.notification-col-name {
  width: 42%;
}

.notification-col-enabled {
  width: 5.5rem;
}

.notification-col-when {
  width: 9rem;
}

.notification-col-time {
  width: 7.5rem;
}

.notification-col-recipients {
  width: 8rem;
}

.notification-col-status {
  width: 7rem;
}

.notification-col-actions {
  width: 5.5rem;
}

#notification-settings-table th:nth-child(2),
#notification-settings-table td:nth-child(2),
#notification-settings-table th:last-child,
#notification-settings-table td:last-child {
  text-align: center;
}

.notification-setting-description {
  margin: 0.2rem 0 0;
  max-width: 34rem;
}

.notification-checkbox-cell,
.notification-admin-cell {
  display: inline-flex;
  margin: 0;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.notification-checkbox-cell {
  width: 100%;
}

.notification-checkbox-cell input,
.notification-admin-cell input {
  flex: 0 0 auto;
}

.notification-test-button {
  width: auto;
  min-width: 0;
  padding-inline: 0.75rem;
  white-space: nowrap;
}

.hidden-form {
  display: none;
}

@media (max-width: 760px) {
  .notification-settings-form-header {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-settings-form-header .toolbar-button {
    align-self: flex-start;
  }

  #notification-settings-table {
    min-width: 840px;
  }
}

@media (max-width: 640px) {
  .business-access-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .business-access-panel-header .table-tools-button {
    align-self: flex-start;
  }
}

.cutover-guidance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.cutover-guidance-grid ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: #365268;
}

.cutover-guidance-grid li {
  margin-bottom: 0.35rem;
}

.cutover-apply-card {
  border-color: rgba(190, 65, 65, 0.32);
  background: #fffafa;
}

.cutover-apply-form {
  display: grid;
  gap: 0.75rem;
}

@media (max-width: 820px) {
  .cutover-guidance-grid {
    grid-template-columns: 1fr;
  }
}

.help-drawer-tab {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-shrink: 0;
  width: auto !important;
  min-width: 0;
  max-width: max-content;
  min-height: 0;
  margin: 0;
  padding: 0.34rem 0.72rem;
  border: 1px solid #9fc0df;
  border-radius: 999px;
  background: #d9ebfa;
  color: #18476f;
  box-shadow: 0 8px 20px rgba(21, 65, 103, 0.14);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.help-drawer-tab:hover,
.help-drawer-tab:focus-visible {
  background: #c8e1f5;
  box-shadow: 0 10px 24px rgba(21, 65, 103, 0.2);
}

.help-drawer-tab-icon {
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #2d6f9f;
  color: #ffffff;
  font-size: 0.76rem;
}

.help-drawer {
  position: fixed;
  top: 5.25rem;
  right: 0;
  bottom: 4.15rem;
  z-index: 25;
  width: min(390px, calc(100vw - 1.25rem));
  display: grid;
  grid-template-rows: auto 1fr;
  background: #f8fbfd;
  border-left: 1px solid #bfd4e6;
  box-shadow: -22px 0 48px rgba(15, 46, 74, 0.2);
  transform: translateX(105%);
  transition: transform 0.24s ease;
}

.help-drawer.is-open {
  transform: translateX(0);
}

.help-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.9rem;
  border-bottom: 1px solid #b6d2ea;
  background: linear-gradient(135deg, #c8e1f5 0%, #d9ebfa 100%);
  color: #173f63;
}

.help-drawer-kicker {
  margin: 0 0 0.25rem;
  color: #2d6f9f;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.help-drawer-header h2 {
  margin: 0;
  color: #173f63;
  font-size: 1.2rem;
  line-height: 1.18;
}

.help-drawer-header p {
  margin: 0.35rem 0 0;
  color: #365f80;
  font-size: 0.88rem;
  line-height: 1.38;
}

.help-drawer-header-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.help-drawer-icon-button {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  min-width: 2rem;
  max-width: 2rem;
  min-height: 2rem;
  margin: 0;
  padding: 0.35rem 0.55rem;
  border: 1px solid #8fb9dc;
  border-radius: 0.55rem;
  background: #eef7ff;
  color: #174a74;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.help-drawer-pin-button span {
  display: inline-grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  border: 2px solid currentColor;
  font-size: 0;
  position: relative;
}

.help-drawer-pin-button span::before {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: currentColor;
  position: absolute;
  top: 0.16rem;
  left: 50%;
  transform: translateX(-50%);
}

.help-drawer-pin-button span::after {
  content: "";
  width: 0.12rem;
  height: 0.45rem;
  background: currentColor;
  position: absolute;
  bottom: -0.28rem;
  left: 50%;
  transform: translateX(-50%);
}

.help-drawer-pin-button[aria-pressed="true"] span {
  transform: rotate(-28deg);
}

.help-drawer-icon-button:hover,
.help-drawer-icon-button:focus-visible,
.help-drawer-icon-button[aria-pressed="true"] {
  background: #2d6f9f;
  border-color: #2d6f9f;
  color: #ffffff;
}

.help-drawer-body {
  overflow-y: auto;
  padding: 0.95rem;
}

.help-drawer-section {
  margin: 0 0 0.85rem;
  padding: 0.85rem;
  border: 1px solid #d7e4f0;
  border-radius: 0.85rem;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(25, 72, 112, 0.06);
}

.help-drawer-section h3 {
  margin: 0 0 0.45rem;
  color: #173f63;
  font-size: 0.95rem;
}

.help-drawer-section ul {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding-left: 1.05rem;
}

.help-drawer-section li {
  color: #365268;
  font-size: 0.88rem;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .app-status-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .status-group-right {
    display: none;
  }

  .app-status-bar {
    padding-right: 8.5rem;
  }

  .status-compact-toggle {
    right: 4rem;
    padding: 0.34rem 0.5rem;
  }

  .help-drawer-tab {
    right: 0.7rem;
    border: 1px solid #9fc0df;
    border-radius: 999px;
    padding: 0.34rem 0.55rem;
  }

  .help-drawer-tab-text {
    display: none;
  }

  .status-compact-toggle-text {
    display: inline;
  }

  .help-drawer {
    top: 4.4rem;
    bottom: 4.2rem;
    width: min(94vw, 390px);
  }

  .help-drawer-header {
    padding: 0.85rem;
  }

  .help-drawer-body {
    padding: 0.75rem;
  }
}

body.compact-feature-mode .app-status-bar {
  height: calc(4.1rem + env(safe-area-inset-bottom));
  min-height: calc(4.1rem + env(safe-area-inset-bottom));
  padding: 0;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(134, 157, 180, 0.65);
  box-shadow: none;
  backdrop-filter: blur(12px);
  pointer-events: none;
  z-index: 150;
}

body.compact-feature-mode .status-compact-toggle {
  position: fixed;
  right: 0.5rem;
  bottom: calc((4.1rem + env(safe-area-inset-bottom) - 1.95rem) / 2);
  top: auto;
  z-index: 170;
  pointer-events: auto;
  transform: none;
}

body.compact-feature-mode .status-compact-toggle-text {
  display: inline;
}

body.compact-feature-mode .app-status-inner,
body.compact-feature-mode .status-group,
body.compact-feature-mode .status-chip {
  display: none !important;
}

.modal-shell[hidden],
.modal-shell:not([hidden]) .password-reset-form[hidden],
.modal-shell:not([hidden]) .modal-form[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .modal-shell {
    --modal-mobile-top-gap: max(0.9rem, env(safe-area-inset-top));
    --modal-mobile-bottom-gap: max(0.9rem, env(safe-area-inset-bottom));
    display: flex;
    align-items: flex-start;
    justify-content: center;
    box-sizing: border-box;
    height: 100dvh;
    padding: var(--modal-mobile-top-gap) 0.35rem var(--modal-mobile-bottom-gap);
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-top: var(--modal-mobile-top-gap);
  }

  .modal-card,
  .modal-card-wide,
  .modal-card-compact,
  .modal-card-lease,
  .modal-card-preview,
  .todo-modal-card,
  .manual-journal-modal-card,
  .dashboard-bill-import-modal-card,
  .dashboard-bill-map-modal-card,
  .property-documents-modal-card,
  .opening-balances-modal-card,
  .chart-account-reconciliations-card {
    width: min(100%, calc(100vw - 0.7rem));
    max-width: min(100%, calc(100vw - 0.7rem));
    max-height: calc(100dvh - var(--modal-mobile-top-gap) - var(--modal-mobile-bottom-gap));
    margin: 0;
    padding: 0.75rem;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 0.45rem;
    box-sizing: border-box;
  }

  .modal-card:has(> .modal-header) {
    padding-top: 0;
  }

  .modal-header {
    position: sticky;
    top: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
    margin: 0 -0.75rem 0.75rem;
    padding: 0.75rem;
  }

  .modal-header h2 {
    font-size: 1.05rem;
  }

  .modal-header p {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .modal-header .icon-button,
  .modal-close {
    width: 100%;
    min-width: 100%;
    min-height: 2.2rem;
    justify-content: center;
    padding: 0.45rem 0.7rem;
    font-size: 0.95rem;
  }

  .modal-form,
  .modal-card form,
  .invoice-entry-shell,
  .invoice-entry-section,
  .dashboard-bill-import-grid,
  .dashboard-bill-map-layout,
  .property-documents-layout,
  .property-market-research-layout,
  .property-market-source-grid,
  .property-market-default-grid,
  .property-market-filter-grid,
  .property-market-stat-grid,
  .property-market-summary-grid,
  .property-market-comparable-row,
  .todo-form-grid,
  .fixed-asset-primary-grid,
  .fixed-asset-detail-grid,
  .two-column-form-grid,
  .manual-journal-summary-grid,
  .manual-journal-detail-grid {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .modal-card input,
  .modal-card select,
  .modal-card textarea,
  .modal-card button {
    max-width: 100%;
  }

  .modal-card .table-wrap,
  .modal-card .invoice-entry-table-wrap,
  .modal-card .journal-manual-line-items-wrap,
  .modal-card .opening-balances-entry-table-wrap,
  .modal-card .chart-account-reconciliations-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: auto;
  }

  .modal-card iframe,
  .modal-card embed,
  .modal-card object {
    width: 100%;
    max-width: 100%;
    min-height: 60dvh;
  }

  .modal-actions,
  .modal-card .form-actions,
  .invoice-entry-actions,
  .dashboard-todo-modal-actions,
  .manual-journal-modal-card .form-actions {
    position: sticky;
    bottom: -0.75rem;
    z-index: 2;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    margin: 0.85rem -0.75rem -0.75rem;
    padding: 0.65rem 0.75rem;
    border-top: 1px solid rgba(134, 157, 180, 0.28);
    background: rgba(255, 255, 255, 0.96);
  }

  .modal-actions button,
  .modal-card .form-actions button,
  .invoice-entry-actions button,
  .dashboard-todo-modal-actions button,
  .manual-journal-modal-card .form-actions button {
    width: auto;
    min-width: 0;
    min-height: 2.8rem;
    flex: 0 1 auto;
    margin-top: 0;
    padding: 0.5rem 0.7rem;
    font-size: 1rem;
    line-height: 1.2;
  }

  .modal-actions .primary,
  .modal-card .form-actions .primary,
  .modal-actions button[type="submit"],
  .modal-card .form-actions button[type="submit"] {
    flex: 0 0 auto;
    width: auto;
  }
}

body.compact-feature-mode .topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 0.7rem 6.4rem 0.7rem 0.75rem;
}

body.compact-feature-mode {
  padding-bottom: calc(5rem + env(safe-area-inset-bottom));
}

body.compact-feature-mode .topbar .brand-mark {
  min-width: 0;
}

body.compact-feature-mode .topbar-right {
  display: contents;
}

body.compact-feature-mode .logout-form {
  position: absolute !important;
  right: 0.5rem !important;
  bottom: auto !important;
  top: 50% !important;
  left: auto !important;
  transform: translateY(-50%) !important;
  grid-column: auto !important;
  grid-row: auto !important;
  align-self: auto !important;
  justify-self: auto !important;
  z-index: 170 !important;
  width: auto !important;
  margin: 0 !important;
  pointer-events: auto;
}

body.compact-feature-mode .logout-form .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.22rem;
  width: auto !important;
  min-width: 0;
  max-width: max-content;
  min-height: 0;
  margin-top: 0;
  padding: 0.34rem 0.55rem;
  border: 1px solid #9fc0df;
  border-radius: 999px;
  background: #eef5fb;
  color: #1e557d;
  box-shadow: 0 8px 20px rgba(21, 65, 103, 0.1);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.mobile-bottom-nav-host {
  display: none;
}

body.compact-feature-mode .mobile-bottom-nav-host {
  position: fixed !important;
  left: 0 !important;
  right: 5.15rem !important;
  top: auto !important;
  bottom: 0 !important;
  z-index: 155 !important;
  display: flex !important;
  pointer-events: auto;
}

body.compact-feature-mode .topbar nav,
body.compact-feature-mode .mobile-bottom-nav-host > nav {
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  grid-column: auto !important;
  grid-row: auto !important;
  z-index: auto !important;
  display: flex !important;
  align-items: stretch;
  justify-content: space-around;
  width: 100% !important;
  min-height: 4.1rem;
  padding: 0.34rem 0.3rem calc(0.34rem + env(safe-area-inset-bottom));
  gap: 0.18rem;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(134, 157, 180, 0.65);
  box-shadow: 0 -10px 28px rgba(16, 42, 67, 0.12);
  backdrop-filter: blur(12px);
}

body.compact-feature-mode .mobile-bottom-nav-host a,
body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown-trigger {
  color: var(--text-soft);
  text-decoration: none;
  padding: 0.5rem 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

body.compact-feature-mode .mobile-bottom-nav-host a.active,
body.compact-feature-mode .mobile-bottom-nav-host a:hover,
body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown-trigger.active,
body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown:hover .nav-dropdown-trigger,
body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown:focus-within .nav-dropdown-trigger {
  background: var(--accent-soft);
  color: var(--accent-deep);
  box-shadow: inset 0 0 0 1px rgba(19, 181, 234, 0.18);
}

body.compact-feature-mode .mobile-bottom-nav-host > nav:has(> .nav-dropdown:hover) > a.active,
body.compact-feature-mode .mobile-bottom-nav-host > nav:has(> .nav-dropdown:focus-within) > a.active,
body.compact-feature-mode .mobile-bottom-nav-host > nav:has(> a:hover) > a.active:not(:hover),
body.compact-feature-mode .mobile-bottom-nav-host > nav:has(> a:focus-visible) > a.active:not(:focus-visible),
body.compact-feature-mode .mobile-bottom-nav-host > nav:has(> a:hover) > .nav-dropdown.active:not(:hover):not(:focus-within) > .nav-dropdown-trigger.active,
body.compact-feature-mode .mobile-bottom-nav-host > nav:has(> a:focus-visible) > .nav-dropdown.active:not(:hover):not(:focus-within) > .nav-dropdown-trigger.active,
body.compact-feature-mode .mobile-bottom-nav-host > nav:has(> .nav-dropdown:hover) > .nav-dropdown.active:not(:hover):not(:focus-within) > .nav-dropdown-trigger.active,
body.compact-feature-mode .mobile-bottom-nav-host > nav:has(> .nav-dropdown:focus-within) > .nav-dropdown.active:not(:hover):not(:focus-within) > .nav-dropdown-trigger.active {
  background: transparent;
  color: var(--text-soft);
  box-shadow: none;
}

body.compact-feature-mode .topbar nav > a,
body.compact-feature-mode .topbar nav > .nav-dropdown > .nav-dropdown-trigger,
body.compact-feature-mode .mobile-bottom-nav-host > nav > a,
body.compact-feature-mode .mobile-bottom-nav-host > nav > .nav-dropdown > .nav-dropdown-trigger {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: 3.1rem;
  margin: 0;
  padding: 0.35rem 0.24rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.16rem;
  border-radius: 0.62rem;
  font-size: 0.66rem;
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
}

body.compact-feature-mode .topbar nav > .nav-dropdown,
body.compact-feature-mode .mobile-bottom-nav-host > nav > .nav-dropdown {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
}

body.compact-feature-mode .topbar nav > .nav-dropdown > .nav-dropdown-trigger,
body.compact-feature-mode .mobile-bottom-nav-host > nav > .nav-dropdown > .nav-dropdown-trigger {
  width: 100%;
}

body.compact-feature-mode .topbar nav .nav-top-icon,
body.compact-feature-mode .mobile-bottom-nav-host .nav-top-icon {
  display: inline-grid;
  place-items: center;
}

body.compact-feature-mode .topbar nav .nav-top-icon svg,
body.compact-feature-mode .mobile-bottom-nav-host .nav-top-icon svg {
  width: 1.36rem;
  height: 1.36rem;
}

body.compact-feature-mode .topbar nav .nav-top-text,
body.compact-feature-mode .topbar nav .nav-label-full,
body.compact-feature-mode .topbar nav .nav-label-compact,
body.compact-feature-mode .mobile-bottom-nav-host .nav-top-text,
body.compact-feature-mode .mobile-bottom-nav-host .nav-label-full,
body.compact-feature-mode .mobile-bottom-nav-host .nav-label-compact {
  display: none !important;
}

body.compact-feature-mode .topbar nav .nav-dropdown-trigger::after,
body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown-trigger::after {
  display: none;
}

body.compact-feature-mode .topbar .nav-dropdown-menu a,
body.compact-feature-mode .topbar .nav-submenu-trigger,
body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown-menu a,
body.compact-feature-mode .mobile-bottom-nav-host .nav-submenu-trigger {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.72rem;
  text-align: left;
  font-size: 1.5rem;
}

body.compact-feature-mode .topbar .nav-dropdown-menu a .nav-menu-icon,
body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown-menu a .nav-menu-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 1.36rem;
  width: 1.36rem;
  height: 1.36rem;
}

body.compact-feature-mode .topbar .nav-dropdown-menu a .nav-menu-icon svg,
body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown-menu a .nav-menu-icon svg {
  width: 1.36rem;
  height: 1.36rem;
}

body.compact-feature-mode .topbar .nav-dropdown-menu,
body.compact-feature-mode .topbar .nav-dropdown-menu-right,
body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown-menu,
body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown-menu-right {
  position: fixed;
  top: auto;
  bottom: calc(4.85rem + env(safe-area-inset-bottom));
  left: 50%;
  right: auto;
  width: min(21rem, calc(100vw - 1rem));
  min-width: 0;
  max-width: calc(100vw - 1rem);
  max-height: min(70vh, 32rem);
  overflow-x: hidden;
  overflow-y: auto;
  transform: translate(-50%, 0.35rem);
  z-index: 180;
  display: grid;
  gap: 0.22rem;
  padding: 0.5rem;
  border: 1px solid rgba(134, 157, 180, 0.58);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 46px rgba(16, 42, 67, 0.26);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(12px);
}

body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown-menu a,
body.compact-feature-mode .mobile-bottom-nav-host .nav-submenu-trigger {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.72rem;
  border-radius: 0.58rem;
  color: var(--text-soft);
  text-align: left;
}

body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown-menu a > span:not(.nav-menu-icon),
body.compact-feature-mode .topbar .nav-dropdown-menu a > span:not(.nav-menu-icon) {
  flex: 0 1 auto;
  margin-left: 0;
  text-align: left;
}

body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown-menu a.active,
body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown-menu a:hover,
body.compact-feature-mode .mobile-bottom-nav-host .nav-submenu-trigger.active,
body.compact-feature-mode .mobile-bottom-nav-host .nav-submenu-trigger:hover,
body.compact-feature-mode .mobile-bottom-nav-host .nav-submenu:hover .nav-submenu-trigger,
body.compact-feature-mode .mobile-bottom-nav-host .nav-submenu:focus-within .nav-submenu-trigger {
  background: var(--accent-soft);
  color: var(--accent-deep);
  box-shadow: inset 0 0 0 1px rgba(19, 181, 234, 0.18);
}

body.compact-feature-mode .topbar .nav-dropdown:hover .nav-dropdown-menu,
body.compact-feature-mode .topbar .nav-dropdown:focus-within .nav-dropdown-menu,
body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown:hover .nav-dropdown-menu,
body.compact-feature-mode .mobile-bottom-nav-host .nav-dropdown:focus-within .nav-dropdown-menu {
  display: grid;
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

body.compact-feature-mode .topbar .nav-submenu-menu,
body.compact-feature-mode .mobile-bottom-nav-host .nav-submenu-menu {
  position: static;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

body.compact-feature-mode .modal-actions button[type="submit"],
body.compact-feature-mode .modal-card .form-actions button[type="submit"] {
  flex: 0 0 auto;
  width: auto;
}

@media (max-width: 420px) {
  .modal-shell {
    --modal-mobile-top-gap: max(1rem, env(safe-area-inset-top));
    --modal-mobile-bottom-gap: max(0.9rem, env(safe-area-inset-bottom));
    align-items: flex-start;
    padding: var(--modal-mobile-top-gap) 0.45rem var(--modal-mobile-bottom-gap);
  }

  .modal-card,
  .modal-card-wide,
  .modal-card-compact,
  .modal-card-lease,
  .modal-card-preview,
  .todo-modal-card,
  .manual-journal-modal-card,
  .dashboard-bill-import-modal-card,
  .dashboard-bill-map-modal-card,
  .property-documents-modal-card,
  .opening-balances-modal-card,
  .chart-account-reconciliations-card {
    width: min(100%, calc(100vw - 0.9rem));
    max-width: min(100%, calc(100vw - 0.9rem));
    min-height: auto;
    max-height: calc(100dvh - var(--modal-mobile-top-gap) - var(--modal-mobile-bottom-gap));
    border-radius: 0.45rem;
  }

  .modal-header {
    padding: 0.65rem;
  }

  .modal-header h2,
  .modal-header p,
  .modal-card p,
  .modal-card span,
  .modal-card label {
    overflow-wrap: anywhere;
  }

  .dashboard-wait-card {
    align-self: center;
    width: min(100%, calc(100vw - 1.25rem));
    min-height: auto;
  }

  .wait-indicator-row {
    align-items: flex-start;
    white-space: normal;
  }

  .modal-actions,
  .modal-card .form-actions,
  .invoice-entry-actions,
  .dashboard-todo-modal-actions,
  .manual-journal-modal-card .form-actions {
    bottom: -0.75rem;
  }
}

@media (max-width: 720px) {
  .modal-shell:not([hidden]) {
    --modal-mobile-top-gap: max(0.85rem, env(safe-area-inset-top));
    --modal-mobile-bottom-gap: max(0.75rem, env(safe-area-inset-bottom));
    position: fixed;
    inset: 0;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100svh !important;
    max-height: 100svh;
    padding: var(--modal-mobile-top-gap) 0.45rem var(--modal-mobile-bottom-gap) !important;
    overflow-x: hidden !important;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch;
  }

  .modal-shell:not([hidden]) > .modal-card,
  .modal-shell:not([hidden]) > .modal-card-wide,
  .modal-shell:not([hidden]) > .modal-card-compact,
  .modal-shell:not([hidden]) > .modal-card-lease,
  .modal-shell:not([hidden]) > .modal-card-preview {
    flex: 0 0 auto;
    width: min(100%, calc(100vw - 1rem)) !important;
    max-width: min(100%, calc(100vw - 1rem)) !important;
    max-height: calc(100svh - var(--modal-mobile-top-gap) - var(--modal-mobile-bottom-gap)) !important;
    margin: 0 auto !important;
    padding: 0.55rem !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .modal-shell:not([hidden]) .modal-header {
    position: static !important;
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    grid-template-columns: none !important;
    margin: 0 -0.55rem 0.55rem !important;
    padding: 0.55rem !important;
    gap: 0.4rem;
  }

  .modal-shell:not([hidden]) .modal-header > div {
    min-width: 0;
  }

  .modal-shell:not([hidden]) .modal-header .icon-button,
  .modal-shell:not([hidden]) .modal-close {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 2rem !important;
    max-width: 2.4rem !important;
    min-height: 2rem !important;
    padding: 0.32rem 0.55rem !important;
    margin-top: 0 !important;
  }

  .modal-shell:not([hidden]) .modal-header h2 {
    font-size: 0.98rem;
    line-height: 1.15;
  }

  .modal-shell:not([hidden]) .modal-header p {
    font-size: 0.74rem;
    line-height: 1.25;
  }

  .modal-shell:not([hidden]) .modal-form,
  .modal-shell:not([hidden]) .tenant-modal-form,
  .modal-shell:not([hidden]) .tenant-modal-columns {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.45rem !important;
  }

  .modal-shell:not([hidden]) label {
    margin-top: 0.35rem;
    margin-bottom: 0.15rem;
    font-size: 0.94rem;
    font-weight: 650;
    line-height: 1.25;
  }

  .modal-shell:not([hidden]) input,
  .modal-shell:not([hidden]) select,
  .modal-shell:not([hidden]) textarea {
    min-height: 2rem;
    padding: 0.38rem 0.52rem;
    font-size: 16px;
  }

  .modal-shell:not([hidden]) .modal-actions {
    position: static !important;
    margin: 0.65rem -0.55rem -0.55rem !important;
    padding: 0.5rem 0.55rem !important;
  }

  .modal-shell:not([hidden]) .modal-actions button,
  .modal-shell:not([hidden]) .modal-card .form-actions button {
    min-height: 2.8rem !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 1rem !important;
    line-height: 1.2 !important;
  }
}

@media (max-width: 720px) {
  .modal-shell:not([hidden]) {
      display: flex !important;
      align-items: flex-start !important;
      justify-content: center !important;
      height: 100vh !important;
      height: 100dvh !important;
      max-height: none !important;
      z-index: 200 !important;
      padding: max(1rem, env(safe-area-inset-top)) 0.45rem max(0.85rem, env(safe-area-inset-bottom)) !important;
      overflow-y: auto !important;
      touch-action: pan-y;
    }

  .modal-shell:not([hidden]) > .modal-card,
  .modal-shell:not([hidden]) > .modal-card-wide,
  .modal-shell:not([hidden]) > .modal-card-compact,
  .modal-shell:not([hidden]) > .modal-card-lease,
  .modal-shell:not([hidden]) > .modal-card-preview {
    width: min(100%, calc(100vw - 1rem)) !important;
    max-width: min(100%, calc(100vw - 1rem)) !important;
    max-height: calc(100dvh - 1.5rem) !important;
    margin: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .modal-shell:not([hidden]) .modal-header {
      position: relative !important;
      display: block !important;
      margin: -0.55rem -0.55rem 0.55rem !important;
      padding: 0.68rem 3rem 0.6rem 0.68rem !important;
      padding-right: 3rem !important;
      border-top-left-radius: 0.45rem;
      border-top-right-radius: 0.45rem;
    }

  .modal-shell:not([hidden]) .modal-header .icon-button,
  .modal-shell:not([hidden]) .modal-close {
    position: absolute !important;
    top: 0.45rem !important;
    right: 0.55rem !important;
    left: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2rem !important;
    min-width: 2rem !important;
    max-width: 2rem !important;
    height: 2rem !important;
    min-height: 2rem !important;
    padding: 0 !important;
    line-height: 1 !important;
  }
}

@media (max-width: 720px) {
  .modal-shell:not([hidden]) > .modal-card,
  .modal-shell:not([hidden]) > .modal-card-wide,
  .modal-shell:not([hidden]) > .modal-card-compact,
  .modal-shell:not([hidden]) > .modal-card-lease,
  .modal-shell:not([hidden]) > .modal-card-preview {
    padding-top: 0 !important;
  }

  .modal-shell:not([hidden]) .modal-header {
    margin-top: 0 !important;
    border-top-left-radius: 0.45rem !important;
    border-top-right-radius: 0.45rem !important;
  }
}

@media (max-width: 720px) {
  .modal-shell:not([hidden]) > .modal-card-preview {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100dvh - 1.5rem) !important;
    max-height: calc(100dvh - 1.5rem) !important;
    min-height: calc(100dvh - 1.5rem) !important;
    overflow: hidden !important;
  }

  .modal-shell:not([hidden]) > .modal-card-preview .modal-header {
    flex: 0 0 auto !important;
  }

  .modal-shell:not([hidden]) > .modal-card-preview .file-preview-shell {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden !important;
  }

  .modal-shell:not([hidden]) > .modal-card-preview .file-preview-frame,
  .modal-shell:not([hidden]) > .modal-card-preview .file-preview-image,
  .modal-shell:not([hidden]) > .modal-card-preview .file-preview-empty,
  .modal-shell:not([hidden]) > .modal-card-preview .pdf-document-viewer {
    min-height: 0 !important;
    height: 100% !important;
  }

  .modal-shell:not([hidden]) > .modal-card-preview .file-preview-empty-mobile {
    position: relative;
    min-height: 12rem !important;
    height: auto !important;
  }
}

body.compact-feature-mode #dashboard-reconciliation-preview-modal:not([hidden]) {
  left: 0 !important;
  right: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  justify-content: center !important;
  padding-left: 0.45rem !important;
  padding-right: 0.45rem !important;
  box-sizing: border-box !important;
}

body.compact-feature-mode #dashboard-reconciliation-preview-modal:not([hidden]) > .modal-card,
body.compact-feature-mode #dashboard-reconciliation-preview-modal:not([hidden]) > .modal-card-wide {
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: min(100%, calc(100vw - 0.9rem)) !important;
  max-width: min(100%, calc(100vw - 0.9rem)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

body.compact-feature-mode #dashboard-reconciliation-preview-modal .modal-form,
body.compact-feature-mode #dashboard-reconciliation-preview-modal .invoice-entry-shell {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}

#system-email-preview-modal:not([hidden]) {
  overflow: hidden !important;
}

#system-email-preview-modal:not([hidden]) > .system-email-preview-card {
  width: min(1120px, calc(100vw - 4rem)) !important;
  max-width: min(1120px, calc(100vw - 4rem)) !important;
  height: min(84vh, 820px) !important;
  max-height: min(84vh, 820px) !important;
  overflow: hidden !important;
}

#system-email-preview-modal .system-email-preview-body {
  min-height: 0 !important;
  overflow: hidden !important;
}

#system-email-preview-modal .email-log-preview-frame {
  position: static !important;
  inset: auto !important;
  min-height: 0 !important;
  height: 100% !important;
}

@media (max-width: 720px) {
  #system-email-preview-modal:not([hidden]) {
    padding: max(1rem, env(safe-area-inset-top)) 0.45rem max(0.85rem, env(safe-area-inset-bottom)) !important;
  }

  #system-email-preview-modal:not([hidden]) > .system-email-preview-card {
    width: min(100%, calc(100vw - 1rem)) !important;
    max-width: min(100%, calc(100vw - 1rem)) !important;
    height: calc(100dvh - 1.5rem) !important;
    max-height: calc(100dvh - 1.5rem) !important;
    margin: 0 !important;
  }
}

.inspections-shell {
  display: grid;
  gap: 1rem;
}

.inspection-mobile-actions {
  display: none;
}

.inspection-section,
.inspection-lease-grid,
.inspection-list {
  display: grid;
  gap: 0.75rem;
}

.inspection-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.inspection-section-header h3 {
  margin: 0;
  color: #17324d;
  font-size: 1rem;
}

.inspection-search {
  max-width: 24rem;
}

.inspection-lease-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.inspection-lease-card,
.inspection-card {
  border: 1px solid rgba(54, 100, 136, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(23, 50, 77, 0.06);
}

.inspection-lease-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
}

.inspection-lease-card strong,
.inspection-lease-card span,
.inspection-lease-card small {
  display: block;
}

.inspection-lease-card strong {
  color: #17324d;
}

.inspection-lease-card span,
.inspection-lease-card small {
  color: #587087;
}

.inspection-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.95rem;
}

.inspection-card.is-overdue {
  border-color: rgba(214, 64, 69, 0.45);
  background: #fff7f7;
}

.inspection-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}

.inspection-card h3 {
  margin: 0.35rem 0 0;
  color: #17324d;
  font-size: 1.08rem;
}

.inspection-card p {
  margin: 0.25rem 0 0;
}

.inspection-card-date {
  display: grid;
  gap: 0.15rem;
  justify-items: end;
  min-width: 8rem;
  color: #587087;
}

.inspection-card-date strong {
  color: #17324d;
  white-space: nowrap;
}

.inspection-status-badge {
  width: max-content;
}

.inspection-notes {
  display: grid;
  gap: 0.25rem;
  padding: 0.65rem;
  border-radius: 6px;
  background: rgba(237, 242, 247, 0.72);
}

.inspection-notes p {
  margin: 0;
  white-space: pre-wrap;
}

.inspection-photo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 0.45rem;
}

.inspection-photo-strip a,
.inspection-photo-strip img {
  display: block;
  width: 100%;
}

.inspection-photo-strip a {
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(54, 100, 136, 0.16);
  aspect-ratio: 1;
  background: #eef3f7;
}

.inspection-photo-strip img {
  height: 100%;
  object-fit: cover;
}

.inspection-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.inspection-modal-card {
  width: min(560px, 94vw);
}

.inspection-record-modal-card {
  width: min(760px, 96vw);
}

.inspection-form {
  gap: 0.8rem;
}

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

.inspection-photo-upload {
  position: relative;
  display: grid;
  gap: 0.25rem;
  padding: 1rem;
  border: 1px dashed rgba(54, 100, 136, 0.35);
  border-radius: 8px;
  background: #fff;
  color: #17324d;
}

.inspection-photo-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.inspection-photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.inspection-photo-preview-grid[hidden] {
  display: none;
}

.inspection-photo-preview-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid rgba(54, 100, 136, 0.18);
  background: #f5f8fb;
}

.inspection-photo-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.inspection-photo-preview-item > span {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  font-size: 0.78rem;
  color: #5f7285;
}

.inspection-photo-preview-remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.7rem;
  height: 1.7rem;
  min-height: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(125, 31, 37, 0.92);
  color: #fff;
  font-weight: 700;
  line-height: 1;
}

.inspection-checkbox {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}

.inspection-checkbox input {
  width: auto;
}

.inspection-todo-fields {
  display: grid;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid rgba(54, 100, 136, 0.16);
  border-radius: 8px;
  background: rgba(247, 250, 252, 0.9);
}

.inspection-todo-fields[hidden] {
  display: none;
}

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

#inspections-directory-table th,
#inspections-directory-table td {
  vertical-align: top;
}

#inspections-directory-table td strong,
#inspections-directory-table td span {
  display: block;
}

.inspection-directory-row.is-overdue > td {
  background: rgba(214, 64, 69, 0.12) !important;
}

.inspection-history-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: auto;
  min-height: 0;
  padding: 0.28rem 0.48rem;
  font-size: 0.76rem;
}

.inspection-history-toggle.is-empty {
  opacity: 0.55;
}

.inspection-history-toggle.is-open .portfolio-property-toggle-indicator {
  transform: rotate(90deg);
}

.inspection-detail-row > .inspection-detail-cell {
  padding: 0 !important;
  background: #f5f8fb !important;
}

.inspection-detail-shell {
  border-left: 3px solid rgba(19, 181, 234, 0.45);
  width: 100%;
  box-sizing: border-box;
}

.inspection-history-table-wrap {
  width: 100%;
}

.inspection-history-table {
  min-width: 820px;
  width: 100%;
}

.inspection-history-table th,
.inspection-history-table td {
  font-size: 0.78rem;
}

.inspection-history-notes {
  min-width: 12rem;
  max-width: 24rem;
  white-space: pre-wrap;
}

.inspection-photo-strip-grid {
  grid-template-columns: repeat(3, 52px);
  width: max-content;
}

.inspection-photo-strip-grid a,
.inspection-photo-thumb-button {
  width: 52px;
  height: 52px;
}

.inspection-photo-thumb-button {
  display: block;
  overflow: hidden;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.inspection-photo-thumb-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.inspection-history-actions {
  white-space: nowrap;
}

.inspection-history-actions .inline {
  display: inline-flex;
}

.inspection-record-action-text {
  display: none;
}

.inspection-photo-carousel-card {
  width: min(96vw, 980px);
  max-height: 94vh;
}

.inspection-photo-carousel-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 58vh;
  background: #0f1f2d;
  border-radius: 8px;
  overflow: hidden;
}

.inspection-photo-carousel-stage img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  display: block;
}

.inspection-photo-carousel-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 3rem;
  height: 3rem;
  min-height: 0;
  padding: 0.55rem;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  color: #17324d;
  box-shadow: 0 8px 20px rgba(15, 31, 45, 0.2);
}

.inspection-photo-carousel-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.inspection-photo-carousel-prev {
  left: 0.75rem;
}

.inspection-photo-carousel-next {
  right: 0.75rem;
}

.inspection-photo-carousel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 0.65rem;
  color: #5f7285;
  font-size: 0.9rem;
}

#inspection-photo-carousel-caption {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

#inspection-photo-carousel-caption strong {
  color: #2a4056;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#inspection-photo-carousel-caption small {
  color: #5f7285;
  font-size: 0.82rem;
}

.inspection-photo-carousel-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.inspection-photo-carousel-actions form {
  margin: 0;
}

.inspection-photo-carousel-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 2.25rem;
  margin: 0;
  padding: 0.42rem 0.68rem;
  border: 1px solid rgba(8, 125, 168, 0.24);
  border-radius: 0.35rem;
  background: #eef5fb;
  color: #075f81;
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.inspection-photo-carousel-action-button:hover,
.inspection-photo-carousel-action-button:focus-visible {
  background: #dcecf8;
  color: #064f6b;
  filter: none;
}

.inspection-status-badge.urgent {
  background: #ffd8d8;
  color: #7d1f25;
}

body.compact-feature-mode #inspections-directory-table {
  min-width: 520px;
}

body.compact-feature-mode #inspections-directory-table > thead > tr > th,
body.compact-feature-mode #inspections-directory-table > tbody > tr.inspection-directory-row > td {
  font-size: 1.08rem;
  line-height: 1.25;
}

body.compact-feature-mode #inspections-directory-table .inspection-history-toggle {
  font-size: 1.08rem;
}

body.compact-feature-mode #inspections-directory-table .inspection-phone-hide-property,
body.compact-feature-mode #inspections-directory-table .inspection-phone-hide-frequency {
  display: none;
}

body.compact-feature-mode .inspection-complete-button {
  width: auto;
  min-width: 4.8rem;
  padding-inline: 0.56rem;
}

body.compact-feature-mode .inspection-complete-button .inspection-record-action-icon {
  display: none;
}

body.compact-feature-mode .inspection-complete-button .inspection-record-action-text {
  display: inline;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
}

body.compact-feature-mode .inspection-history-table {
  min-width: 980px;
}

body.compact-feature-mode .inspection-history-table thead tr,
body.compact-feature-mode .inspection-history-table tbody tr.inspection-history-row {
  display: grid;
  grid-template-columns: minmax(6rem, 0.9fr) minmax(6.5rem, 0.9fr) minmax(6rem, 0.9fr) minmax(7rem, 1fr) minmax(8rem, 1fr) minmax(12rem, 1.6fr) minmax(8rem, 1fr);
}

body.compact-feature-mode .inspection-history-table th,
body.compact-feature-mode .inspection-history-table td {
  font-size: 1.08rem;
  line-height: 1.25;
}

body.compact-feature-mode .inspection-history-col-status {
  order: 1;
}

body.compact-feature-mode .inspection-history-col-actions {
  order: 2;
}

body.compact-feature-mode .inspection-history-col-due {
  order: 3;
}

body.compact-feature-mode .inspection-history-col-completed {
  order: 4;
}

body.compact-feature-mode .inspection-history-col-condition {
  order: 5;
}

body.compact-feature-mode .inspection-history-col-notes {
  order: 6;
}

body.compact-feature-mode .inspection-history-col-photos {
  order: 7;
}

@media (max-width: 720px) {
  .inspections-shell {
    padding: 0.75rem;
  }

  .inspection-mobile-actions {
    display: block;
  }

  .inspection-mobile-actions .toolbar-button {
    width: 100%;
    min-height: 3rem;
    font-size: 1rem;
  }

  .inspection-section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .inspection-search {
    max-width: none;
    width: 100%;
  }

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

  .inspection-lease-card {
    align-items: stretch;
    flex-direction: column;
  }

  .inspection-schedule-button {
    width: 100%;
    min-height: 2.65rem;
  }

  .inspection-card-main {
    display: grid;
  }

  .inspection-card-date {
    justify-items: start;
    min-width: 0;
  }

  .inspection-card h3 {
    font-size: 1.18rem;
  }

  .inspection-card-actions {
    justify-content: stretch;
  }

  .inspection-card-actions .toolbar-button,
  .inspection-card-actions form,
  .inspection-card-actions form button {
    width: 100%;
  }

  .inspection-complete-button,
  .inspection-record-actions button {
    min-height: 3rem;
    font-size: 1.05rem;
  }

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

  .inspection-record-modal-card {
    width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }

  .inspection-photo-upload {
    min-height: 5rem;
    justify-content: center;
  }

  #inspections-directory-table {
    min-width: 520px;
  }

  #inspections-directory-table > thead > tr > th,
  #inspections-directory-table > tbody > tr.inspection-directory-row > td {
    font-size: 1.08rem;
    line-height: 1.25;
  }

  #inspections-directory-table .inspection-phone-hide-property,
  #inspections-directory-table .inspection-phone-hide-frequency {
    display: none;
  }

  .inspection-history-table {
    min-width: 980px;
  }

  .inspection-history-table thead tr,
  .inspection-history-table tbody tr.inspection-history-row {
    display: grid;
    grid-template-columns: minmax(6rem, 0.9fr) minmax(6.5rem, 0.9fr) minmax(6rem, 0.9fr) minmax(7rem, 1fr) minmax(8rem, 1fr) minmax(12rem, 1.6fr) minmax(8rem, 1fr);
  }

  .inspection-history-table th,
  .inspection-history-table td {
    font-size: 1.08rem;
    line-height: 1.25;
  }

  .inspection-history-col-status {
    order: 1;
  }

  .inspection-history-col-actions {
    order: 2;
  }

  .inspection-history-col-due {
    order: 3;
  }

  .inspection-history-col-completed {
    order: 4;
  }

  .inspection-history-col-condition {
    order: 5;
  }

  .inspection-history-col-notes {
    order: 6;
  }

  .inspection-history-col-photos {
    order: 7;
  }

  .inspection-history-toggle {
    padding: 0.42rem 0.55rem;
    font-size: 1.08rem;
  }
}

body.compact-feature-mode table th,
body.compact-feature-mode table td {
  font-size: 1.08rem;
  line-height: 1.25;
}

body.compact-feature-mode table th .sort-button {
  font-size: inherit;
  line-height: inherit;
}

input[type="search"],
.invoice-table-toolbar .invoice-table-filter-input,
.invoice-table-toolbar > .invoice-table-filter-input,
.invoice-compact-search-slot .invoice-table-filter-input,
.table-tools .table-tools-filter,
.table-tools-actions .table-tools-filter,
.journal-invoice-search-input,
#inspection-search,
#todo-items-filter {
  padding: 0.46rem 0.62rem;
  border-radius: 0.35rem;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(134, 157, 180, 0.18);
}

.invoice-table-toolbar .invoice-table-filter-input {
  margin-left: auto;
}

.invoice-disabled-date-picker {
  opacity: 0.52;
  pointer-events: none;
  filter: grayscale(0.35);
}

.invoice-disabled-date-picker .cash-summary-picker-trigger {
  cursor: not-allowed;
}

.invoice-table-toolbar .invoice-toolbar-right-start {
  margin-left: auto;
}

.invoice-table-toolbar .invoice-toolbar-right-start ~ .invoice-table-filter-input {
  margin-left: 0;
}

.bank-account-table-toolbar #open-bank-account-description-summary-modal {
  margin-left: auto;
}

.bank-account-table-toolbar .invoice-table-filter-input {
  margin-left: 0;
}

.invoice-table-toolbar .invoice-table-toolbar-pagination {
  margin-left: 0;
}

body.compact-feature-mode .invoice-table-toolbar .invoice-toolbar-right-start,
body.compact-feature-mode .invoice-table-toolbar .invoice-table-filter-input {
  margin-left: 0;
}

@media (max-width: 820px) {
  .table-pagination-inline {
    flex: 1 1 100%;
  }

  .table-pagination-status {
    min-width: 0;
  }

  .invoice-table-toolbar .invoice-toolbar-right-start,
  .bank-account-table-toolbar #open-bank-account-description-summary-modal,
  .invoice-table-toolbar .invoice-table-filter-input {
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  .fixed-assets-shell .fixed-assets-tab-panel .invoice-table-toolbar {
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 0.35rem;
  }

  .fixed-assets-shell .fixed-assets-tab-panel .invoice-table-toolbar > .invoice-table-filter-input,
  body.compact-feature-mode .fixed-assets-shell .fixed-assets-tab-panel .invoice-table-toolbar > .invoice-table-filter-input {
    flex: 0 0 auto;
    align-self: flex-start;
    width: min(13rem, 100%);
    min-width: min(10rem, 100%);
    max-width: 13rem;
    min-height: 2.25rem;
    height: 2.25rem;
    max-height: 2.25rem;
    padding: 0.38rem 0.55rem;
    font-size: 0.95rem;
    line-height: 1.2;
  }
}

#reconciliation-table > tbody > tr.journal-entry-row-bill-matched > td.reconciliation-transaction-cell,
#reconciliation-table > tbody > tr.journal-entry-row-bill-matched > td.reconciliation-submit-cell,
#reconciliation-table > tbody > tr.journal-entry-row-bill-matched > td.reconciliation-actions-cell,
#reconciliation-table > tbody > tr.journal-entry-row-bill-matched:hover > td.reconciliation-transaction-cell,
#reconciliation-table > tbody > tr.journal-entry-row-bill-matched:hover > td.reconciliation-submit-cell,
#reconciliation-table > tbody > tr.journal-entry-row-bill-matched:hover > td.reconciliation-actions-cell,
#reconciliation-table > tbody > tr.journal-entry-row-bill-matched .reconciliation-mobile-summary {
  background: #dff4e5 !important;
  background-color: #dff4e5 !important;
}

#reconciliation-table > tbody > tr.journal-entry-row-transfer-matched > td.reconciliation-transaction-cell,
#reconciliation-table > tbody > tr.journal-entry-row-transfer-matched > td.reconciliation-submit-cell,
#reconciliation-table > tbody > tr.journal-entry-row-transfer-matched > td.reconciliation-actions-cell,
#reconciliation-table > tbody > tr.journal-entry-row-transfer-matched:hover > td.reconciliation-transaction-cell,
#reconciliation-table > tbody > tr.journal-entry-row-transfer-matched:hover > td.reconciliation-submit-cell,
#reconciliation-table > tbody > tr.journal-entry-row-transfer-matched:hover > td.reconciliation-actions-cell,
#reconciliation-table > tbody > tr.journal-entry-row-transfer-matched .reconciliation-mobile-summary {
  background: #fff9df !important;
  background-color: #fff9df !important;
}

.performance-target-unit-details,
.performance-target-expense-details {
  max-width: 100% !important;
  overflow-x: auto !important;
}

.performance-target-unit-details .performance-target-unit-table {
  min-width: 46rem !important;
}

.performance-target-expense-details .performance-target-expense-table {
  width: 100% !important;
  min-width: 42rem !important;
  table-layout: fixed !important;
}

.performance-target-expense-details .performance-target-expense-table th,
.performance-target-expense-details .performance-target-expense-table td {
  padding-inline: 0.42rem !important;
}

.performance-target-expense-details .performance-target-expense-table th:nth-child(1),
.performance-target-expense-details .performance-target-expense-table td:nth-child(1) {
  width: 18% !important;
}

.performance-target-expense-details .performance-target-expense-table th:nth-child(2),
.performance-target-expense-details .performance-target-expense-table th:nth-child(3),
.performance-target-expense-details .performance-target-expense-table th:nth-child(4),
.performance-target-expense-details .performance-target-expense-table td:nth-child(2),
.performance-target-expense-details .performance-target-expense-table td:nth-child(3),
.performance-target-expense-details .performance-target-expense-table td:nth-child(4) {
  width: 13% !important;
  min-width: 0 !important;
}

.performance-target-expense-details .performance-target-expense-table th:nth-child(5),
.performance-target-expense-details .performance-target-expense-table td:nth-child(5) {
  width: 43% !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.performance-target-expense-details .performance-target-expense-note {
  white-space: normal !important;
  line-height: 1.35 !important;
}

.performance-target-expense-details .performance-target-expense-input {
  width: 5.3rem !important;
  min-width: 5.3rem !important;
}

@media (max-width: 720px) {
  .performance-target-expense-details .performance-target-expense-table {
    min-width: 39rem !important;
  }

  .performance-target-expense-details .performance-target-expense-table th:nth-child(1),
  .performance-target-expense-details .performance-target-expense-table td:nth-child(1) {
    width: 17% !important;
  }

  .performance-target-expense-details .performance-target-expense-table th:nth-child(2),
  .performance-target-expense-details .performance-target-expense-table th:nth-child(3),
  .performance-target-expense-details .performance-target-expense-table th:nth-child(4),
  .performance-target-expense-details .performance-target-expense-table td:nth-child(2),
  .performance-target-expense-details .performance-target-expense-table td:nth-child(3),
  .performance-target-expense-details .performance-target-expense-table td:nth-child(4) {
    width: 12.5% !important;
  }

  .performance-target-expense-details .performance-target-expense-table th:nth-child(5),
  .performance-target-expense-details .performance-target-expense-table td:nth-child(5) {
    width: 45.5% !important;
  }
}

.performance-expense-account-modal:not([hidden]) > .performance-expense-account-modal-card {
  width: min(820px, 94vw) !important;
  max-width: min(820px, 94vw) !important;
  overflow-x: hidden !important;
}

.performance-expense-account-modal .performance-expense-account-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 0.8rem !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0.9rem !important;
  border: 0 !important;
  background: transparent !important;
}

.performance-expense-account-modal .performance-expense-account-heading,
.performance-expense-account-modal .performance-expense-account-grid {
  min-width: 0 !important;
  width: 100% !important;
}

.performance-expense-account-modal .performance-expense-account-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)) !important;
  gap: 0.45rem !important;
  max-height: min(52vh, 26rem) !important;
  padding: 0.55rem !important;
  border: 1px solid rgba(52, 98, 127, 0.26) !important;
  border-radius: 0.45rem !important;
  background: #fbfdff !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-gutter: stable !important;
}

.performance-expense-account-modal .performance-expense-account-grid label {
  display: grid !important;
  grid-template-columns: 1.2rem minmax(0, 1fr) !important;
  align-items: flex-start !important;
  gap: 0.5rem !important;
  min-width: 0 !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0.48rem 0.55rem !important;
  font-size: 0.86rem !important;
  line-height: 1.3 !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.performance-expense-account-modal .performance-expense-account-grid label.performance-financial-account-row-hidden {
  display: none !important;
}

.performance-expense-account-modal .performance-expense-account-grid input[type="checkbox"] {
  width: 1rem !important;
  min-width: 1rem !important;
  height: 1rem !important;
  min-height: 1rem !important;
  margin: 0.12rem 0 0 !important;
  padding: 0 !important;
}

.performance-expense-account-modal .performance-expense-account-grid span {
  display: block !important;
  min-width: 0 !important;
  max-width: 100% !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.performance-expense-account-modal .form-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: end !important;
  gap: 0.5rem !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: 0.2rem 0 0 auto !important;
  padding: 0.65rem 0 0 !important;
  position: static !important;
  background: transparent !important;
}

.performance-expense-account-modal .form-actions button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 9.5rem !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 2.35rem !important;
  height: 2.35rem !important;
  margin: 0 !important;
  padding: 0.48rem 0.75rem !important;
  border-radius: 0.4rem !important;
  font-size: 0.9rem !important;
  line-height: 1.2 !important;
}

.performance-financial-groups-modal-card {
  width: min(1040px, calc(100vw - 1.5rem)) !important;
  max-width: min(1040px, calc(100vw - 1.5rem)) !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.85rem;
  max-height: calc(100vh - 2rem) !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

.performance-financial-groups-modal:not([hidden]) > .performance-financial-groups-modal-card {
  width: min(1040px, calc(100vw - 1.5rem)) !important;
  max-width: min(1040px, calc(100vw - 1.5rem)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow-x: hidden !important;
}

.performance-financial-groups-list {
  display: grid;
  gap: 0.8rem;
  max-height: min(70vh, 46rem);
  overflow-y: auto;
  padding-right: 0.2rem;
}

.performance-financial-groups-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(22rem, 1fr));
  gap: 1rem;
  min-height: 0;
  align-items: stretch;
  overflow: hidden;
}

.performance-financial-group-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  border: 1px solid rgba(52, 98, 127, 0.2);
  border-radius: 0.5rem;
  background: rgba(248, 251, 255, 0.96);
  padding: 0.75rem;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.performance-financial-group-card .performance-expense-account-form {
  margin: 0 !important;
}

.performance-financial-group-list,
.performance-financial-account-assignment-grid {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.performance-financial-group-tabs {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  max-height: none;
  overflow-y: auto;
  padding-right: 0.15rem;
  scrollbar-gutter: stable;
}

.performance-financial-group-tab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.3rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(52, 98, 127, 0.18);
  border-radius: 0.42rem;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.performance-financial-group-tab:hover,
.performance-financial-group-tab.active {
  border-color: rgba(52, 98, 127, 0.42);
  background: #fff8d9;
}

.performance-financial-group-tab span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.performance-financial-group-tab small {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.performance-financial-group-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.performance-financial-group-management {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(52, 98, 127, 0.16);
}

.performance-financial-delete-selected {
  justify-self: start;
  min-height: 2.35rem;
  border-radius: 0.4rem;
}

.performance-financial-group-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 0.7rem;
  min-height: 100%;
  margin: 0 !important;
  overflow: hidden;
}

.performance-financial-groups-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding-top: 0;
  border-top: none;
}

.performance-financial-groups-footer .performance-financial-group-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: end;
  justify-self: end;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

.performance-financial-group-management .performance-financial-group-add-form input,
.performance-financial-group-management .performance-financial-group-add-form button {
  height: 2.35rem;
  min-height: 2.35rem;
  margin: 0;
}

.performance-financial-group-management .performance-financial-group-add-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 9.5rem;
  padding: 0.48rem 0.75rem;
  border-radius: 0.4rem;
  font-size: 0.9rem;
  line-height: 1.2;
}

.performance-financial-save-status {
  min-height: 1.1rem;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: left;
}

.performance-financial-save-status.is-saving {
  color: #486f8d;
}

.performance-financial-save-status.is-error {
  color: #a33a3a;
}

.performance-financial-group-tab:disabled,
.performance-financial-group-actions button:disabled,
.performance-financial-delete-selected:disabled {
  cursor: wait;
  opacity: 0.68;
}

.performance-financial-group-panel[hidden] {
  display: none !important;
}

.performance-financial-group-panel-header {
  display: grid;
  grid-template-columns: minmax(12rem, 22rem) auto;
  align-items: end;
  gap: 0.55rem;
}

.performance-financial-group-panel-header label {
  display: grid;
  gap: 0.25rem;
  margin: 0;
}

.performance-financial-group-panel-header label span {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.performance-financial-account-search input {
  width: min(100%, 28rem);
}

.performance-financial-account-assignment-grid {
  max-height: min(56vh, 34rem);
  overflow-y: auto;
  padding: 0.45rem;
  border: 1px solid rgba(52, 98, 127, 0.2);
  border-radius: 0.45rem;
  background: #fff;
  scrollbar-gutter: stable;
}

.performance-financial-group-row,
.performance-financial-account-assignment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8rem, 12rem) minmax(5rem, auto);
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.performance-financial-account-assignment-row {
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 14rem);
  padding: 0.42rem 0.5rem;
  border: 1px solid rgba(52, 98, 127, 0.12);
  border-radius: 0.35rem;
  background: #fbfdff;
}

.performance-financial-account-assignment-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.performance-financial-delete-check {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.performance-financial-system-label {
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.performance-financial-group-fields {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(8rem, 12rem) auto;
  align-items: end;
  gap: 0.55rem;
}

.performance-financial-group-fields label {
  margin: 0;
}

.performance-financial-group-fields span {
  align-self: center;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.performance-expense-account-modal .performance-financial-account-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  max-height: none !important;
  min-height: 0;
}

.performance-financial-group-card-add {
  background: #fff;
}

@media (max-width: 720px) {
  .performance-expense-account-modal:not([hidden]) > .performance-expense-account-modal-card {
    width: min(100%, calc(100vw - 1rem)) !important;
    max-width: min(100%, calc(100vw - 1rem)) !important;
  }

  .performance-expense-account-modal .performance-expense-account-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    max-height: min(54vh, 24rem) !important;
  }

  .performance-expense-account-modal .performance-expense-account-grid label {
    grid-template-columns: 1.25rem minmax(0, 1fr) !important;
    font-size: 0.9rem !important;
  }

  .performance-expense-account-modal .form-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
  }

  .performance-financial-group-card {
    min-height: auto;
  }

  .performance-financial-group-tabs {
    max-height: min(34vh, 18rem);
  }

  .performance-financial-groups-footer,
  .performance-financial-group-add-form {
    grid-template-columns: 1fr;
  }

  .performance-financial-groups-footer .performance-financial-group-actions {
    justify-content: stretch;
    justify-self: stretch;
  }

  .performance-financial-group-fields {
    grid-template-columns: 1fr;
  }

  .performance-financial-group-fields span {
    white-space: normal;
  }

  .performance-financial-groups-layout,
  .performance-financial-group-add-form,
  .performance-financial-group-panel-header,
  .performance-financial-group-row,
  .performance-financial-account-assignment-row {
    grid-template-columns: 1fr;
  }

  .performance-financial-account-assignment-grid {
    max-height: min(52vh, 28rem);
  }

  .performance-financial-account-assignment-row span {
    white-space: normal;
  }
}
