:root {
  --ink: #18231f;
  --muted: #66736e;
  --line: #dce3df;
  --line-strong: #c8d2cd;
  --paper: #ffffff;
  --canvas: #f3f6f4;
  --forest-950: #10231d;
  --forest-900: #17362d;
  --forest-800: #20513f;
  --forest-700: #276a50;
  --forest-100: #e3f0ea;
  --amber-700: #9b5b0f;
  --amber-500: #e2a13e;
  --amber-100: #fbefd8;
  --blue-700: #35647b;
  --blue-100: #e1eef3;
  --red-700: #a23f4d;
  --red-100: #f8e5e8;
  --shadow: 0 10px 30px rgba(24, 35, 31, 0.07);
  --sidebar-width: 252px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

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

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-size: 15px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

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

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

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

button {
  border: 0;
}

svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 1.8;
}

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

h1 {
  margin-bottom: 5px;
  font-size: 34px;
  line-height: 1.15;
  font-weight: 720;
}

h2 {
  margin-bottom: 4px;
  font-size: 20px;
  line-height: 1.25;
}

h3 {
  margin-bottom: 4px;
  font-size: 16px;
}

p {
  color: var(--muted);
}

.manager-shell {
  display: flex;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  padding: 24px 16px 16px;
  color: #edf5f1;
  background: var(--forest-950);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 0 8px;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 6px;
  color: var(--forest-950);
  background: var(--amber-500);
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 700;
}

.brand > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.brand strong {
  font-size: 17px;
  line-height: 1.1;
}

.brand small {
  color: #9bb2aa;
  font-size: 12px;
}

.brand.dark {
  color: var(--forest-950);
}

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

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 46px;
}

.side-nav a {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-radius: 6px;
  color: #a9bbb5;
  font-size: 14px;
  font-weight: 590;
  transition: 160ms ease;
}

.side-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.055);
}

.side-nav a.active {
  color: #ffffff;
  background: var(--forest-800);
}

.side-nav a.active svg {
  color: var(--amber-500);
}

.sidebar-rule {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: auto 4px 18px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 6px;
  color: #d6e2dd;
}

