:root {
  --bg: #edf3fa;
  --surface: rgba(255, 255, 255, 0.94);
  --ink: #111318;
  --muted: #607187;
  --blue: #22548c;
  --blue-deep: #173c66;
  --red: #b52b2c;
  --line: rgba(17, 28, 48, 0.08);
  --shadow: 0 18px 48px rgba(22, 44, 78, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(34, 84, 140, 0.12), transparent 26%),
    radial-gradient(circle at top right, rgba(181, 43, 44, 0.1), transparent 24%),
    linear-gradient(180deg, #eef3f9 0%, #f8fbff 46%, #edf3fa 100%);
}

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

button,
input,
select {
  font: inherit;
}

.is-hidden {
  display: none !important;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  box-shadow: 0 14px 28px rgba(23, 60, 102, 0.22);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  color: var(--blue-deep);
}

.button-danger {
  color: #fff;
  background: linear-gradient(135deg, #9c1f22, #c83b3d);
  box-shadow: 0 12px 24px rgba(156, 31, 34, 0.22);
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--red);
}

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

.login-screen {
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  gap: 22px;
  min-height: calc(100vh - 50px);
  align-items: stretch;
}

.login-card,
.login-visual,
.platform-header,
.sidebar,
.panel,
.stat-card,
.timeline-card,
.task-card,
.report-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card {
  padding: 28px;
  border-radius: 34px;
  display: flex;
  flex-direction: column;
}

.login-logo {
  width: 150px;
  margin-bottom: 20px;
}

.login-card h1 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.login-copy {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.login-role-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.login-role-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(17, 28, 48, 0.08);
  background: rgba(255, 255, 255, 0.8);
}

.login-role-card strong {
  color: var(--blue-deep);
  font-size: 0.9rem;
}

.login-role-card span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.login-form label {
  display: grid;
  gap: 8px;
}

.login-form span {
  font-size: 0.92rem;
  color: var(--blue-deep);
  font-weight: 700;
}

.login-form input {
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(17, 28, 48, 0.12);
  background: rgba(255, 255, 255, 0.92);
  padding: 0 16px;
}

.demo-role-chooser {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.role-chip {
  border: 1px solid rgba(17, 28, 48, 0.08);
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
}

.role-chip.is-active {
  background: rgba(34, 84, 140, 0.12);
  color: var(--blue-deep);
  border-color: rgba(34, 84, 140, 0.18);
}

.login-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.login-error {
  margin: -4px 0 0;
  color: var(--red);
  font-size: 0.9rem;
  font-weight: 700;
}

.login-submit {
  width: 100%;
}

.install-panel {
  margin-top: auto;
  padding-top: 20px;
}

.install-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.94rem;
}

.login-visual {
  overflow: hidden;
  border-radius: 34px;
}

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

.platform-screen {
  display: grid;
  gap: 18px;
}

.platform-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 26px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-brand img {
  width: 82px;
}

.header-brand strong {
  display: block;
  color: var(--blue-deep);
}

.header-brand small {
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.session-badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(17, 28, 48, 0.1);
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue-deep);
  font-weight: 700;
}

.password-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(14, 24, 40, 0.42);
  backdrop-filter: blur(6px);
}

.password-modal-card {
  width: min(640px, 100%);
  border-radius: 30px;
  padding: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.tenant-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(14, 24, 40, 0.42);
  backdrop-filter: blur(6px);
}

.tenant-edit-modal-card {
  width: min(920px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.workspace {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
}

.sidebar {
  border-radius: 30px;
  padding: 18px;
}

.sidebar h2 {
  margin: 4px 0 16px;
  font-size: 1rem;
  color: var(--muted);
}

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

.nav-item {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.nav-item.is-active {
  background: rgba(34, 84, 140, 0.1);
  color: var(--blue-deep);
}

.nav-group {
  min-width: 0;
}

.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 18px; margin: 20px 0; }
.project-card { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: #fff; min-width: 0; overflow-wrap: anywhere; }
.project-card h2 { font-size: 1.25rem; }
.project-description { white-space: pre-wrap; }
.project-warning { padding: 12px; background: #fff4df; border-radius: 10px; color: #684300; }
.project-editor { margin: 20px 0; padding: 20px; background: #f1f6fc; border-radius: 18px; }
.project-editor textarea { width: 100%; min-width: 0; }
.project-editor input[type="checkbox"] { width: auto; min-height: auto; }
.project-application { border-top: 1px solid var(--line); padding: 14px 0; overflow-wrap: anywhere; }
.project-card summary, .project-settlements summary { cursor: pointer; padding: 12px 0; font-weight: 700; color: var(--blue-deep); }
.project-dialog { width: min(560px, calc(100% - 24px)); max-height: 85vh; overflow: auto; padding: 24px; border: 1px solid var(--line); border-radius: 20px; }
.project-dialog::backdrop { background: rgba(15,30,45,.55); }
.project-dialog dl { display:grid; grid-template-columns: 1fr auto; gap: 12px; }
.project-dialog dd { margin: 0; font-weight: 700; }
.project-home { margin-bottom: 20px; }
#project-board .page-title { flex-wrap: wrap; }
#project-board .page-title > .button { flex-shrink: 0; }

.nav-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--blue-deep);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: "+"; flex-shrink: 0; }
.nav-group[open] > summary::after { content: "-"; }
.nav-group.has-active-page > summary { background: rgba(34, 84, 140, 0.05); }
.nav-group summary:hover { background: rgba(34, 84, 140, 0.08); }
.nav-group summary:focus-visible,
.nav-submenu .nav-item:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.nav-submenu {
  display: grid;
  gap: 2px;
  margin: 4px 0 4px 16px;
  padding-left: 8px;
  border-left: 2px solid rgba(34, 84, 140, 0.12);
}
.nav-submenu .nav-item { padding: 10px 12px; border-radius: 10px; overflow-wrap: anywhere; }
.sidebar-official-group { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 8px; }
.sidebar-official-group .sidebar-resource-links { margin-top: 4px; padding-top: 0; border-top: 0; }

.sidebar-resource-links {
  display: grid;
  gap: 8px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(34, 84, 140, 0.12);
}

.sidebar-resource-links .eyebrow {
  margin: 0 0 2px;
  color: var(--red);
}

.sidebar-resource-links a {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  border: 1px solid rgba(34, 84, 140, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--blue-deep);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.sidebar-resource-links a:hover,
.sidebar-resource-links a:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(34, 84, 140, 0.4);
  background: #fff;
}

.sidebar-resource-links strong {
  font-size: 0.82rem;
}

.sidebar-resource-links span,
.sidebar-resource-links small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.sidebar-resource-links small {
  color: var(--blue);
  font-weight: 700;
}

.workspace-main {
  display: grid;
  align-content: start;
  gap: 18px;
}

.hero-panel {
  overflow: hidden;
  padding: 0;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  min-height: 360px;
}

.hero-copy {
  padding: 26px 24px;
  display: grid;
  align-content: start;
}

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

.panel {
  border-radius: 30px;
  padding: 22px;
}

.page-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.page-title h1 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1;
}

.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.stats-grid,
.task-grid,
.report-grid,
.two-column {
  display: grid;
  gap: 16px;
}

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

.stat-card {
  border-radius: 24px;
  padding: 18px;
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
  color: var(--blue-deep);
}

.dashboard-stat-group {
  margin-top: 22px;
}

.dashboard-stat-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px;
}

.dashboard-stat-heading .eyebrow,
.dashboard-stat-heading p:last-child {
  margin: 0;
}

.dashboard-stat-heading p:last-child {
  color: var(--muted);
}

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

.dashboard-stat-card {
  width: 100%;
  border: 1px solid transparent;
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.dashboard-stat-card small {
  display: block;
  margin-top: 12px;
  color: var(--blue-deep);
  font-weight: 700;
}

.dashboard-stat-card:hover,
.dashboard-stat-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: 0 14px 28px rgba(22, 61, 110, 0.12);
  outline: none;
}

.dashboard-detail-panel {
  margin-top: 22px;
}

.monthly-rent-summary-panel {
  margin-top: 22px;
  padding: 24px 26px;
  border: 1px solid #dbe6f2;
  background: linear-gradient(135deg, #f8fbff 0%, #eef5fc 100%);
}

.dashboard-rent-summary-card {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.dashboard-rent-summary-card:hover,
.dashboard-rent-summary-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(34, 84, 140, 0.58);
  box-shadow: 0 16px 30px rgba(17, 53, 96, 0.13);
  outline: none;
}

.monthly-rent-summary-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
}

.monthly-rent-summary-heading h2 {
  margin: 4px 0 6px;
  color: var(--ink);
  font-size: 1.55rem;
}

.monthly-rent-summary-heading p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.monthly-rent-completion {
  display: grid;
  grid-template-columns: repeat(2, minmax(165px, 1fr));
  min-width: 380px;
  gap: 18px;
  text-align: right;
}

.monthly-rent-completion span,
.monthly-rent-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.monthly-rent-completion-item small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.monthly-rent-completion strong {
  display: block;
  margin-top: 4px;
  color: var(--blue-deep);
  font-size: 2rem;
}

.monthly-rent-progress {
  height: 8px;
  margin: 10px 0 0;
  overflow: hidden;
  border-radius: 999px;
  background: #d8e5f1;
}

.monthly-rent-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue-deep), #3276ae);
  transition: width 220ms ease;
}

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

.monthly-rent-metrics > div {
  min-width: 0;
  padding-right: 14px;
  border-right: 1px solid #dbe6f2;
}

.monthly-rent-metrics > div:last-child {
  padding-right: 0;
  border-right: 0;
}

.monthly-rent-metrics strong {
  display: block;
  margin-top: 6px;
  color: var(--blue-deep);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  overflow-wrap: anywhere;
}

.monthly-rent-summary-action {
  display: block;
  margin-top: 16px;
  color: var(--blue-deep);
  font-size: 0.88rem;
  font-weight: 800;
}

.arrears-filter-card {
  width: 100%;
  border: 1px solid var(--line);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.arrears-filter-card:hover,
.arrears-filter-card:focus-visible,
.arrears-filter-card.is-active {
  border-color: rgba(34, 84, 140, 0.52);
  box-shadow: 0 16px 28px rgba(17, 53, 96, 0.14);
  outline: none;
  transform: translateY(-2px);
}

.arrears-filter-card.is-active span {
  color: var(--blue-deep);
  font-weight: 800;
}

.arrears-filter-note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0;
}

.arrears-filter-note .button {
  min-height: 38px;
}

.arrears-unit-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.arrears-unit-sort:hover,
.arrears-unit-sort:focus-visible {
  color: var(--red);
  outline: none;
}

.arrears-unit-sort span {
  font-size: 0.92em;
}