.sidebar-rule span {
  color: var(--amber-500);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.sidebar-rule strong {
  font-size: 13px;
}

.sidebar-rule small {
  color: #829991;
  font-size: 11px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 5px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-user-copy,
.resident-profile-link {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.sidebar-profile-link {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 9px;
  padding: 5px;
  border-radius: 6px;
  color: inherit;
  text-decoration: none;
  transition: background 160ms ease;
}

.sidebar-profile-link:hover {
  background: rgba(255, 255, 255, 0.055);
}

.sidebar-profile-link:focus-visible,
.resident-profile-link:focus-visible,
.mobile-profile-link:focus-visible {
  outline: 3px solid rgba(226, 161, 62, 0.28);
  outline-offset: 2px;
}

.mobile-profile-link {
  color: var(--forest-900);
  text-decoration: none;
}

.resident-profile-link {
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
}

.resident-profile-link:hover strong {
  color: var(--forest-700);
}

.sidebar-user-copy strong,
.resident-account strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy small,
.resident-account small {
  color: #8da199;
  font-size: 11px;
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  color: var(--forest-900);
  background: var(--forest-100);
  font-size: 13px;
  font-weight: 750;
}

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

.avatar-photo-button {
  padding: 0;
  border: 0;
  font: inherit;
  cursor: zoom-in;
}

.avatar-photo-button:focus-visible,
.person-name-link:focus-visible {
  outline: 3px solid rgb(35 116 85 / 24%);
  outline-offset: 3px;
}

.avatar.small {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}

.avatar.muted {
  color: #6b7974;
  background: #edf1ef;
}

.app-frame {
  display: flex;
  width: calc(100% - var(--sidebar-width));
  min-height: 100vh;
  min-width: 0;
  flex-direction: column;
  margin-left: var(--sidebar-width);
}

.mobile-header {
  display: none;
}

.page-content {
  width: min(100%, 1500px);
  min-height: 0;
  flex: 1;
  margin: 0 auto;
  padding: 38px 42px 70px;
}

.site-footer {
  padding: 18px 24px 24px;
  color: #7b8984;
  font-size: 11px;
  text-align: center;
}

.site-footer a {
  color: var(--forest-700);
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-header p {
  margin-bottom: 0;
  font-size: 15px;
}

.compact-page-header {
  align-items: center;
  margin-bottom: 22px;
}

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--forest-700);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb a:hover {
  color: var(--forest-700);
}

.breadcrumb svg {
  width: 14px;
  height: 14px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 690;
  transition: 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #ffffff;
  background: var(--forest-700);
}

.button.primary:hover {
  background: var(--forest-800);
}

.button.issue {
  color: #ffffff;
  background: #176b91;
}

.button.issue:hover {
  background: #125774;
}

.button.danger {
  color: #ffffff;
  background: var(--red-700);
}

.button.danger-outline {
  border-color: #dca8b0;
  color: var(--red-700);
  background: #ffffff;
}

.button.danger-outline:hover {
  background: var(--red-100);
}

.button.secondary {
  border-color: var(--line-strong);
  color: var(--forest-800);
  background: #ffffff;
}

.button.secondary:hover {
  border-color: #9eb5ab;
  background: #f9fbfa;
}

.button.ghost {
  color: var(--muted);
  background: transparent;
}

.button.light {
  color: var(--forest-950);
  background: #ffffff;
}

.button.outline-light {
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
  background: transparent;
}

.button.full {
  width: 100%;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.icon-button:hover {
  color: var(--forest-800);
  background: var(--forest-100);
}

.icon-button.inverse {
  color: #8da199;
}

.icon-button.inverse:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.icon-button.danger:hover {
  color: var(--red-700);
  background: var(--red-100);
}

.surface {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-header h2,
.section-header h3 {
  margin: 0;
}

.section-header .eyebrow {
  margin-bottom: 4px;
}

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

.metric {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.metric-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 6px;
}

.metric-icon.green {
  color: var(--forest-700);
  background: var(--forest-100);
}

.metric-icon.amber {
  color: var(--amber-700);
  background: var(--amber-100);
}

.metric-icon.blue {
  color: var(--blue-700);
  background: var(--blue-100);
}

.metric-icon.red {
  color: var(--red-700);
  background: var(--red-100);
}

.metric > div:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.metric strong {
  overflow: hidden;
  font-size: 22px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric small {
  color: #8a9691;
  font-size: 10px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
  gap: 20px;
  margin-bottom: 20px;
}

.current-closing,
.attention-panel {
  padding: 25px;
}

.closing-amount {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
  padding: 18px 20px;
  border-left: 3px solid var(--amber-500);
  background: #f7f9f8;
}

.closing-amount span {
  color: var(--muted);
  font-size: 11px;
}

.closing-amount strong {
  font-size: 28px;
}

.closing-amount small {
  color: var(--muted);
}

.progress-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.progress-steps li {
  position: relative;
  display: flex;
  min-width: 0;
  gap: 8px;
}

.progress-steps li > span {
  z-index: 2;
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: #96a19d;
  background: #ffffff;
}

.progress-steps li > span svg {
  width: 14px;
  height: 14px;
}

.progress-steps li.done > span {
  border-color: var(--forest-700);
  color: #ffffff;
  background: var(--forest-700);
}

.progress-steps li.current > span {
  border-color: var(--amber-500);
  color: var(--amber-700);
  background: var(--amber-100);
}

.progress-steps li > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.progress-steps strong {
  font-size: 12px;
}

.progress-steps small {
  color: var(--muted);
  font-size: 10px;
}

.attention-list {
  display: flex;
  flex-direction: column;
}

.attention-list a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.attention-list a:first-child {
  border-top: 0;
}

.attention-list a > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.attention-list strong {
  font-size: 13px;
}

.attention-list small {
  color: var(--muted);
  font-size: 11px;
}

.attention-list a > svg {
  width: 16px;
  color: #9ba7a2;
}

.attention-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
}

.attention-icon.danger {
  color: var(--red-700);
  background: var(--red-100);
}

.attention-icon.warning {
  color: var(--amber-700);
  background: var(--amber-100);
}

.attention-icon.success {
  color: var(--forest-700);
  background: var(--forest-100);
}

.attention-icon.info {
  color: var(--blue-700);
  background: var(--blue-100);
}

.table-section {
  overflow: hidden;
  padding: 24px 24px 8px;
}

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

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

th {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 730;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 14px 12px;
  border-bottom: 1px solid #edf0ee;
  color: #47534f;
  font-size: 13px;
  white-space: nowrap;
}

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

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--forest-700);
  font-size: 12px;
  font-weight: 700;
}

.text-link svg {
  width: 15px;
}

.status-pill {
  display: inline-flex;
  min-height: 24px;
  width: max-content;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 720;
  white-space: nowrap;
}

.status-pill.success {
  color: var(--forest-700);
  background: var(--forest-100);
}

.status-pill.warning {
  color: var(--amber-700);
  background: var(--amber-100);
}

.status-pill.danger {
  color: var(--red-700);
  background: var(--red-100);
}

.status-pill.info {
  color: var(--blue-700);
  background: var(--blue-100);
}

.status-pill.neutral {
  color: #56635e;
  background: #e9eeeb;
}

.row-actions {
  display: flex;
  align-items: center;
}

.row-actions form {
  display: contents;
}

.expense-row:has(.row-actions) {
  grid-template-columns: minmax(0, 1fr) 120px 76px;
}

.action-modal {
  width: min(calc(100% - 28px), 500px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
}

.action-modal::backdrop {
  background: rgba(12, 25, 21, 0.64);
  backdrop-filter: blur(3px);
}

.email-status-modal .modal-panel {
  max-width: 390px;
  text-align: center;
}

.email-status-content .modal-actions {
  justify-content: center;
  margin-top: 22px;
}

.email-status-modal .loading svg {
  animation: email-spin 850ms linear infinite;
}

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

.modal-panel {
  position: relative;
  padding: 30px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(8, 20, 16, 0.3);
}

.modal-panel h2 {
  margin-top: 17px;
  font-size: 22px;
}

.modal-panel p {
  margin-bottom: 18px;
  line-height: 1.65;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--canvas);
}

.modal-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 7px;
}

.modal-icon.issue {
  color: #176b91;
  background: var(--blue-100);
}

.modal-icon.danger {
  color: var(--red-700);
  background: var(--red-100);
}

.modal-icon.success {
  color: var(--forest-700);
  background: var(--forest-100);
}

.system-subscription-table {
  margin-bottom: 22px;
}

.system-subscription-table .button.compact {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 11px;
}

.system-pix-modal {
  width: min(calc(100% - 28px), 570px);
}

.system-pix-code {
  display: grid;
  justify-items: center;
  gap: 5px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9f8;
}

.system-pix-code img {
  width: 230px;
  height: 230px;
  padding: 7px;
  border: 1px solid var(--line);
  background: #fff;
}

.system-pix-code strong {
  font-size: 24px;
}

.system-pix-code small {
  color: var(--muted);
}

.system-pix-modal .copy-field textarea {
  min-height: 88px;
  resize: none;
  font-size: 11px;
}

.contract-editor {
  margin-top: 22px;
}

.contract-editor > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  list-style: none;
}

.contract-editor > summary::-webkit-details-marker {
  display: none;
}

.contract-editor > summary > span {
  display: grid;
  gap: 3px;
}

.contract-editor > summary strong {
  color: var(--ink);
  font-size: 20px;
}

.contract-editor > summary small {
  color: var(--muted);
  font-size: 12px;
}

.contract-editor > summary > svg {
  flex: 0 0 auto;
  color: var(--forest-700);
  transition: transform 180ms ease;
}

.contract-editor[open] > summary > svg {
  transform: rotate(180deg);
}

.contract-editor-body {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.contract-editor-body .form-alert {
  margin-bottom: 20px;
}

.contract-history {
  margin-top: 2px;
}

@media (max-width: 560px) {
  .system-pix-modal .modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .system-pix-modal .modal-actions .button {
    width: 100%;
  }

  .system-pix-code img {
    width: 190px;
    height: 190px;
  }
}

.modal-warning {
  display: flex;
  gap: 9px;
  padding: 12px;
  border: 1px solid #efd39e;
  border-radius: 6px;
  color: var(--amber-700);
  background: var(--amber-100);
  font-size: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

.field-block {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  color: #34423d;
  font-size: 12px;
  font-weight: 690;
}

.field-block > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.field-block.field-muted {
  opacity: 0.5;
}

.form-card {
  padding: 28px;
}

.bank-settings fieldset {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.settings-section {
  padding: 24px;
}

.settings-section > .section-header > svg {
  color: var(--forest-700);
}

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

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

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

.settings-section .switch-row {
  margin-top: 20px;
}

.configured-secret,
.processing-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--forest-700);
  font-size: 12px;
}

.environment-credential {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.environment-credential[hidden],
.endpoint-catalog[hidden] {
  display: none;
}

.credential-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.credential-heading h3 {
  margin: 2px 0 0;
  font-size: 17px;
}

.credential-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.credential-note svg {
  flex: 0 0 auto;
  width: 15px;
}

.endpoint-catalog {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.endpoint-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.35fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface);
}

.endpoint-row span {
  font-size: 12px;
  font-weight: 700;
}

.endpoint-row code {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
}

.advanced-settings {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.advanced-settings summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 690;
  list-style: none;
}

.advanced-settings summary > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.advanced-settings summary::-webkit-details-marker {
  display: none;
}

.webhook-panel {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  align-items: center;
  gap: 22px;
  margin-top: 24px;
  padding: 24px;
}

.webhook-panel p {
  margin: 0;
}

.webhook-panel code {
  overflow-wrap: anywhere;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--blue-700);
  background: #f7faf8;
}

.bank-jobs-section {
  margin-top: 18px;
}

.bank-payment-panel {
  padding: 21px;
}

.bank-data-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.bank-data-list > div {
  display: flex;
  flex-direction: column;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.bank-data-list span,
.copy-field > span:first-child {
  color: var(--muted);
  font-size: 10px;
}

.copy-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 12px;
}

.copy-field > span:last-child {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #ffffff;
}

.copy-field input,
.copy-field textarea {
  width: 100%;
  min-width: 0;
  padding: 9px;
  border: 0;
  outline: 0;
  resize: none;
  color: var(--ink);
  background: transparent;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
}

.manager-charge-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 21px;
}

.manager-charge-actions .section-header {
  margin-bottom: 4px;
}

.overdue-copy {
  display: block;
  margin-top: 4px;
  color: var(--red-700);
  font-size: 10px;
}

@media (max-width: 900px) {
  .form-grid.three,
  .form-grid.two,
  .settings-columns,
  .webhook-panel,
  .endpoint-row {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}

.status-pill.large {
  min-height: 32px;
  padding: 6px 12px;
  font-size: 11px;
}

.status-pill.large svg {
  width: 15px;
}

.empty-state {
  display: flex;
  min-height: 300px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 32px;
  text-align: center;
}

.empty-state.compact {
  min-height: 190px;
  padding: 24px 10px;
}

.empty-state p {
  max-width: 440px;
}

.empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 13px;
  place-items: center;
  border-radius: 8px;
  color: var(--forest-700);
  background: var(--forest-100);
}

.empty-row {
  padding: 26px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.toast-stack {
  position: fixed;
  z-index: 70;
  top: 22px;
  right: 25px;
  display: flex;
  width: min(420px, calc(100vw - 30px));
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 15px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue-700);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(16, 35, 29, 0.18);
  font-size: 13px;
}

.toast.success {
  border-left-color: var(--forest-700);
}

.toast.error {
  border-left-color: var(--red-700);
}

.toast > span {
  flex: 1;
}

.toast-close {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}

.toast.hidden {
  display: none;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(230px, 320px);
  gap: 22px;
  align-items: start;
}

.form-surface {
  padding: 28px;
}

.profile-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.profile-form .section-header {
  margin-bottom: 24px;
}

.section-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 6px;
  color: var(--forest-700);
  background: var(--forest-100);
}

.password-help ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.password-help li + li {
  margin-top: 3px;
}

.data-panel {
  padding: 24px;
}

.table-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.table-primary-link {
  display: inline-flex;
  flex-direction: column;
  border-radius: 4px;
  color: var(--ink);
}

.table-primary-link:hover strong {
  color: var(--forest-700);
}

.table-primary-link:focus-visible {
  outline: 3px solid rgb(35 116 85 / 24%);
  outline-offset: 3px;
}

.table-action {
  width: 52px;
  text-align: right;
}

.compact-notice {
  margin-top: 22px;
}

.form-grid {
  display: grid;
  gap: 18px;
}

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

.full-span {
  grid-column: 1 / -1;
}

.field {
  min-width: 0;
  margin-bottom: 18px;
}

.form-grid .field {
  margin-bottom: 0;
}

.field > label:not(.switch-row),
.unit-selector label {
  display: block;
  margin-bottom: 6px;
  color: #34423d;
  font-size: 12px;
  font-weight: 690;
}

.field-control,
.search-field input,
.unit-selector select {
  width: 100%;
  height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  outline: none;
  color: var(--ink);
  background: #ffffff;
  transition: 150ms ease;
}

textarea.field-control {
  height: auto;
  min-height: 82px;
  padding-top: 10px;
  resize: vertical;
}

.field-control:focus,
.search-field:focus-within,
.unit-selector select:focus {
  border-color: var(--forest-700);
  box-shadow: 0 0 0 3px rgba(39, 106, 80, 0.11);
}