.table-column-filter {
  display: block;
  width: 100%;
  min-width: 88px;
  max-width: 180px;
  min-height: 30px;
  margin-top: 7px;
  border: 1px solid rgba(34, 84, 140, 0.2);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0 7px;
  color: var(--blue-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.two-column {
  grid-template-columns: 1.1fr 0.9fr;
}

.timeline-card,
.task-card,
.report-card {
  border-radius: 24px;
  padding: 18px;
}

.external-contact-card, .external-contact-form { border: 1px solid #dce5ed; border-radius: 18px; padding: 18px; margin-top: 18px; }
.external-contact-people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.external-contact-card { overflow-wrap: anywhere; }
.external-contact-card h2 { font-size: 1.15rem; }
.external-contact-card .page-title { flex-wrap: wrap; }
.external-contact-notes { white-space: pre-wrap; }
.external-contact-person { border: 1px solid #dce5ed; border-radius: 12px; margin: 16px 0; padding: 12px; min-width: 0; }
.external-contact-notes-label { display: grid; gap: 8px; margin: 16px 0; }
.external-contact-form { background: #f4f8fc; }

.report-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
  align-items: stretch;
}
.report-module-grid > div { min-width: 0; }
.report-module-grid > div:has(details[open]) { grid-column: 1 / -1; }
.report-module-grid .property-information { margin-top: 0; height: 100%; }
.report-module-grid .property-information:not([open]) summary {
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
  gap: 12px;
}
.report-module-grid .property-information:not([open]) summary h2 { font-size: 1.08rem; margin: 8px 0; }
.report-module-grid .property-information:not([open]) .eyebrow { font-size: .7rem; }
.report-module-grid .property-information:not([open]) .meta { font-size: .88rem; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .report-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .report-module-grid { grid-template-columns: minmax(0, 1fr); }
}

.property-information {
  margin-top: 24px;
  border: 1px solid #d7e4f0;
  border-radius: 24px;
  background: linear-gradient(120deg, #f5f9fd, #edf5fc);
  overflow: hidden;
}

.property-information summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  cursor: pointer;
  list-style: none;
}

.property-information summary::-webkit-details-marker { display: none; }
.report-journal-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  padding: 18px;
  min-width: 0;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}
.report-journal-link .eyebrow { display: block; font-size: .7rem; margin: 0; }
.report-journal-title { display: block; font-size: 1.08rem; font-weight: 700; margin: 8px 0; }
.report-journal-link .meta { display: block; font-size: .88rem; overflow-wrap: anywhere; }
.report-journal-link:focus-visible { outline: 3px solid #2d76a8; outline-offset: -4px; }
.property-information summary:focus-visible { outline: 3px solid #2d76a8; outline-offset: -4px; }
.property-information summary h2 { margin: 6px 0; font-size: 1.45rem; }
.property-information summary p { margin: 0; }
.property-information-action { color: #1c426a; font-weight: 700; white-space: nowrap; }
.property-information-action span { display: inline-block; margin-left: 8px; font-size: 1.3rem; }
.property-information[open] .property-information-action span { transform: rotate(45deg); }
.property-information-body { padding: 0 22px 22px; }
.property-information-group { margin-top: 20px; min-width: 0; }
.property-information-scroll { overflow-x: auto; border-radius: 14px; border: 1px solid #dce5ed; background: white; }
.property-information-table { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; }
.property-information-table th, .property-information-table td { padding: 12px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid #e8edf2; overflow-wrap: anywhere; }
.property-information-table thead { background: #eef3f7; color: #1c426a; }
.property-information-table th:first-child { width: 13%; }
.property-information-table th:last-child { width: 24%; }
.property-information-table small { display: block; margin-top: 4px; color: #60768c; font-size: .8rem; font-weight: 400; }
.property-information-table tbody tr:last-child > * { border-bottom: 0; }
.property-information-table .property-information-land-rent > * { background: #e9f6ed; }
.property-information-table .property-information-land-rent th { color: #21613b; }
.property-information-expired-date { color: #b91c1c; font-weight: 700; }
.utility-information-matrix th:first-child { width: 9%; }
.utility-information-matrix th:last-child { width: 22.75%; }
.utility-information-matrix td { line-height: 1.65; }
@media (max-width: 600px) {
  .property-information summary { padding: 16px; align-items: flex-start; flex-direction: column; }
  .property-information-body { padding: 0 12px 16px; }
}

.timeline-card h3,
.task-card h3,
.report-card h3,
.panel h3 {
  margin: 0 0 12px;
  font-size: 1.08rem;
}

.timeline-list,
.detail-list,
.mini-list {
  display: grid;
  gap: 12px;
}

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

.admin-community-form label {
  display: grid;
  gap: 8px;
}

.admin-community-form span,
.admin-checkbox span {
  font-size: 0.92rem;
  color: var(--blue-deep);
  font-weight: 700;
}

.admin-community-form input,
.admin-community-form select,
.admin-community-form textarea {
  width: 100%;
  min-height: 50px;
  border-radius: 16px;
  border: 1px solid rgba(17, 28, 48, 0.12);
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 14px;
}

.admin-community-form textarea {
  min-height: 110px;
  resize: vertical;
}

.community-file-input {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.community-file-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.community-file-trigger {
  cursor: pointer;
}

.community-file-name {
  color: var(--muted);
  font-size: 0.94rem;
}

.admin-community-form small.field-help {
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-community-form-full {
  grid-column: 1 / -1;
}

.manager-scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.manager-scope-item {
  min-height: 56px;
  border: 1px solid rgba(17, 28, 48, 0.08);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.86);
}

.community-cover-preview-wrap {
  display: grid;
  gap: 10px;
}

.community-cover-preview {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(17, 28, 48, 0.12);
  background: rgba(232, 238, 246, 0.8);
}

.structure-toolbar,
.structure-summary {
  margin-top: 18px;
}

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

.lot-section-panel,
.lot-list-panel {
  margin-top: 18px;
}

.lot-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.lot-panel-header h3 {
  margin: 0 0 6px;
}

.lot-section-form,
.lot-entry-form {
  margin-bottom: 18px;
}

.utility-registry-section {
  margin-top: 8px;
  padding: 20px;
  border: 1px solid rgba(31, 76, 124, 0.16);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(235, 244, 252, 0.9), rgba(255, 255, 255, 0.96));
}

.utility-registry-heading h3,
.utility-registry-card h4 {
  margin: 0;
}

.utility-registry-heading .field-help {
  margin: 6px 0 0;
}

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

.utility-registry-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(31, 76, 124, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
}

.utility-registry-card h4 {
  grid-column: 1 / -1;
  color: var(--navy);
}

.lot-section-cards,
.lot-group-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.lot-list-toolbar {
  display: flex;
  justify-content: flex-start;
  margin: 10px 0 16px;
}

.lot-list-toolbar label {
  width: min(320px, 100%);
}

.lot-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
}

.lot-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.lot-table th,
.lot-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(17, 28, 48, 0.08);
}

.lot-table th {
  color: var(--blue-deep);
  font-size: 0.9rem;
  font-weight: 800;
  background: rgba(34, 84, 140, 0.06);
}

.lot-table tbody tr:last-child td {
  border-bottom: 0;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.table-status-rented {
  background: rgba(34, 120, 78, 0.12);
  color: #17663f;
}

.table-status-vacant {
  background: rgba(34, 84, 140, 0.1);
  color: var(--blue-deep);
}

.table-status-owner_occupied {
  background: rgba(155, 96, 28, 0.12);
  color: #77500f;
}

.manager-sites-stack {
  display: grid;
  gap: 22px;
}

.manager-site-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.lot-group-card p + p {
  margin-top: 8px;
}

.admin-checkbox {
  display: flex !important;
  align-items: center;
  gap: 10px;
}

.admin-checkbox input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
}

.form-status {
  align-self: center;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.audit-card,
.site-card {
  border-radius: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.audit-card h3,
.site-card h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
}

.audit-card p,
.site-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.site-card .meta-line {
  display: block;
  margin-top: 10px;
  color: var(--blue-deep);
  font-size: 0.9rem;
  font-weight: 700;
}

.timeline-item,
.detail-row,
.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(17, 28, 48, 0.08);
}

.timeline-item:last-child,
.detail-row:last-child,
.mini-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.timeline-item strong,
.detail-row strong,
.mini-row strong {
  color: var(--blue-deep);
}

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

.task-card .meta,
.panel .meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.work-order-card {
  display: grid;
  gap: 14px;
}

.work-order-card h3,
.work-order-card p {
  margin: 0;
}

.work-order-card .admin-community-form {
  gap: 12px;
}

.work-order-events {
  display: grid;
  gap: 8px;
  border-top: 1px solid rgba(17, 28, 48, 0.08);
  padding-top: 12px;
}

.work-category-checklist {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}

.work-category-checklist legend {
  padding: 0 5px;
  color: var(--blue-deep);
  font-weight: 700;
}

.work-category-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 10px;
}

.work-category-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  color: var(--ink);
  font-size: 0.9rem;
}

.work-category-options input {
  width: auto;
  min-height: 0;
}

.inspection-checklist {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(232, 240, 250, 0.48);
}

.inspection-checklist h4 {
  margin: 2px 0 0;
}

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

.inspection-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(145px, 0.48fr) minmax(220px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: var(--paper);
}

.inspection-item select,
.inspection-item input {
  min-height: 40px;
  margin: 0;
}

.user-record-card {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.user-record-card:hover,
.user-record-card:focus-visible,
.user-record-card.is-selected {
  border-color: rgba(34, 84, 140, 0.48);
  box-shadow: 0 18px 34px rgba(17, 53, 96, 0.14);
  outline: none;
  transform: translateY(-2px);
}

.lease-expiry {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-top: 12px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.arrears-detail-trigger {
  border: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.arrears-detail-trigger:hover,
.arrears-detail-trigger:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(180, 35, 24, 0.18);
  outline: 2px solid rgba(180, 35, 24, 0.38);
  outline-offset: 2px;
}

.arrears-detail-section {
  margin-top: 24px;
}

.arrears-detail-section h3 {
  margin: 0 0 8px;
}

.arrears-detail-stats {
  margin-top: 4px;
}

.arrears-total,
.arrears-month-balance {
  color: #b42318;
}

.lease-card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.lease-card-info span {
  white-space: nowrap;
}

.lease-expired {
  background: #fff0f0;
  color: #b42318;
}

.lease-warning {
  background: #fff7df;
  color: #9a6700;
}

.lease-neutral {
  background: rgba(34, 84, 140, 0.08);
  color: var(--blue-deep);
}

.manager-user-detail {
  margin-top: 18px;
}

.manager-user-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 14px;
}

.manager-detail-group,
.manager-utility-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(31, 76, 124, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
}

.manager-detail-group h2,
.manager-utility-heading h2,
.manager-utility-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
}

.manager-detail-group .detail-list {
  gap: 8px;
  margin-top: 14px;
}

.manager-detail-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.manager-user-detail-list .detail-row {
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 8px;
}

.manager-user-detail-list .detail-row > span {
  min-width: 0;
  max-width: 68%;
  text-align: right;
  overflow-wrap: anywhere;
}

.manager-utility-detail {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid rgba(31, 76, 124, 0.16);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(235, 244, 252, 0.92), rgba(255, 255, 255, 0.96));
}

.manager-utility-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

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

.manager-utility-heading p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.manager-utility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 12px;
  margin-top: 16px;
}

.manager-utility-card {
  padding: 16px;
}

.manager-utility-list {
  display: grid;
  gap: 0;
  margin-top: 10px;
}

.manager-utility-list > div {
  display: grid;
  grid-template-columns: minmax(94px, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(17, 28, 48, 0.08);
}

.manager-utility-list > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.manager-utility-list span {
  color: var(--muted);
  font-size: 0.84rem;
}

.manager-utility-list strong {
  min-width: 0;
  color: var(--blue-deep);
  font-size: 0.9rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(34, 84, 140, 0.08);
  color: var(--blue-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.platform-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 0 8px 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 1080px) {
  .login-screen,
  .workspace,
  .two-column,
  .task-grid,
  .report-grid,
  .stats-grid,
  .hero-layout,
  .audit-grid,
  .site-grid,
  .lot-section-cards,
  .lot-group-grid,
  .utility-registry-grid,
  .login-role-guide,
  .admin-community-form {
    grid-template-columns: 1fr;
  }

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

  .monthly-rent-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .monthly-rent-metrics > div:nth-child(-n + 2) {
    padding-bottom: 14px;
    border-bottom: 1px solid #dbe6f2;
  }

  .monthly-rent-metrics > div:nth-child(n + 3) {
    padding-top: 14px;
  }
}

@media (max-width: 640px) {
  .utility-registry-card {
    grid-template-columns: 1fr;
  }

  .monthly-rent-summary-panel {
    padding: 20px;
  }

  .monthly-rent-summary-heading {
    display: block;
  }

  .monthly-rent-completion {
    grid-template-columns: 1fr;
    min-width: 0;
    margin-top: 16px;
    text-align: left;
  }

  .monthly-rent-metrics {
    grid-template-columns: 1fr;
  }

  .monthly-rent-metrics > div,
  .monthly-rent-metrics > div:nth-child(2) {
    padding: 0 0 14px;
    border-right: 0;
    border-bottom: 1px solid #dbe6f2;
  }

  .monthly-rent-metrics > div:nth-child(n + 3) {
    padding-top: 0;
  }

  .monthly-rent-metrics > div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }
}

.arrears-month-summary {
  margin: 28px 0 22px;
  padding: 22px;
  border: 1px solid #dbe6f2;
  border-radius: 22px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef5fc 100%);
}

.arrears-month-summary-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.arrears-month-summary-heading h2 {
  margin: 2px 0 6px;
}

.arrears-month-summary-heading label {
  display: grid;
  min-width: 190px;
  gap: 7px;
  color: #1d4570;
  font-weight: 700;
}

.arrears-month-summary-heading input {
  min-height: 44px;
}

.arrears-period-controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.arrears-period-controls label {
  min-width: 140px;
}

.arrears-period-controls [hidden] {
  display: none;
}

.amount-danger {
  color: #be2b25;
}

.fee-schedule-editor {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dbe6f2;
  border-radius: 18px;
  background: #f8fbff;
}

.field-label {
  color: #1d4570;
  font-weight: 700;
}

.fee-schedule-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e1e8f0;
  border-radius: 14px;
  background: #fff;
}

.fee-schedule-row label {
  display: grid;
  gap: 6px;
  color: #1d4570;
  font-weight: 700;
  font-size: 0.84rem;
}

.fee-schedule-row label[hidden] {
  display: none;
}

.service-bill-item-row {
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(76px, 0.8fr) repeat(3, minmax(92px, 1fr));
  grid-template-areas:
    "standard standard standard standard standard standard"
    "description description quantity labor materials surcharge"
    "tax tax tax-label tax-label tax-label tax-label"
    "tax-note tax-note tax-note tax-note tax-note tax-note"
    "remove remove . . . .";
}

.service-bill-item-standard { grid-area: standard; }
.service-bill-item-description { grid-area: description; }
.service-bill-item-quantity { grid-area: quantity; }
.service-bill-item-labor { grid-area: labor; }
.service-bill-item-materials { grid-area: materials; }
.service-bill-item-surcharge { grid-area: surcharge; }
.service-bill-item-tax { grid-area:tax; }
.service-bill-item-tax-label { grid-area:tax-label; }
.service-bill-item-tax-note { grid-area:tax-note;margin:0; }
.service-bill-item-remove { grid-area: remove; justify-self: start; }

.fee-schedule-remove {
  min-height: 44px;
}

.contract-fee-summary {
  margin: 22px 0;
  padding-top: 4px;
}

.contract-fee-summary h3 {
  margin-bottom: 4px;
}

.contract-fee-summary .stat-card small {
  margin-top: 7px;
  color: var(--muted);
}

.contract-fee-balance {
  display: grid;
  gap: 3px;
  min-width: 160px;
  padding: 5px 0;
  border-bottom: 1px solid #edf1f5;
}

.contract-fee-balance:last-child {
  border-bottom: 0;
}

.contract-fee-balance span {
  color: var(--muted);
  font-size: 0.78rem;
}

.arrears-ledger-table {
  min-width: 920px;
  font-size: 0.86rem;
}

.arrears-ledger-table th,
.arrears-ledger-table td {
  padding: 14px 12px;
  vertical-align: top;
}

.arrears-ledger-table th:nth-child(1) { width: 21%; }
.arrears-ledger-table th:nth-child(2) { width: 18%; }
.arrears-ledger-table th:nth-child(3) { width: 25%; }
.arrears-ledger-table th:nth-child(4) { width: 18%; }
.arrears-ledger-table th:nth-child(5) { width: 18%; }

.ledger-balance-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 2px 0;
  white-space: nowrap;
}

.ledger-balance-line span,
.arrears-ledger-table .meta {
  font-size: 0.78rem;
}

.tenant-payment-rate {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  color: var(--blue-deep);
  font-size: 0.76rem;
}

.tenant-payment-rate strong {
  font-size: 0.92rem;
}

.arrears-ledger-table .arrears-detail-trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 28px;
  margin-top: 5px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.ledger-total {
  display: block;
  padding-top: 3px;
  font-size: 1rem;
}

.arrears-ledger-table button.ledger-total {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  margin-top: 0;
  text-align: left;
}

.arrears-ledger-table button.ledger-total span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

.fee-payment-detail-heading {
  margin: 20px 0 8px;
  color: #1d4570;
  font-size: 1rem;
}

@media (max-width: 720px) {
  .dashboard-stat-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

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

  .app-shell {
    width: min(100% - 18px, 1360px);
    padding-top: 12px;
  }

  .login-card,
  .login-visual,
  .platform-header,
  .sidebar,
  .panel,
  .stat-card,
  .timeline-card,
  .task-card,
  .report-card {
    border-radius: 24px;
  }

  .platform-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .manager-user-detail-list .detail-row {
    display: grid;
    gap: 4px;
  }

  .manager-user-detail-list .detail-row > span {
    max-width: none;
    text-align: left;
  }

  .manager-utility-heading {
    display: grid;
  }

  .manager-utility-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .manager-utility-list strong {
    text-align: left;
  }

  .hero-copy {
    padding: 22px 18px;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions select,
  .header-actions button,
  .session-badge {
    flex: 1;
  }

  .platform-footer {
    flex-direction: column;
  }

  .tenant-edit-modal {
    padding: 10px;
  }

  .tenant-edit-modal-card {
    max-height: calc(100vh - 20px);
    border-radius: 24px;
    padding: 18px;
  }

  .arrears-month-summary-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .arrears-month-summary-heading label {
    min-width: 0;
  }

  .arrears-period-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .fee-schedule-row {
    grid-template-columns: 1fr;
  }

  .fee-schedule-row.service-bill-item-row {
    grid-template-areas:
      "standard"
      "description"
      "quantity"
      "labor"
      "materials"
      "surcharge"
      "tax"
      "tax-label"
      "tax-note"
      "remove";
  }

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

/* Compact public sign-in page, shared by desktop and mobile. */
.login-screen { display:flex; justify-content:center; align-items:center; min-height:calc(100svh - 50px); }
.login-card { width:min(100%,420px); padding:28px; border-radius:24px; }
.login-logo { width:76px; height:auto; align-self:center; margin:0 0 16px; }
.login-card h1 { font-family:inherit; font-size:24px; line-height:1.3; text-align:center; }
.login-card .login-form { margin-top:24px; }
.login-card .install-panel { margin-top:18px; padding-top:0; text-align:center; }
.login-card .install-panel summary { color:var(--muted); cursor:pointer; font-size:13px; }
.login-card .install-panel p { font-size:13px; }
@media(max-width:480px) { .login-card { padding:24px 20px; } }

.tenant-bill-list { display:flex; flex-direction:column; gap:10px; }
.tenant-bill-entry { border:1px solid var(--line);border-radius:14px;overflow:hidden; }
.tenant-bill-entry[hidden] { display:none; }
.tenant-bill-entry summary { display:grid;grid-template-columns:1.2fr 1.5fr 1fr .8fr 1.4fr;gap:12px;align-items:center;padding:16px;cursor:pointer;color:var(--blue); }
.tenant-bill-entry summary::before { content:none; }
.tenant-bill-entry summary > * { min-width:0;overflow-wrap:anywhere; }
.tenant-bill-entry[open] summary { background:#edf3fa; }
.tenant-bill-entry .task-card { border:0;box-shadow:none;border-radius:0; }
.tenant-bill-filters { display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:20px 0; }
.tenant-bill-filters label { display:flex;flex-direction:column;gap:6px; }
.tenant-bill-filters input,.tenant-bill-filters select { font:inherit;max-width:100%;padding:10px;border:1px solid var(--line);border-radius:10px;background:white; }
@media(max-width:700px){.tenant-bill-entry summary{grid-template-columns:1fr 1fr;gap:8px;font-size:14px}.tenant-bill-entry summary>:nth-child(2),.tenant-bill-entry summary>:last-child{grid-column:1/-1}.tenant-bill-filters label:first-child{width:100%}}
.platform-screen,.workspace,.workspace-main { min-width:0; }
.tenant-bill-filters label { min-width:0;max-width:100%; }
.tenant-bill-entry .task-card { min-width:0;overflow-wrap:anywhere; }
.platform-screen { grid-template-columns:minmax(0,1fr); }
.header-actions { flex-wrap:wrap;min-width:0; }

.utility-ledger-head,.utility-ledger .tenant-bill-entry summary { display:grid;grid-template-columns:1.2fr .8fr .8fr 1.7fr .9fr;gap:12px;padding:16px; }
.utility-ledger-head { background:#edf3fa;border-radius:12px;color:#173c66; }
@media(max-width:700px){.utility-ledger{overflow-x:auto}.utility-ledger-head,.utility-ledger .tenant-bill-entry{min-width:650px}.utility-ledger .tenant-bill-entry summary>:nth-child(2),.utility-ledger .tenant-bill-entry summary>:last-child{grid-column:auto}}

.service-period-fields {display:flex;flex-wrap:wrap;gap:16px;padding:16px 0;}
.service-period-fields label {display:grid;gap:6px;min-width:180px;flex:1;}
.service-period-fields p {width:100%;margin:0;}
.service-period-fields [hidden] {display:none!important;}
#service-bill-edit-modal form {display:grid;gap:16px;}

/* Finance entry forms keep actions and receipt confirmation legible. */
.admin-community-form .button-primary, .admin-community-form .button-primary span { color:#fff; }
.admin-community-form label.receipt-confirm { display:flex;align-items:center;gap:10px; }
.admin-community-form .receipt-confirm input[type="checkbox"] { width:20px;height:20px;min-height:20px;padding:0;flex:0 0 20px;accent-color:var(--blue); }
[data-new-finance][hidden] { display:none; }
#owner-utility-create { min-width:0; }
#owner-utility-create > .panel { margin-top:18px;box-shadow:none; }
/* The payment register scrolls within its own viewport; labels stay in view. */
.payment-report-panel .page-title {align-items:center;flex-wrap:wrap;gap:8px}
.payment-report-panel h2 {margin:0;font-size:1.35rem}
.payment-report-options {margin:12px 0}
.payment-report-options > summary,.payment-report-chart > summary {cursor:pointer;color:var(--blue-deep);font-weight:700;padding:8px 0}
.payment-report-actions {display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:12px 0}
.payment-report-actions select {font:inherit;padding:8px;border:1px solid var(--line);border-radius:8px}
.payment-report-actions [data-pay-scope] {font-size:12px;color:var(--muted);flex:1;min-width:160px}
.payment-report-chart svg {max-height:250px}
.payment-report-scroll {max-height:62vh;overflow:auto;border:1px solid #dce4ed;border-radius:12px;position:relative;scrollbar-gutter:stable}
.payment-report-table {min-width:1350px;width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:12px}
.payment-report-table th,.payment-report-table td {padding:9px 6px;text-align:right;white-space:nowrap}
.payment-report-table th:first-child,.payment-report-table td:first-child {width:220px;position:sticky;left:0;z-index:2;background:#fff;text-align:left}
.payment-report-table td:first-child strong,.payment-report-table td:first-child .meta {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.payment-report-table thead th {position:sticky;top:0;z-index:3;background:#eaf0f7}
.payment-report-table thead th:first-child {z-index:4;background:#eaf0f7}
.payment-report-table tfoot th {position:sticky;bottom:0;background:#edf3f8;z-index:3}
.payment-report-table tfoot th:first-child {z-index:4;background:#edf3f8}
.payment-cell {border:0;background:transparent;color:#174d7c;font:inherit;cursor:pointer;padding:4px 0;text-decoration:underline;text-underline-offset:3px}
.payment-cell:focus-visible {outline:2px solid var(--blue);outline-offset:3px}
.payment-report-expanded {position:fixed!important;inset:12px;z-index:1500;background:#fff;overflow:auto;border-radius:14px;box-shadow:0 0 0 20px rgba(20,34,53,.35)}
.payment-report-expanded .payment-report-scroll {max-height:70vh}
.payment-report-expanded .tenant-edit-modal {z-index:1600}
@media(max-width:700px){.payment-report-expanded{inset:4px}.payment-report-table th:first-child,.payment-report-table td:first-child{width:150px}.payment-report-panel{padding:14px}.payment-report-scroll{max-height:60vh}}
.payment-report-expanded {display:block!important;overflow:hidden}
.payment-report-expanded > .payment-report-panel {height:100%;display:flex;flex-direction:column;overflow:hidden}
.payment-report-expanded .payment-report-scroll {flex:1;min-height:160px;max-height:none}
.payment-report-expanded .payment-report-options[open] {max-height:30vh;overflow:auto;flex-shrink:0}
.payment-report-expanded .payment-report-chart {flex-shrink:0}
.payment-report-expanded .payment-report-chart svg {max-height:180px}

/* Keep expanded report controls compact without clipping category choices. */
.payment-report-expanded > .payment-report-panel {padding:16px 20px;gap:8px;box-sizing:border-box}
.payment-report-expanded .page-title {margin:0;flex-shrink:0;align-items:center}
.payment-report-expanded .page-title h2 {margin:0;font-size:20px}
.payment-report-expanded .button {padding:8px 14px;min-height:36px;font-size:14px}
.payment-report-expanded .payment-report-options {margin:0;flex-shrink:0}
.payment-report-expanded .payment-report-options[open] {max-height:none;overflow:visible}
.payment-report-expanded .payment-report-options > summary,
.payment-report-expanded .payment-report-chart > summary {padding:3px 0;font-size:14px}
.payment-report-expanded .payment-report-options > p {font-size:12px;line-height:1.4;margin:4px 0;color:var(--muted)}
.payment-report-expanded .tenant-bill-filters {margin:6px 0;gap:8px;align-items:end}
.payment-report-expanded .tenant-bill-filters label {font-size:13px;gap:3px}
.payment-report-expanded .tenant-bill-filters input,
.payment-report-expanded .tenant-bill-filters select {padding:6px 10px;min-height:34px;font-size:14px}
.payment-report-expanded .payment-report-options fieldset {padding:6px 10px!important;margin:0;font-size:13px}
.payment-report-expanded .payment-report-options fieldset > div {gap:6px 14px!important}
.payment-report-expanded .payment-report-actions {margin:0;flex-shrink:0}
.payment-report-expanded [data-pay-total] {margin:0;font-size:13px;flex-shrink:0}
.payment-report-expanded .payment-report-chart {margin:0}
.payment-report-expanded .payment-report-panel > .action-row {margin:0;flex-shrink:0}
@media (max-height:650px), (max-width:700px) {
 .payment-report-expanded > .payment-report-panel {overflow:auto}
 .payment-report-expanded .payment-report-scroll {flex:0 0 auto;height:45vh;min-height:200px}
}

.receipt-entry-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.receipt-entry-actions .button { white-space: nowrap; }

/* Keep billing and payment dates readable; related allocations remain contiguous. */
.payment-history-table {font-size:14px;min-width:1050px}
.payment-history-table td:first-child,.payment-history-table td:nth-child(4),
.account-statement-table td:first-child,.account-statement-table td:nth-child(4) {white-space:nowrap;font-variant-numeric:tabular-nums}
.account-statement-table {font-size:14px;min-width:780px}
.account-statement-table td:nth-child(3),.account-statement-table td:last-child {white-space:nowrap}
.account-statement-table td:nth-child(2) {width:30%}
.payment-history-table .split-head,.payment-history-table .split-continuation {background:#f5f9fc}
.payment-history-table .split-continuation td {border-top:0}

.owner-payment-history {font-size:14px;min-width:1000px}
.owner-payment-history td:nth-child(2),.owner-payment-history td:nth-child(3){white-space:nowrap;font-variant-numeric:tabular-nums}
.owner-payment-history .split-head,.owner-payment-history .split-continuation{background:#f5f9fc}
.owner-payment-history .split-continuation td{border-top:0}
.compact-work-list{display:block!important}
.compact-work{border:1px solid #dce4ed;border-radius:12px;margin:10px 0;padding:14px 18px;background:white;overflow-wrap:anywhere}
.compact-work > summary{cursor:pointer;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.compact-work > summary:before{content:'▸'}
.compact-work[open] > summary:before{content:'▾'}
.compact-work > summary h3,.compact-work > summary .meta{margin:0;font-size:15px}
.compact-work > summary .action-row{margin:0}
.compact-work[open] > summary{margin-bottom:16px}
.compact-work[hidden]{display:none}

/* Owner reports: equal, readable entry cards rather than oversized pill buttons. */
.owner-report-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:24px}
.owner-report-card {display:flex;flex-direction:column;align-items:flex-start;text-align:left;gap:14px;padding:24px;border:1px solid #dae3ed;border-radius:18px;background:#f8fafc;color:#193c63;font:inherit;cursor:pointer;min-width:0;transition:background .15s,border-color .15s,box-shadow .15s}
.owner-report-card:hover {background:#eff5fb;border-color:#9bb9d8;box-shadow:0 6px 18px #193c6310}
.owner-report-card:focus-visible,.owner-quick-links button:focus-visible {outline:3px solid #276da9;outline-offset:3px}
.owner-report-icon {display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#e7eef7;font-size:26px;line-height:1}
.owner-report-title {font-size:20px;font-weight:700;color:#182d44}
.owner-report-description {font-size:15px;line-height:1.6;color:#617389;font-weight:400}
.owner-report-action {margin-top:auto;padding-top:10px;font-size:15px;font-weight:700;display:flex;gap:10px}
.owner-overview-heading h1 {margin:6px 0 12px;font-size:clamp(26px,3vw,36px)}
.owner-quick-links {display:grid;gap:8px;margin-top:12px}
.owner-quick-links button {padding:12px 14px;border:1px solid #dce5ef;border-radius:10px;text-align:left;background:#f7faff;color:#193c63;font:inherit;font-weight:600;cursor:pointer}
@media(max-width:1000px){.owner-report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.owner-report-grid{grid-template-columns:1fr}.owner-report-card{padding:20px;gap:10px}.owner-report-description{font-size:14px}}
.rating-dimensions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.rating-dimension{display:flex!important;flex-direction:row!important;align-items:center;justify-content:space-between;gap:12px;padding:14px;background:#f6f9fc;border:1px solid #dce5ef;border-radius:12px}
.rating-dimension select{width:110px!important;flex-shrink:0}
.rating-breakdown{margin:12px 0;max-width:700px}.rating-breakdown summary{cursor:pointer;font-weight:600;color:#244b75;padding:8px 0}
@media(max-width:700px){.rating-dimensions{grid-template-columns:1fr}}
.community-rating-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:16px;margin:18px 0 28px}
.community-rating-card{padding:20px;border:1px solid #dce5ef;border-radius:16px;background:#f7fafc;min-width:0}
.community-rating-card h3{margin:0;overflow-wrap:anywhere}.community-rating-score{font-size:28px;font-weight:700;color:#214f75;margin:12px 0}.community-rating-score small{font-size:15px;font-weight:400}.community-rating-card .detail-row{gap:12px}.community-rating-card .detail-row strong{white-space:nowrap}

/* Keep service editing controls within the dialog at narrow widths. */
.service-bill-item-row { min-width:0; }
.service-bill-item-row input,.service-bill-item-row select,.service-bill-item-row textarea { width:100%;min-width:0;box-sizing:border-box; }
.service-recipients {border:1px solid #dce4ed;border-radius:12px;padding:16px;min-width:0;}
.service-recipients input[type=checkbox] {width:auto;}
@media(max-width:700px){.service-recipients label {flex-wrap:wrap;}.service-recipients input[data-recipient-amount]{max-width:100%;}}
.service-recipients [data-recipient-rows] { max-height: 260px; overflow-y: auto; padding: 4px 8px; border: 1px solid #e1e7ef; border-radius: 12px; }
.service-recipients [data-recipient-id] { width: 18px; flex: 0 0 18px; }

/* Role assignments and quote confirmation summaries */
.owner-position-grid { display: grid; gap: 1rem; margin-bottom: 1rem; }
.owner-position-grid fieldset { border: 1px solid #dce5ef; border-radius: 12px; padding: 1rem; min-width: 0; }
.owner-position-grid label { display: block; margin: .5rem 0; }
.approval-progress { margin-top: .75rem; padding: .75rem; border-left: 3px solid #244f7b; background: #f4f7fa; font-size: .875rem; }
.approval-progress small { display: block; margin-top: .5rem; color: #62748a; }
#admin-access-screen input[type="checkbox"] { width: 1rem; height: 1rem; min-height: 0; display: inline-block; margin: 0 .5rem 0 0; padding: 0; vertical-align: middle; }
#admin-access-screen select { padding: .6rem .75rem; border: 1px solid #dce5ef; border-radius: 8px; background: white; max-width: 100%; }
.access-console h1 { font: 700 1.8rem/1.3 system-ui,sans-serif; margin-bottom: .6rem; }
.access-tabs { display: flex; flex-wrap: wrap; gap: .6rem; border-bottom: 1px solid #dce5ef; padding: 1rem 0; margin-bottom: 1.5rem; }
.access-tabs .button { box-shadow: none; padding: .7rem 1.1rem; border-radius: 10px; }
.access-picker { display: flex; align-items: center; gap: 1rem; margin: 1rem 0; }
.access-picker select { min-width: 220px; }
.access-table-wrap { overflow-x: auto; margin: 1rem 0; }
.access-permissions { width: 100%; border-collapse: collapse; }
.access-permissions th,.access-permissions td { padding: .8rem; border-bottom: 1px solid #e5eaf0; }
.access-permissions thead { background: #f0f5fa; }
.access-permissions tbody th { text-align: left; font-weight: 500; }
.access-permissions td { text-align: center; }
.access-property-list details { border: 1px solid #dce5ef; border-radius: 12px; margin: .75rem 0; overflow: hidden; }
.access-property-list summary { padding: 1rem; background: #f5f8fb; cursor: pointer; }
.access-property-body { padding: 1rem; display: grid; gap: 1rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
.access-property-body fieldset,.access-entity-form fieldset { border: 1px solid #dce5ef; border-radius: 8px; padding: .8rem; min-width: 0; }
.access-property-body fieldset label,.access-entity-form fieldset label { display: block; margin: .5rem 0; }
.access-entity-form { display: grid; gap: 1rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
.access-entity-form > label { display: grid; gap: .5rem; }
.access-entity-form input:not([type="checkbox"]) { padding: .7rem; border: 1px solid #dce5ef; border-radius: 8px; width: 100%; box-sizing: border-box; }
.access-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
[data-access-error] { color: #ad2424; }
@media(max-width:650px) { .access-property-body,.access-entity-form { grid-template-columns: 1fr; } .access-picker { align-items: stretch; flex-direction: column; } .access-actions { flex-direction: column; } }

/* Receipt register: readable forms and compact responsive records. */
.rr h1{font-family:inherit;font-size:1.9rem}.rr-note{color:#60738a;max-width:65rem}.rr-error{color:#b42318;white-space:pre-wrap}.rr-warning{background:#fff4d5;padding:1rem;border-radius:12px}.rr-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.65rem;margin:1rem 0}.rr-form,.rr-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:1rem;margin:1rem 0}.rr label{display:flex;flex-direction:column;gap:.4rem;font-weight:600;color:#234b73}.rr input,.rr select,.rr textarea{min-width:0;width:100%;padding:.7rem;border:1px solid #cdd8e4;border-radius:8px;font:inherit;background:white}.rr input[type=checkbox]{width:auto}.rr .rr-review,.rr [data-relation-label]{flex-direction:row;align-items:center;font-weight:400}.rr-wide{grid-column:1/-1}.rr-table{overflow:auto}.rr table{width:100%;border-collapse:collapse;font-size:.92rem}.rr th,.rr td{text-align:left;padding:.8rem;border-bottom:1px solid #e1e8f0}.rr th{background:#eef4fa}.rr-link{background:none;border:0;color:#245685;text-decoration:underline;font:inherit;cursor:pointer}.rr-detail{display:grid;grid-template-columns:minmax(220px,1fr) minmax(250px,1fr);gap:2rem}.rr-photo img{max-width:100%;max-height:650px;object-fit:contain}.rr-preview img{max-height:220px}.rr dl{display:grid;grid-template-columns:130px 1fr;gap:.6rem}.rr dd{margin:0;overflow-wrap:anywhere}.rr dt{font-weight:600}.rr-history{padding:.8rem;border-bottom:1px solid #e1e8f0}.rr-history pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:350px;overflow:auto}.rr-upload{padding:1rem;background:#edf5fc;border-radius:12px;display:flex;flex-wrap:wrap;gap:1rem;align-items:end}.rr-upload p{flex-basis:100%;margin:0}.rr-associations fieldset{border:1px solid #d5e0ec;border-radius:8px;margin:.6rem 0;max-height:180px;overflow:auto}.rr [data-items] input{min-width:75px}.rr [data-items] td:first-child input{min-width:180px}@media(max-width:700px){.rr-detail{grid-template-columns:1fr}.rr{padding:1rem}.rr-filters{grid-template-columns:1fr 1fr}.rr dl{grid-template-columns:100px 1fr}}

.work-cost-table{overflow-x:auto;margin:16px 0}.work-cost-table table{width:100%;border-collapse:collapse;min-width:620px}.work-cost-table th,.work-cost-table td{padding:10px;text-align:left;border-bottom:1px solid #e0e8f1}.work-cost-table input{width:100%;min-width:90px;padding:8px;box-sizing:border-box}.work-cost-table th{background:#f0f5fa}

[data-cost-action]:disabled{opacity:.42;cursor:not-allowed;box-shadow:none}
.rr-upload label.button-primary{color:#fff}.rr-upload label.button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;cursor:pointer}
#receipt-registration,.rr,.rr [data-content],.rr form,.rr-table,.rr-upload,.rr-form,.rr-filters,.rr label{min-width:0;max-width:100%}
#receipt-registration{width:100%}.rr-table{display:block}.rr-upload .rr-actions{min-width:0;max-width:100%}
@media(max-width:700px){.rr-form{grid-template-columns:minmax(0,1fr)}.rr-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.rr dl{grid-template-columns:100px minmax(0,1fr)}}

#admin-dashboard-screen > .panel:first-child { padding: 18px 22px; }
#admin-dashboard-screen > .panel:first-child h1 { margin: 0; font-size: 1.6rem; }

.rr-reconcile {padding:12px 16px;margin:12px 0;border-radius:12px;background:#eef7f2;color:#17492e}.rr-reconcile.rr-warning{background:#fff1f0;color:#a52323;border:1px solid #f0b9b4}.rr-reconcile ul{margin:8px 0;padding-left:22px}.rr-reconcile p{margin:6px 0 0}.rr-table td input[name=description]{min-width:180px}.rr-table td input[name=item_code]{min-width:95px}.rr-table td select[name=kind]{min-width:125px}.rr-table td input[type=number]{min-width:100px}

.rr-summary{display:flex;flex-wrap:wrap;gap:16px 40px;background:#f0f5fb;border:1px solid #d6e2ef;border-radius:14px;padding:16px;margin:16px 0}.rr-summary>div{display:flex;flex-direction:column;gap:5px}.rr-summary strong{font-size:1.45rem;color:#234b73}.rr-summary p{flex-basis:100%;margin:0;font-size:.85rem;color:#60738a}

.rr .rr-invalid-row>td{background:#fff1f0;color:#a51d18}.rr .rr-invalid-row .rr-link{color:#a51d18;font-weight:700}.rr-list-errors{font-size:12px;margin-top:6px;max-width:300px}.rr-list-errors summary{font-weight:700;cursor:pointer}.rr-list-errors ul{padding-left:18px;white-space:normal}

.rr-item-actions{display:flex;flex-direction:column;gap:6px;min-width:90px}.rr-item-actions button{min-height:34px;cursor:pointer;white-space:nowrap}.rr-item-actions button:disabled{opacity:.45;cursor:default}@media(max-width:600px){.rr-item-actions button{min-height:44px}}
/* Compact row controls and always-visible work costs. */
.rr-item-actions{flex-direction:row;align-items:center;gap:4px;min-width:0;white-space:nowrap}
.rr-item-actions button{padding:4px 8px;min-height:32px}
[data-move-link]{padding:6px 12px;min-width:36px}
.receipt-link{border:0;background:none;color:#245c91;text-decoration:underline;cursor:pointer;padding:4px;font:inherit}
.work-receipt-dialog{width:min(900px,94vw);max-height:90vh;overflow:auto;border:1px solid #d6e1ed;border-radius:16px;padding:20px}
.work-receipt-dialog::backdrop{background:#102c4b88}
.work-receipt-dialog img{display:block;max-width:100%;height:auto;margin:16px auto}
.work-cost-table input{box-sizing:border-box;width:100%;min-width:70px}
.work-cost-table th,.work-cost-table td{overflow-wrap:normal;padding:8px}
.work-cost-table [name=description]{min-width:140px}
.workspace-main,.workspace-main>.panel,.compact-work,.compact-work>div,.task-grid{min-width:0;max-width:100%}
@media(max-width:600px){.compact-work .admin-community-form{grid-template-columns:minmax(0,1fr)}.compact-work input,.compact-work select{max-width:100%;min-width:0}.compact-work{padding:12px}.work-cost-table{max-width:100%}}

/* Item allocation forms retain room for procurement and payer labels. */
.rr-allocation { border:1px solid #d8e2ef; border-radius:12px; padding:16px; margin:16px 0; }
.rr-allocation .rr-form { grid-template-columns:repeat(3,minmax(0,1fr)); }
.rr-allocation input[type=checkbox] { width:auto; align-self:flex-start; }
.rr-allocation .rr-actions { gap:8px; }
@media(max-width:700px) { .rr-allocation .rr-form {grid-template-columns:1fr;} }

.report-period{display:flex;gap:24px;flex-wrap:wrap;border-bottom:2px solid #244b70;padding:12px 0;margin-bottom:24px}.report-period label{flex:1;min-width:180px}.report-section{margin:20px 0;padding:16px;border:1px solid #ccdbe8;border-radius:10px}.report-section>h3{background:#edf3f8;border-left:5px solid #244b70;padding:12px;margin:0 0 16px}.report-section .project-card{background:white} [data-service-bill-items][hidden],[data-edit-service-bill-items][hidden]{display:none!important}

.service-combined-total{font-weight:700;font-size:18px;padding:18px;background:#edf4fb;border-top:2px solid #234e78;margin:22px 0;line-height:1.8}

.service-scope-notes{display:flex;flex-direction:column;gap:8px;width:100%;margin:20px 0;font-weight:600}.service-scope-notes textarea{box-sizing:border-box;width:100%;min-height:140px;padding:14px 16px;border:1px solid #cbd8e6;border-radius:12px;font:inherit;line-height:1.6;resize:vertical}
.service-scope-notes[hidden]{display:none}

/* Compact recipient rows and prevent grid stretching the entity action. */
.service-recipients [data-recipient-rows] > label { min-height: 36px; margin: 2px 0 !important; padding: 2px 0; font-weight: 400; }
.service-recipients [data-recipient-rows] input[data-recipient-amount] { height: 34px; min-height: 34px; padding: 4px 8px; border-radius: 8px; }
.access-entity-form > button { align-self: end; justify-self: start; width: auto; min-height: 0; padding: 12px 24px; }

.rr-tax-options { align-self: end; padding: 8px 0; }
.rr-tax-options summary,.rr-allocation-advanced summary { cursor: pointer; color: #234e76; }
.rr-allocation-advanced { margin: 12px 0; }
.rr-allocation [hidden] { display: none !important; }

/* Bill metadata stays above recipients in create and edit forms. */
.service-bill-metadata { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:0 0 24px; }
.service-bill-metadata > label { display:flex; flex-direction:column; gap:8px; min-width:0; }
.service-bill-metadata .service-title-field { grid-column:1/-1; }
.service-bill-metadata input { box-sizing:border-box; width:100%; min-width:0; min-height:44px; padding:10px 12px; border:1px solid #ccd9e8; border-radius:10px; font:inherit; }
.service-bill-metadata .service-period-fields { grid-column:1/-1; margin:0; }
@media(max-width:600px) { .service-bill-metadata { grid-template-columns:1fr; } }

/* Saved work costs beside the collapsed manager work order heading. */
.compact-work-list .compact-work>summary{flex-wrap:wrap}
.work-list-costs{margin-left:auto;display:grid;grid-template-columns:repeat(4,minmax(92px,auto));gap:6px 14px;max-width:100%;min-width:0}
.work-list-costs>span{display:flex;flex-direction:column;gap:2px;text-align:right}
.work-list-costs small{font-size:.75rem;font-weight:400;color:#60738a}
.work-list-costs strong{font-size:.86rem;color:#234b73;white-space:nowrap}
.work-list-costs>span:last-of-type strong{font-weight:800}
.work-list-cost-note{grid-column:1/-1;text-align:right;max-width:510px;white-space:normal}
@media(max-width:700px){.work-list-costs{margin-left:0;flex-basis:100%;width:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}.work-list-costs>span{text-align:left}.work-list-cost-note{text-align:left}}
@media(min-width:701px){.compact-work-list .compact-work>summary{display:grid;grid-template-columns:14px minmax(0,1fr) minmax(360px,480px)}.compact-work-list .work-list-costs{margin:0;width:100%}}
.work-list-heading{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;min-width:0;overflow-wrap:anywhere}
@media(max-width:700px){.work-list-heading{flex:1;min-width:0}}
.water-account-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr)); gap:16px; }
.water-account-card { border:1px solid #dce5ed; border-radius:14px; padding:18px; min-width:0; background:#fff; }
.water-account-heading { display:flex; align-items:flex-start; gap:10px; justify-content:space-between; flex-wrap:wrap; }
.water-account-heading h3 { margin:0 0 6px; }
.water-account-heading p { font-size:13px; margin:0; }
.water-status { font-size:12px; font-weight:700; border-radius:8px; padding:6px 9px; background:#eef2f6; color:#475569; }
.water-status-normal { color:#166534; background:#dcfce7; }
.water-status-warning { color:#92400e; background:#fef3c7; }
.water-status-possible_leak,.water-status-data_issue { color:#b42318; background:#fee2e2; }
.water-metrics { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:18px 0; }
.water-metrics div { display:flex; flex-direction:column; gap:5px; min-width:0; }
.water-metrics span { font-size:12px; color:#475569; }
.water-metrics strong { font-size:24px; color:#173c66; overflow-wrap:anywhere; }
.water-metrics small { font-size:12px; }
.water-reason { font-size:13px; line-height:1.5; padding:10px; background:#fff8ed; border-radius:8px; }
.water-details summary { color:#075985; font-weight:600; cursor:pointer; padding:10px 0; }
.water-details svg { width:100%; height:auto; display:block; }
.water-table-wrap { max-height:300px; overflow:auto; }
.water-monitoring-panel { grid-column:1/-1; min-width:0; }
.water-monitoring-panel .page-title { margin-bottom:16px; }

.water-account-grid { align-items:start; }
.water-table-wrap .lot-table { min-width:0; width:100%; }
.water-table-wrap .lot-table td { white-space:nowrap; }

.work-filter-cost-total{display:flex;flex-direction:column;gap:5px;text-align:right;min-width:0;max-width:100%;overflow-wrap:anywhere;margin-left:auto;color:#234b73}
.work-filter-cost-total strong{font-size:1.25rem;font-weight:800}
.work-filter-cost-total small{color:#60738a}
@media(max-width:700px){.work-filter-cost-total{flex-basis:100%;text-align:left;margin-left:0;margin-top:8px}}

.saskpower-bills .page-title { gap: 16px; flex-wrap: wrap; }
.saskpower-table { min-width: 960px; }
.saskpower-table td { vertical-align: top; }
.saskpower-detail { min-width: 220px; max-width: 320px; font-size: 14px; overflow-wrap: anywhere; }
.saskpower-warning { display: inline-block; padding: 5px 8px; margin-top: 6px; border-radius: 8px; background: #fff0d8; color: #795019; font-size: 13px; }
.saskpower-bills .tenant-bill-filters input { min-width: 0; }
@media(max-width:600px) { .saskpower-bills .tenant-bill-filters { display:grid; grid-template-columns:1fr; } .saskpower-bills .tenant-bill-filters label { min-width:0; } }
.monthly-utility-table { min-width: 900px; }
.monthly-utility-table td { vertical-align: top; }
.monthly-utility-table th:nth-child(n+3):nth-child(-n+7),.monthly-utility-table td:nth-child(n+3):nth-child(-n+7) { text-align:right; white-space:nowrap; }

.issued-receipt-items {min-width:0}.issued-receipt-items table {min-width:900px}.issued-receipt-items input {width:100px}.issued-receipt-items textarea {min-width:220px;min-height:74px;width:100%}.issued-receipt-items td {vertical-align:top}.issued-receipt-items input[name=quantity] {width:70px}

.feedback-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-bottom:18px}.feedback-filters label{display:grid;gap:5px}.feedback-layout{display:grid;grid-template-columns:minmax(230px,1fr) minmax(0,2fr);gap:24px;align-items:start}.feedback-thread{display:grid;gap:6px;text-align:left;width:100%;padding:16px;margin-bottom:8px;border:1px solid #d7e2ef;border-radius:14px;background:#fff;color:#18334d;overflow-wrap:anywhere;cursor:pointer}.feedback-thread.is-selected{border:2px solid #1e527f;background:#eef5fc}.feedback-preview{overflow-wrap:anywhere;font-size:14px}.feedback-badge{display:inline-block;background:#b32929;color:white;border-radius:14px;padding:2px 8px;font-size:12px;width:max-content}.feedback-conversation{min-width:0;overflow-wrap:anywhere}.feedback-messages{max-height:520px;overflow-y:auto;padding:10px 4px;display:flex;flex-direction:column;gap:12px}.feedback-message{max-width:94%;background:#edf1f6;border-radius:14px;padding:12px 16px;align-self:flex-start}.feedback-message.is-own{background:#e5f0fb;align-self:flex-end}.feedback-message p{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0 0}.feedback-conversation textarea{width:100%;box-sizing:border-box}.feedback-conversation [data-reply]{display:grid;gap:10px;margin-top:18px}.feedback-conversation [data-reply] label{display:grid;gap:6px}.feedback-conversation .page-title{margin-bottom:14px}[data-feedback-unread]{margin-left:6px}.tenant-edit-modal-card form:has([name="message"]){display:grid;gap:16px}.tenant-edit-modal-card form:has([name="message"]) label{display:grid;gap:6px}@media(max-width:760px){.feedback-layout{grid-template-columns:1fr}.feedback-messages{max-height:440px}.feedback-filters label{flex:1;min-width:130px}.feedback-message{max-width:100%}.feedback-conversation .action-row{flex-wrap:wrap}}
.feedback-badge[hidden],.feedback-conversation [hidden]{display:none!important}.feedback-root .page-title>.button{flex-shrink:0;white-space:nowrap}.feedback-filters input,.feedback-filters select,.feedback-conversation [data-status-form] select{padding:10px 12px;border:1px solid #d7e2ef;border-radius:10px;background:#fff;color:#18334d;max-width:100%;box-sizing:border-box}

.payment-report-month-table th:not(:first-child) {white-space:normal;overflow-wrap:anywhere}

.payment-report-options [hidden] {display:none!important}

.arrears-column-controls{border:1px solid #dce4ed;border-radius:12px;padding:16px;margin:18px 0;min-width:0}.arrears-column-controls legend{font-weight:700;color:var(--blue-deep)}.arrears-column-options{display:flex;flex-wrap:wrap;gap:14px 20px}.arrears-column-options label{display:flex;align-items:center;gap:6px}.arrears-column-controls .action-row{margin-top:14px}.arrears-ledger-table th{white-space:normal;min-width:95px}.arrears-ledger-table th:first-child{min-width:180px}

.arrears-ledger-table tfoot th,
.arrears-ledger-table tfoot td {
  background: #edf3f8;
  border-top: 2px solid #b9cde0;
  font-weight: 700;
  color: var(--blue-deep);
}
.arrears-ledger-table tfoot td.amount-danger { color: #be2b25; }