.field-help,
.field-error {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.field-error {
  color: var(--red-700);
}

.field-error.centered {
  text-align: center;
}

.field.hidden {
  display: none;
}

input[type="file"].field-control {
  padding: 6px;
}

input[type="file"].field-control::file-selector-button {
  min-height: 30px;
  margin-right: 10px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  color: var(--forest-800);
  background: var(--forest-100);
  font: inherit;
  font-weight: 680;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.form-aside {
  padding: 8px 4px;
}

.form-aside > svg {
  width: 27px;
  height: 27px;
  margin-bottom: 13px;
  color: var(--amber-700);
}

.form-aside h2 {
  font-size: 16px;
}

.form-aside p {
  font-size: 12px;
  line-height: 1.7;
}

.form-alert {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 17px;
  padding: 11px 13px;
  border: 1px solid #ecc0c7;
  border-radius: 5px;
  color: var(--red-700);
  background: var(--red-100);
  font-size: 12px;
}

.form-alert.wide {
  margin: 20px 0;
}

.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-ui {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 38px;
  border-radius: 20px;
  background: #c8d1cd;
  transition: 150ms ease;
}

.switch-ui::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  content: "";
  transition: 150ms ease;
}

.switch-input:checked + .switch-ui {
  background: var(--forest-700);
}

.switch-input:checked + .switch-ui::after {
  transform: translateX(16px);
}

.switch-row > span:last-child {
  display: flex;
  flex-direction: column;
}

.switch-row strong {
  font-size: 12px;
}

.switch-row small {
  color: var(--muted);
  font-size: 10px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.search-field {
  display: flex;
  width: min(100%, 420px);
  height: 42px;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
}

.search-field > svg {
  width: 17px;
  color: var(--muted);
}

.search-field input {
  height: 40px;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.toolbar-count {
  color: var(--muted);
  font-size: 12px;
}

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

.unit-card {
  position: relative;
  display: flex;
  min-height: 190px;
  flex-direction: column;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  transition: 160ms ease;
}

.unit-card:hover {
  border-color: #a9bcb3;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.unit-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.unit-number {
  display: grid;
  min-width: 48px;
  height: 36px;
  padding: 0 10px;
  place-items: center;
  border-radius: 5px;
  color: var(--forest-900);
  background: var(--forest-100);
  font-size: 16px;
  font-weight: 760;
}

.unit-number.large {
  width: 64px;
  height: 64px;
  font-size: 21px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b8c2bd;
}

.status-dot.active {
  background: #43a478;
  box-shadow: 0 0 0 4px #e4f4ec;
}

.unit-card-copy {
  display: flex;
  flex-direction: column;
  margin: 22px 0 auto;
}

.unit-card-copy strong {
  font-size: 14px;
}

.unit-card-copy span {
  color: var(--muted);
  font-size: 11px;
}

.unit-card-meta {
  display: flex;
  gap: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.unit-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}

.unit-card-meta svg {
  width: 14px;
}

.unit-card-arrow {
  position: absolute;
  top: 18px;
  right: 18px;
  display: none;
}

.unit-card:hover .unit-card-arrow {
  display: block;
}

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

.unit-detail-header {
  align-items: center;
}

.unit-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.unit-title h1 {
  font-size: 28px;
}

.unit-title p {
  margin: 0;
}

.unit-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
  border-block: 1px solid var(--line);
}

.unit-facts div {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  border-left: 1px solid var(--line);
}

.unit-facts div:first-child {
  border-left: 0;
}

.unit-facts span {
  color: var(--muted);
  font-size: 10px;
}

.unit-facts strong {
  font-size: 16px;
}

.detail-grid,
.closing-detail-grid,
.charge-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.people-section,
.expenses-panel,
.breakdown {
  padding: 25px;
}

.family-list {
  display: flex;
  flex-direction: column;
}

.family-group {
  border-top: 1px solid var(--line);
}

.family-group:first-child {
  border-top: 0;
}

.person-row {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(180px, 1.1fr) minmax(140px, 0.8fr) 78px;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 11px 0;
}

.person-row.dependent {
  grid-template-columns: 24px 38px minmax(180px, 1.1fr) minmax(140px, 0.8fr) 78px;
  padding-left: 12px;
}

.family-line {
  position: relative;
  width: 24px;
  height: 100%;
  border-left: 1px solid var(--line-strong);
}

.family-line::after {
  position: absolute;
  top: 50%;
  left: 0;
  width: 18px;
  border-top: 1px solid var(--line-strong);
  content: "";
}

.person-copy,
.person-contact {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.person-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.person-actions form {
  margin: 0;
}

.photo-editor-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.avatar.photo-preview {
  width: 112px;
  height: 112px;
  flex-basis: 112px;
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px var(--line-strong), 0 12px 28px rgb(21 48 38 / 12%);
  font-size: 34px;
}

.photo-modal {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 38px;
  border: 0;
  background: rgb(8 19 15 / 96%);
  overflow: hidden;
}

.photo-modal[open] {
  display: grid;
  place-items: center;
}

.photo-modal::backdrop {
  background: rgb(8 19 15 / 76%);
  backdrop-filter: blur(4px);
}

.photo-modal > img {
  display: block;
  max-width: calc(100vw - 76px);
  max-height: calc(100vh - 76px);
  border-radius: 4px;
  box-shadow: 0 24px 70px rgb(0 0 0 / 42%);
  object-fit: contain;
}

.photo-modal-close {
  position: fixed;
  z-index: 2;
  top: 18px;
  right: 18px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 28%);
  border-radius: 50%;
  color: #fff;
  background: rgb(8 19 15 / 72%);
  cursor: pointer;
}

.photo-modal-close:hover {
  background: rgb(255 255 255 / 16%);
}

.photo-modal-close svg {
  width: 22px;
  height: 22px;
}

.photo-modal-open {
  overflow: hidden;
}

input[type="file"].field-control {
  height: auto;
  min-height: 44px;
  padding: 6px;
}

input[type="file"].field-control::file-selector-button {
  margin-right: 10px;
  padding: 8px 11px;
  border: 0;
  border-radius: 5px;
  color: var(--forest-900);
  background: var(--forest-100);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.person-copy > strong,
.person-name-link {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-name-link:hover {
  color: var(--forest-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.person-copy > span,
.person-contact span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.person-tags span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--forest-700);
  font-size: 9px;
  font-weight: 680;
}

.person-tags svg {
  width: 11px;
  height: 11px;
}

.person-tags .muted-tag {
  color: #8c9793;
}

.side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-stack > .surface {
  padding: 21px;
}

.mini-list {
  display: flex;
  flex-direction: column;
}

.mini-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.mini-list a:first-child {
  border-top: 0;
}

.mini-list a > span {
  display: flex;
  flex-direction: column;
}

.mini-list a > span:last-child {
  text-align: right;
}

.mini-list strong {
  font-size: 12px;
}

.mini-list small {
  color: var(--muted);
  font-size: 10px;
}

.status-text.success {
  color: var(--forest-700);
}

.status-text.warning {
  color: var(--amber-700);
}

.status-text.danger {
  color: var(--red-700);
}

.history-details {
  padding: 0 !important;
}

.history-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 19px;
  cursor: pointer;
  list-style: none;
}

.history-details summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 680;
}

.history-list {
  padding: 0 19px 14px;
}

.history-list > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.history-list span {
  display: flex;
  flex-direction: column;
}

.history-list strong {
  font-size: 11px;
}

.history-list small {
  color: var(--muted);
  font-size: 9px;
}

.closing-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.closing-row {
  display: grid;
  grid-template-columns: 58px minmax(210px, 1fr) 90px 140px 145px 20px;
  align-items: center;
  gap: 16px;
  min-height: 84px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  transition: 150ms ease;
}

.closing-row:hover {
  border-color: #a7b8b1;
  box-shadow: var(--shadow);
}

.closing-month,
.history-month {
  display: flex;
  width: 48px;
  height: 52px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 6px;
  color: var(--forest-900);
  background: var(--forest-100);
  text-transform: uppercase;
}

.closing-month strong,
.history-month strong {
  font-size: 13px;
}

.closing-month small,
.history-month small {
  font-size: 9px;
}

.closing-row-main,
.closing-row-stat {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.closing-row-main strong {
  font-size: 14px;
}

.closing-row-main small,
.closing-row-stat small {
  color: var(--muted);
  font-size: 10px;
}

.closing-row-stat strong {
  font-size: 14px;
}

.closing-row > svg {
  width: 16px;
  color: #9ba6a2;
}

.closing-summary-band,
.charge-hero-band {
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  margin-bottom: 18px;
  border-block: 1px solid var(--line);
}

.closing-summary-band > div,
.charge-hero-band > div {
  display: flex;
  min-height: 74px;
  justify-content: center;
  flex-direction: column;
  padding: 12px 20px;
  border-left: 1px solid var(--line);
}

.closing-summary-band > div:first-child,
.charge-hero-band > div:first-child {
  border-left: 0;
}

.closing-summary-band span,
.charge-hero-band span {
  color: var(--muted);
  font-size: 10px;
}

.closing-summary-band strong,
.charge-hero-band strong {
  font-size: 20px;
}

.text-danger {
  color: var(--red-700);
}

.closing-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.expense-groups {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.expense-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.expense-group-title {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  background: #f7f9f8;
}

.expense-group-title > div {
  display: flex;
  flex-direction: column;
}

.expense-group-title strong {
  font-size: 12px;
}

.expense-group-title small {
  color: var(--muted);
  font-size: 9px;
}

.expense-kind-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 6px;
}

.expense-kind-icon.fixed {
  color: var(--blue-700);
  background: var(--blue-100);
}

.expense-kind-icon.rate {
  color: var(--forest-700);
  background: var(--forest-100);
}

.expense-kind-icon.individual {
  color: var(--amber-700);
  background: var(--amber-100);
}

.expense-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 36px;
  align-items: center;
  gap: 12px;
  min-height: 59px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
}

.expense-row > span {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.expense-row strong {
  font-size: 12px;
}

.expense-row small {
  color: var(--muted);
  font-size: 10px;
}

.expense-row > strong {
  text-align: right;
}

.expense-empty {
  padding: 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.closing-check {
  padding: 21px;
}

.check-list {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.check-list > div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.check-list > div:first-child {
  border-top: 0;
}

.check-list > div > svg {
  width: 18px;
  color: #9ca7a3;
}

.check-list > div.done > svg {
  color: var(--forest-700);
}

.check-list > div.error > svg {
  color: var(--red-700);
}

.check-list span {
  display: flex;
  flex-direction: column;
}

.check-list strong {
  font-size: 11px;
}

.check-list small {
  color: var(--muted);
  font-size: 9px;
}

.rule-note {
  display: flex;
  gap: 11px;
  padding: 17px;
  border: 1px solid #d8c8a7;
  border-radius: 6px;
  background: #fff9ec;
}

.rule-note > svg {
  color: var(--amber-700);
}

.rule-note strong {
  font-size: 11px;
}

.rule-note p {
  margin: 4px 0 0;
  font-size: 10px;
  line-height: 1.55;
}

.preview-section {
  margin-top: 20px;
}

.section-note {
  color: var(--muted);
  font-size: 11px;
}

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

.choice-card {
  position: relative;
  display: flex;
  min-height: 108px;
  cursor: pointer;
  flex-direction: column;
  padding: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  transition: 150ms ease;
}

.choice-card input {
  position: absolute;
  opacity: 0;
}

.choice-card:has(input:checked) {
  border-color: var(--forest-700);
  background: #f4faf7;
  box-shadow: 0 0 0 2px rgba(39, 106, 80, 0.1);
}

.choice-icon {
  display: grid;
  width: 30px;
  height: 30px;
  margin-bottom: 9px;
  place-items: center;
  border-radius: 5px;
  color: var(--forest-700);
  background: var(--forest-100);
}

.choice-card > span:nth-of-type(2) {
  display: flex;
  flex-direction: column;
}

.choice-card strong {
  font-size: 11px;
}

.choice-card small {
  color: var(--muted);
  font-size: 9px;
}

.choice-check {
  position: absolute;
  top: 10px;
  right: 10px;
  display: none;
  width: 16px;
  color: var(--forest-700);
}

.choice-card:has(input:checked) .choice-check {
  display: block;
}

.money-input {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #ffffff;
}

.money-input:focus-within {
  border-color: var(--forest-700);
  box-shadow: 0 0 0 3px rgba(39, 106, 80, 0.11);
}

.money-input span {
  padding-left: 12px;
  color: var(--muted);
}

.money-input input {
  border: 0;
  box-shadow: none;
}

[data-unit-field].hidden {
  display: none;
}

.import-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) minmax(240px, 330px);
  gap: 24px;
  align-items: start;
}

.upload-surface {
  padding: 24px;
}

.drop-zone {
  display: flex;
  min-height: 310px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-direction: column;
  padding: 28px;
  border: 1px dashed #9fb0a8;
  border-radius: 6px;
  background: #fafcfb;
  text-align: center;
}

.upload-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 8px;
  color: var(--forest-700);
  background: var(--forest-100);
}

.drop-zone > strong {
  font-size: 16px;
}

.drop-zone > span:nth-of-type(2) {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 11px;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-button {
  pointer-events: none;
}

.drop-zone > small {
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}

.import-guide {
  padding-top: 15px;
}

.import-guide > div {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.import-guide > div > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: var(--forest-700);
  background: var(--forest-100);
  font-size: 10px;
  font-weight: 750;
}

.import-guide p {
  display: flex;
  flex-direction: column;
  margin: 0;
  font-size: 11px;
}

.import-preview {
  padding: 25px;
}

.import-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.import-summary article {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.import-summary article > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.import-summary small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.import-summary strong {
  font-size: 18px;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
}

.notice > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 1px;
}

.notice p {
  margin: 2px 0 0;
}

.notice.warning {
  border-color: #ead9b2;
  color: var(--amber-700);
  background: var(--amber-100);
}

.notice.info {
  border-color: #c9ded5;
  color: var(--forest-800);
  background: var(--forest-100);
}

.import-summary + .import-preview,
.notice + .import-preview,
.import-preview + .import-preview {
  margin-top: 16px;
}

.sticky-import-actions {
  margin-top: 16px;
}

.confirmation-page {
  display: flex;
  max-width: 680px;
  min-height: 70vh;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0 auto;
  text-align: center;
}

.confirmation-icon {
  display: grid;
  width: 66px;
  height: 66px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 8px;
  color: var(--forest-700);
  background: var(--forest-100);
}

.confirmation-icon svg {
  width: 30px;
  height: 30px;
}

.confirmation-page h1 {
  max-width: 620px;
}

.confirmation-page > p {
  max-width: 560px;
}

.confirmation-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 11px 13px;
  border-radius: 6px;
  color: var(--blue-700);
  background: var(--blue-100);
  font-size: 11px;
}

.confirmation-actions {
  display: flex;
  gap: 10px;
  margin-top: 25px;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 15px;
}

.filter-tabs a {
  padding: 8px 13px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.filter-tabs a.active {
  color: var(--forest-800);
  background: var(--forest-100);
}

.charge-table {
  padding-top: 8px;
}

.table-unit {
  display: grid;
  width: 38px;
  height: 30px;
  place-items: center;
  border-radius: 5px;
  color: var(--forest-800);
  background: var(--forest-100);
  font-weight: 720;
}

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

.charge-hero-band {
  grid-template-columns: repeat(3, 1fr) auto;
  align-items: center;
}

.charge-hero-band > .status-pill {
  margin: 0 20px;
}

.breakdown-list {
  display: flex;
  flex-direction: column;
}

.breakdown-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.breakdown-row:first-child {
  border-top: 0;
}

.breakdown-row > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.breakdown-row > span strong,
.breakdown-row > strong {
  font-size: 12px;
}

.breakdown-row small {
  color: var(--muted);
  font-size: 10px;
}

.breakdown-row > strong {
  text-align: right;
}

.breakdown-total {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 35px;
  padding: 18px 0 4px;
  border-top: 2px solid var(--forest-900);
}

.breakdown-total span {
  font-size: 12px;
  font-weight: 650;
}

.breakdown-total strong {
  font-size: 20px;
}

.payment-history > div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.payment-history > div:first-child {
  border-top: 0;
}

.payment-history > div > span:last-child {
  display: flex;
  flex-direction: column;
}

.payment-history strong {
  font-size: 12px;
}

.payment-history small {
  color: var(--muted);
  font-size: 9px;
}

.resident-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background: #f5f7f6;
}

.resident-header {
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.resident-header-inner {
  display: flex;
  width: min(100%, 1180px);
  height: 74px;
  align-items: center;
  gap: 45px;
  margin: 0 auto;
  padding: 0 24px;
}

.resident-nav {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: 20px;
}

.resident-nav a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 5px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.resident-nav a.active {
  border-bottom-color: var(--forest-700);
  color: var(--forest-800);
}

.resident-nav svg {
  width: 16px;
}

.resident-account {
  display: flex;
  min-width: 210px;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.resident-content {
  width: min(100%, 1180px);
  min-height: 0;
  flex: 1;
  margin: 0 auto;
  padding: 36px 24px 70px;
}

.resident-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.resident-page-header h1 {
  margin-bottom: 4px;
}

.resident-page-header p {
  margin-bottom: 0;
}

.resident-unit-badge {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--forest-800);
  background: #ffffff;
  font-size: 12px;
  font-weight: 680;
}

.unit-selector {
  width: 160px;
}

.resident-current-charge {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(290px, 0.7fr);
  min-height: 330px;
  overflow: hidden;
  border-radius: 8px;
  color: #ffffff;
  background: var(--forest-900);
}

.current-charge-copy {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: 38px 42px;
}

.current-charge-copy .eyebrow {
  color: #8fc0aa;
}

.current-charge-copy h2 {
  margin-bottom: 3px;
  color: #dce8e3;
  font-size: 20px;
  font-weight: 560;
}

.resident-amount {
  margin-bottom: 18px;
  font-size: 42px;
  line-height: 1.15;
  font-weight: 750;
}

.current-charge-meta {
  display: flex;
  align-items: center;
  gap: 13px;
}

.current-charge-meta > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #c0d0ca;
  font-size: 11px;
}

.current-charge-meta .status-pill {
  color: var(--forest-950);
  background: var(--amber-500);
}

.current-charge-actions {
  display: flex;
  gap: 8px;
  margin-top: 26px;
}

.current-breakdown {
  padding: 30px;
  color: var(--ink);
  background: #ffffff;
}

.current-breakdown .eyebrow {
  color: var(--forest-700);
}

.current-breakdown > div:last-child {
  display: flex;
  flex-direction: column;
}

.current-breakdown > div:last-child > span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.current-breakdown small {
  color: var(--muted);
  font-size: 11px;
}

.current-breakdown strong {
  font-size: 11px;
}

.resident-bank-summary {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-strong);
}

.resident-bank-summary > strong {
  color: var(--forest-800);
  font-size: 14px;
}

.resident-bank-summary > small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.resident-bank-summary > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

.empty-resident {
  display: flex;
  min-height: 230px;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--ink);
  background: #ffffff;
}

.empty-resident .empty-icon {
  margin: 0;
}

.empty-resident p {
  margin: 0;
}

.resident-history {
  margin-top: 34px;
}

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

.history-charge {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  transition: 150ms ease;
}

.history-charge:hover {
  border-color: #a8bbb2;
  box-shadow: var(--shadow);
}

.history-month {
  width: 45px;
  height: 48px;
}

.history-charge > span:nth-child(2) {
  display: flex;
  flex-direction: column;
}

.history-charge > span:nth-child(2) strong {
  font-size: 13px;
}

.history-charge > span:nth-child(2) small {
  color: var(--muted);
  font-size: 10px;
}

.history-charge > svg {
  width: 16px;
  color: #94a19c;
}

.publication-toolbar > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}

.publication-toolbar svg {
  width: 16px;
}

.publication-manager-list {
  overflow: hidden;
}

.publication-manager-list > a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 150px 18px;
  align-items: center;
  gap: 14px;
  min-height: 94px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  transition: 150ms ease;
}

.publication-manager-list > a:first-child {
  border-top: 0;
}

.publication-manager-list > a:hover {
  background: #fafcfb;
}

.publication-kind-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 7px;
  color: var(--forest-700);
  background: var(--forest-100);
}

.publication-kind-icon.minutes {
  color: var(--blue-700);
  background: var(--blue-100);
}

.publication-kind-icon.large {
  width: 52px;
  height: 52px;
  margin-bottom: 17px;
}

.publication-kind-icon svg {
  width: 19px;
}

.publication-list-copy,
.publication-compact-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.publication-list-copy small,
.publication-compact-copy small {
  color: var(--forest-700);
  font-size: 9px;
  font-weight: 760;
  text-transform: uppercase;
}

.publication-list-copy strong,
.publication-compact-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publication-list-copy > span,
.publication-compact-copy > span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.publication-list-audit {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
}

.publication-list-audit strong {
  font-size: 14px;
}

.publication-list-audit small {
  color: var(--muted);
  font-size: 9px;
}

.publication-manager-list > a > svg {
  width: 17px;
  color: #93a19b;
}

.publication-form-layout {
  grid-template-columns: minmax(0, 760px) minmax(220px, 300px);
}

.publication-form-aside > svg {
  color: var(--forest-700);
}

.publication-detail-grid {
  display: grid;
  gap: 16px;
}

.publication-article {
  padding: 30px;
}

.publication-article-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 22px;
}

.publication-article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.publication-article-meta svg {
  width: 15px;
}

.publication-body {
  max-width: 82ch;
  color: #31423c;
  font-size: 13px;
  line-height: 1.8;
}

.publication-audit-panel .import-summary {
  margin-bottom: 0;
}

.publication-read-table {
  margin-top: 16px;
}

.resident-publications {
  margin-top: 34px;
}

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

.publication-compact-list > a {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 11px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  transition: 150ms ease;
}

.publication-compact-list > a:hover,
.publication-history-list > a:hover {
  border-color: #a8bbb2;
  box-shadow: var(--shadow);
}

.publication-compact-list > a > svg {
  width: 16px;
  color: #94a19c;
}

.unread-dot {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 8px;
  height: 8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--amber-500);
  box-shadow: 0 0 0 1px #e9c267;
}

.publication-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.publication-history-list > a {
  position: relative;
  display: grid;
  grid-template-columns: 58px 40px minmax(0, 1fr) 18px 8px 18px;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  transition: 150ms ease;
}

.publication-date {
  display: flex;
  width: 52px;
  height: 54px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: 6px;
  color: var(--forest-800);
  background: var(--forest-100);
}

.publication-date strong {
  font-size: 17px;
  line-height: 1;
}

.publication-date small {
  margin-top: 3px;
  font-size: 8px;
  text-transform: uppercase;
}

.publication-paperclip,
.publication-history-list > a > svg:last-child {
  width: 16px;
  color: #94a19c;
}

.publication-history-list .unread-dot {
  position: static;
}

.resident-breadcrumb {
  margin-bottom: 22px;
}

.resident-publication-detail {
  max-width: 880px;
  margin: 0 auto;
  padding: 42px 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.resident-publication-detail header {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.resident-publication-detail header h1 {
  margin-bottom: 7px;
  font-size: 31px;
}

.resident-publication-detail header p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.resident-publication-detail .publication-body {
  margin-top: 28px;
}

.publication-attachment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 30px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafcfb;
}

.publication-attachment > span {
  display: flex;
  align-items: center;
  gap: 11px;
}

.publication-attachment > span > svg {
  width: 22px;
  color: var(--forest-700);
}

.publication-attachment > span > span {
  display: flex;
  flex-direction: column;
}

.publication-attachment small {
  color: var(--muted);
  font-size: 9px;
}

.login-page {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(430px, 0.6fr);
  overflow: hidden;
  background: var(--forest-950);
}

.login-photo {
  position: relative;
  min-height: 100vh;
  background-color: #31413d;
  background-image: url("../img/login-building.png");
  background-position: center;
  background-size: cover;
}

.login-photo::after {
  position: absolute;
  inset: 0;
  background: rgba(12, 27, 23, 0.18);
  content: "";
}

.login-panel {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 42px 54px 25px;
  background: #ffffff;
}

.login-content {
  display: flex;
  width: 100%;
  max-width: 390px;
  flex: 1;
  justify-content: center;
  flex-direction: column;
  margin: 0 auto;
}

.login-brand {
  align-self: flex-start;
  margin-bottom: 64px;
  padding: 0;
}

.login-heading {
  margin-bottom: 27px;
}

.login-heading h1 {
  font-size: 31px;
}

.login-heading p {
  margin-bottom: 0;
  font-size: 13px;
}

.login-form .field {
  margin-bottom: 16px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon > svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 17px;
  color: #7b8984;
  transform: translateY(-50%);
}

.input-with-icon .field-control {
  padding-left: 38px;
}

.password-toggle {
  position: absolute;
  top: 4px;
  right: 4px;
}

.login-help {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 24px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.login-help svg {
  width: 16px;
  color: var(--forest-700);
}

.login-panel footer {
  color: #9ca6a2;
  font-size: 10px;
  text-align: center;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 1180px) {
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .login-page {
    grid-template-columns: minmax(0, 1fr) 450px;
  }
}

@media (max-width: 980px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    z-index: 30;
    inset: 0;
    background: rgba(9, 20, 17, 0.5);
  }

  .sidebar-open .sidebar-backdrop {
    display: block;
  }

  .app-frame {
    width: 100%;
    margin-left: 0;
  }

  .mobile-header {
    display: flex;
    height: 62px;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
  }

  .brand.compact {
    padding: 0;
  }

  .brand.compact .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 17px;
  }

  .page-content {
    min-height: calc(100vh - 62px);
    padding: 28px 24px 60px;
  }

  .dashboard-grid,
  .detail-grid,
  .closing-detail-grid,
  .charge-detail-grid {
    grid-template-columns: 1fr;
  }

  .attention-panel {
    order: -1;
  }

  .closing-row {
    grid-template-columns: 58px minmax(190px, 1fr) 90px 130px 20px;
  }

  .closing-row-stat:first-of-type {
    display: none;
  }

  .closing-row .status-pill {
    display: none;
  }

  .import-layout,
  .form-layout,
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .form-aside,
  .import-guide {
    display: none;
  }

  .resident-current-charge {
    grid-template-columns: 1fr;
  }

  .current-breakdown {
    display: none;
  }
}

@media (max-width: 760px) {
  h1 {
    font-size: 28px;
  }

  .page-content,
  .resident-content {
    padding: 22px 16px 55px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 22px;
  }

  .page-header > .button,
  .page-header .header-actions {
    width: 100%;
  }

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

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .metric {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .metric-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .metric strong {
    font-size: 18px;
  }

  .metric small {
    display: none;
  }

  .progress-steps {
    grid-template-columns: 1fr;
  }

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

  .unit-facts {
    grid-template-columns: 1fr 1fr;
  }

  .unit-facts div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .unit-facts div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .person-row,
  .person-row.dependent {
    grid-template-columns: 38px minmax(0, 1fr) 78px;
  }

  .person-row.dependent {
    grid-template-columns: 38px minmax(0, 1fr) 78px;
    padding-left: 24px;
  }

  .person-contact,
  .family-line {
    display: none;
  }

  .photo-modal {
    padding: 16px;
  }

  .photo-modal > img {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
  }

  .photo-modal-close {
    top: 12px;
    right: 12px;
  }

  .closing-row {
    grid-template-columns: 50px minmax(0, 1fr) 18px;
    gap: 11px;
    padding: 11px;
  }

  .closing-row-stat,
  .closing-row .status-pill {
    display: none;
  }

  .closing-summary-band,
  .charge-hero-band {
    grid-template-columns: 1fr 1fr;
  }

  .closing-summary-band > div:nth-child(3),
  .charge-hero-band > div:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .closing-summary-band > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .charge-hero-band > .status-pill {
    margin: 15px;
  }

  .choice-cards {
    grid-template-columns: 1fr;
  }

  .choice-card {
    min-height: 78px;
    justify-content: center;
    padding-left: 55px;
  }

  .choice-icon {
    position: absolute;
    top: 23px;
    left: 13px;
  }

  .form-grid.two-columns {
    grid-template-columns: 1fr;
  }

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

  .resident-header-inner {
    height: 64px;
    gap: 10px;
    padding: 0 16px;
  }

  .resident-nav a span,
  .resident-profile-link {
    display: none;
  }

  .resident-nav {
    gap: 5px;
    margin-left: auto;
  }

  .resident-nav a {
    min-width: 38px;
    justify-content: center;
    padding: 0 9px;
  }

  .resident-account {
    min-width: 0;
    margin-left: 0;
  }

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

  .current-charge-copy {
    padding: 30px 24px;
  }

  .resident-amount {
    font-size: 35px;
  }

  .publication-compact-list {
    grid-template-columns: 1fr;
  }

  .publication-manager-list > a {
    grid-template-columns: 40px minmax(0, 1fr) 18px;
    min-height: 84px;
    padding: 14px;
  }

  .publication-list-audit {
    display: none;
  }

  .publication-history-list > a {
    grid-template-columns: 50px 36px minmax(0, 1fr) 16px;
    gap: 10px;
    padding: 12px;
  }

  .publication-history-list .publication-paperclip {
    display: none;
  }

  .publication-history-list .unread-dot {
    position: absolute;
    top: 10px;
    right: 10px;
  }

  .resident-publication-detail {
    padding: 28px 20px;
  }

  .resident-publication-detail header h1 {
    font-size: 26px;
  }

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

  .publication-attachment .button {
    width: 100%;
  }

  .current-charge-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .confirmation-actions {
    width: 100%;
    flex-direction: column-reverse;
  }

  .confirmation-actions form,
  .confirmation-actions .button {
    width: 100%;
  }

  .login-page {
    display: block;
    overflow: auto;
    background: #ffffff;
  }

  .login-photo {
    display: none;
  }

  .login-panel {
    padding: 28px 22px 20px;
  }

  .login-brand {
    margin-bottom: 55px;
  }
}

.individual-charge-form {
  display: grid;
  gap: 18px;
}

.individual-charge-main,
.individual-items-section {
  padding: 26px;
}

.individual-charge-main .field-wide {
  grid-column: 1 / -1;
}

.payer-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 16px;
  background: #f3f7f5;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.payer-preview-icon,
.review-next-icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  color: var(--forest-700);
  background: #e3efe9;
  border-radius: 50%;
  place-items: center;
}

.payer-preview > span:last-child,
.payer-preview small,
.payer-preview strong {
  display: block;
}

.payer-preview small {
  color: var(--muted);
}

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

.individual-item-row {
  display: grid;
  grid-template-columns: 34px minmax(180px, 1.1fr) minmax(210px, 1.6fr) minmax(120px, .55fr) 40px;
  gap: 12px;
  align-items: end;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.individual-item-index {
  display: grid;
  width: 30px;
  height: 30px;
  margin-bottom: 7px;
  color: var(--forest-700);
  font-weight: 800;
  background: #e3efe9;
  border-radius: 50%;
  place-items: center;
}

.individual-item-row .icon-button {
  margin-bottom: 1px;
}

.individual-charge-total {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 22px;
  padding-top: 22px;
}

.individual-charge-total span {
  color: var(--muted);
  font-weight: 700;
}

.individual-charge-total strong {
  color: var(--forest-800);
  font-size: 26px;
}

.individual-form-actions {
  justify-content: flex-end;
}

.individual-review-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 20px;
  overflow: hidden;
  background: var(--forest-800);
  border-radius: 6px;
}

.individual-review-band > div {
  padding: 20px 22px;
  color: #fff;
  border-right: 1px solid rgb(255 255 255 / 14%);
}

.individual-review-band > div:last-child {
  border-right: 0;
}

.individual-review-band span,
.individual-review-band small,
.individual-review-band strong {
  display: block;
}

.individual-review-band span,
.individual-review-band small {
  color: #c4d6cf;
}

.individual-review-band strong {
  margin: 4px 0;
  font-size: 18px;
}

.individual-review-band .review-total {
  background: #f2b544;
}

.individual-review-band .review-total,
.individual-review-band .review-total span,
.individual-review-band .review-total small {
  color: #17251f;
}

.individual-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 20px;
}

.review-next-step {
  align-self: start;
  padding: 26px;
}

.review-next-step .review-next-icon {
  margin-bottom: 28px;
}

.review-next-step h2 {
  margin: 5px 0 10px;
  font-size: 21px;
}

.review-next-step p,
.individual-review-note p {
  color: var(--muted);
  line-height: 1.6;
}

.individual-review-note {
  margin: 18px 24px 24px;
  padding: 15px 16px;
  background: #f7f9f8;
  border-left: 3px solid var(--forest-600);
}

.individual-review-note span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.individual-review-note p {
  margin: 5px 0 0;
}

@media (max-width: 980px) {
  .individual-item-row {
    grid-template-columns: 34px 1fr 1fr 40px;
  }

  .individual-item-row .amount-field {
    grid-column: 2 / 4;
  }

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

  .individual-review-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .individual-charge-main,
  .individual-items-section {
    padding: 20px 16px;
  }

  .individual-item-row {
    grid-template-columns: 30px minmax(0, 1fr) 38px;
  }

  .individual-item-row .field-block,
  .individual-item-row .amount-field {
    grid-column: 2 / 3;
  }

  .individual-item-row .icon-button {
    grid-column: 3;
    grid-row: 1;
  }

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

  .individual-review-band > div {
    border-right: 0;
    border-bottom: 1px solid rgb(255 255 255 / 14%);
  }

  .individual-charge-total {
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .metric {
    align-items: center;
    flex-direction: row;
  }

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

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

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

  .expense-row {
    grid-template-columns: minmax(0, 1fr) 90px 32px;
  }

  .resident-current-charge {
    min-height: 0;
  }
}

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

  .import-summary article:last-child {
    grid-column: 1 / -1;
  }

  .sticky-import-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .sticky-import-actions form,
  .sticky-import-actions .button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .import-summary {
    grid-template-columns: 1fr;
  }

  .import-summary article:last-child {
    grid-column: auto;
  }
}

/* E-mail delivery and audit */
.email-live-panel {
  margin-bottom: 20px;
  padding: 26px 28px;
  color: #fff;
  background: var(--forest-900);
  border: 1px solid #29483e;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.email-live-heading,
.email-live-heading > div,
.email-progress-copy,
.template-toolbar,
.pix-qr-wrap,
.email-message-preview summary {
  display: flex;
  align-items: center;
}

.email-live-heading {
  justify-content: space-between;
  margin-bottom: 24px;
  color: #b8cac3;
}

.email-live-heading > div {
  gap: 9px;
  color: #fff;
  font-weight: 700;
}

.live-dot {
  width: 9px;
  height: 9px;
  background: #58c895;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(88, 200, 149, 0.13);
}

.live-dot.paused {
  background: #a9b5b0;
  box-shadow: none;
}

.email-progress-copy {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.email-progress-copy > div {
  display: grid;
  gap: 2px;
}

.email-progress-copy strong {
  font-size: 26px;
}

.email-progress-copy span {
  color: #c5d5cf;
}

.email-progress-track {
  height: 8px;
  margin-top: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 4px;
}

.email-progress-track span {
  display: block;
  height: 100%;
  background: #58c895;
  border-radius: inherit;
  transition: width 240ms ease;
}

.email-live-panel > p {
  margin: 10px 0 0;
  color: #b8cac3;
  font-size: 13px;
}

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

.table-secondary {
  display: block;
  color: var(--muted);
}

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

.email-settings-columns {
  align-items: stretch;
}

.email-editor-section .field-block > textarea {
  min-height: 300px;
  resize: vertical;
  line-height: 1.6;
}

.template-toolbar {
  justify-content: flex-end;
  gap: 9px;
  margin: 20px 0 10px;
}

.template-toolbar label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.template-toolbar select {
  width: min(280px, 100%);
}

.email-preview-section {
  margin-top: 22px;
  padding: 28px;
}

.email-preview-body {
  max-width: 720px;
  padding: 24px;
  background: #f7f9f8;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.email-preview-body table {
  max-width: 100%;
}

.email-audit-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.email-audit-summary > div {
  display: grid;
  gap: 4px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.email-audit-summary > div:last-child {
  border-right: 0;
}

.email-audit-summary span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.email-audit-summary strong {
  font-size: 14px;
}

.inline-action-form {
  margin: 0 0 20px;
}

.email-audit-grid {
  margin-top: 0;
}

.audit-timeline {
  display: grid;
}

.audit-timeline > div:not(.empty-state) {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  min-height: 58px;
}

.audit-timeline > div:not(.empty-state)::before {
  position: absolute;
  top: 18px;
  bottom: -3px;
  left: 4px;
  width: 1px;
  content: "";
  background: var(--line);
}

.audit-timeline > div:last-child::before {
  display: none;
}

.timeline-dot {
  z-index: 1;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  background: var(--blue-700);
  border-radius: 50%;
}

.timeline-dot.success {
  background: var(--forest-700);
}

.audit-timeline strong,
.audit-timeline small {
  display: block;
}

.audit-timeline small {
  color: var(--muted);
}

.email-message-preview {
  margin-top: 22px;
  padding: 0;
  overflow: hidden;
}

.email-message-preview summary {
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.email-message-preview summary span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.email-message-preview > div {
  padding: 0 24px 24px;
}

.pix-qr-wrap {
  gap: 16px;
  margin: 6px 0 20px;
  padding: 14px;
  background: #f7f9f8;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.pix-qr-wrap img {
  width: 116px;
  height: 116px;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
}

.pix-qr-wrap span,
.pix-qr-wrap small {
  display: block;
}

.pix-qr-wrap small {
  margin-top: 4px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .email-progress-copy,
  .email-metrics,
  .switch-grid,
  .email-audit-summary {
    grid-template-columns: 1fr;
  }

  .email-audit-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .email-audit-summary > div:last-child {
    border-bottom: 0;
  }

  .template-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .template-toolbar label {
    width: 100%;
  }

  .email-live-panel {
    padding: 22px 20px;
  }

  .pix-qr-wrap {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }
}
