@charset "UTF-8";
.year-loading {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(244 247 250 / 70%);
  pointer-events: none;
}
.year-loading-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 28px 24px;
  border: 1px solid #dfe7ee;
  border-radius: 16px;
  background: white;
  box-shadow: 0 12px 40px rgb(16 36 56 / 14%);
  text-align: center;
}
.year-loading-card strong {
  font-size: 18px;
}
.year-loading-card > span:last-child {
  color: #52697b;
}
.year-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #e1edf5;
  border-top-color: #126bae;
  border-radius: 50%;
  animation: year-spin 0.8s linear infinite;
}
@keyframes year-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .year-spinner {
    animation: none;
  }
}
.mobile-total {
  display: none;
}
.unit-name.mobile-unit-name {
  display: none;
}
@media (max-width: 760px) {
  .mobile-total {
    display: block;
    font-size: 9px;
    color: #ae7437;
    margin-top: 4px;
    font-weight: 650;
  }
  .filters > label:not(.search) {
    min-width: 120px;
  }
  .owner-button > small {
    display: none;
  }
}
:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #263a4c;
  background: #f4f7fa;
  font-synthesis: none;
  font-size: 14px;
  --navy: #102438;
  --blue: #126bae;
  --border: #dfe7ee;
  --muted: #718294;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button,
input,
select,
textarea,
a:focus-visible {
  outline-offset: 3px;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid #45a7ef;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
button {
  border: 0;
}
a {
  color: var(--blue);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  top: -60px;
  left: 16px;
  padding: 10px;
  background: #fff;
  z-index: 100;
}
.skip:focus {
  top: 10px;
}
.topbar {
  background: var(--navy);
  color: #fff;
  border-bottom: 1px solid #243d53;
}
.topbar-inner {
  max-width: 1800px;
  margin: auto;
  min-height: 84px;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  width: 43px;
  height: 45px;
  background: #1b769d;
  display: grid;
  place-items: center;
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px #ffffff24;
}
.brand h1 {
  font-size: 15px;
  letter-spacing: 0.035em;
  margin: 0 0 5px;
  font-weight: 750;
}
.brand p {
  font-size: 11px;
  color: #a8bbca;
  margin: 0;
}
.top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.header-button {
  color: #d6e4ee;
  background: #ffffff08;
  border: 1px solid #ffffff18;
  border-radius: 7px;
  min-height: 36px;
  padding: 7px 12px;
  font-size: 12px;
}
.header-button:hover {
  background: #ffffff15;
}
.connection {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #a8becd;
  margin-right: 8px;
}
.connection span {
  width: 6px;
  height: 6px;
  background: #44c6a0;
  border-radius: 50%;
}
#main:not(.auth-shell) {
  max-width: 1800px;
  margin: auto;
  padding: 30px 32px 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.13em;
  color: #72879b;
  display: block;
  margin-bottom: 8px;
}
.page-heading h2 {
  font-size: 28px;
  letter-spacing: -0.8px;
  margin: 0 0 7px;
  color: #173149;
}
.page-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.year-label {
  display: inline-block;
  font-size: 13px;
  vertical-align: middle;
  background: #e6eef5;
  border: 1px solid #d3e1ec;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0;
  margin-left: 5px;
  color: #486c8c;
}
.year-actions {
  display: flex;
  align-items: end;
  gap: 9px;
}
.year-picker > span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 5px;
}
.year-picker select {
  min-width: 100px;
  font-weight: 700;
}
.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
.primary {
  background: #126bae;
  color: #fff;
  box-shadow: 0 2px 3px #133c5a0a;
  border: 1px solid #126bae;
}
.primary:hover {
  background: #095e9d;
}
.secondary {
  background: #fff;
  color: #445d72;
  border: 1px solid #d9e3eb;
  box-shadow: 0 1px 2px #122e4404;
}
.secondary:hover {
  background: #f1f6fa;
}
.danger {
  background: #fff5f4;
  color: #ad3935;
  border: 1px solid #f0ccc9;
}
.text-button {
  background: none;
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
  min-height: 32px;
  padding: 4px;
}
.text-button:hover {
  text-decoration: underline;
}
.small {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 11px;
}
.summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.summary article {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 17px 18px;
  min-height: 117px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 3px #18344802;
}
.summary article > span {
  font-size: 11px;
  color: #708394;
  font-weight: 600;
}
.summary strong {
  font-size: 23px;
  letter-spacing: -0.8px;
  margin: 9px 0 5px;
  color: #1b3b55;
  font-variant-numeric: tabular-nums;
}
.summary small {
  font-size: 10px;
  color: var(--muted);
  margin-top: auto;
  line-height: 1.5;
}
.summary small button {
  font-size: 10px;
  min-height: 0;
  padding: 0;
  margin-left: 6px;
}
.summary .paid-summary {
  border-color: #cce8e0;
  background: #f5fcf9;
}
.summary .paid-summary strong {
  color: #188365;
}
.summary .total-summary {
  background: #fff9f4;
  border-color: #edddce;
}
.summary .total-summary strong {
  color: #b16b26;
}
.workspace {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 3px 8px #28425904;
  overflow: hidden;
}
.workspace-head {
  padding: 21px 22px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.workspace-head h3 {
  font-size: 15px;
  margin-bottom: 5px;
  color: #19384f;
  letter-spacing: -0.15px;
}
.count {
  display: inline-block;
  margin-left: 5px;
  vertical-align: middle;
  background: #edf3f8;
  border: 1px solid #e0e9f1;
  color: #617e96;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 5px;
}
.workspace-head p {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
}
.toolbar {
  display: flex;
  gap: 7px;
}
.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 22px 18px;
}
.filters .search {
  flex: 1;
  max-width: 430px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding-left: 12px;
  color: #8b9aa7;
  background: #fbfcfd;
}
.search input {
  width: 100%;
  border: 0;
  background: none;
}
.filters > .text-button {
  margin-left: auto;
  color: #81919e;
  font-size: 11px;
}
.filters select {
  min-width: 145px;
  font-size: 12px;
  background-color: #fff;
}
input,
select,
textarea {
  border: 1px solid #d5e0e9;
  border-radius: 7px;
  padding: 10px 11px;
  min-height: 40px;
  background: #fff;
  color: #29475d;
}
input::placeholder {
  color: #93a2ae;
}
input[readonly] {
  background: #f1f5f8;
  color: #708397;
}
input[type="checkbox"] {
  appearance: auto;
  accent-color: #126bae;
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  flex-shrink: 0;
}
textarea {
  resize: vertical;
  width: 100%;
  line-height: 1.6;
}
.selection-bar {
  min-height: 49px;
  padding: 7px 22px;
  background: #fbfcfe;
  border-top: 1px solid #edf1f5;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
}
.selection-bar > div:last-child {
  display: flex;
  align-items: center;
  gap: 15px;
}
.selection-bar .button {
  min-height: 32px;
  font-size: 11px;
}
.selection-bar .text-button {
  font-size: 11px;
}
.matrix-wrap {
  overflow: auto;
  max-height: 68vh;
  overscroll-behavior-x: contain;
  scrollbar-color: #bfcedb #f3f7fa;
  scrollbar-width: thin;
}
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 11px;
  min-width: 1270px;
}
th,
td {
  text-align: center;
  border-bottom: 1px solid #e9eef3;
  padding: 8px 5px;
}
thead th {
  position: sticky;
  top: 0;
  background: #f0f5f9;
  color: #6c8091;
  font-size: 10px;
  font-weight: 700;
  z-index: 2;
  height: 42px;
  letter-spacing: 0.02em;
}
thead th abbr {
  text-decoration: none;
}
thead th.identity > div {
  display: flex;
  gap: 13px;
  align-items: center;
  padding-left: 11px;
}
th.identity {
  position: sticky;
  left: 0;
  text-align: left;
  min-width: 211px;
  width: 211px;
  max-width: 211px;
  background: #fff;
  z-index: 3;
  border-right: 1px solid #e1e9ef;
  box-shadow: 4px 0 6px -5px #142f4840;
}
thead th.identity {
  background: #edf3f8;
  z-index: 4;
}
.identity-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 11px;
}
.owner-button {
  display: block;
  min-width: 0;
  text-align: left;
  background: none;
  padding: 4px 0;
  min-height: 53px;
  flex: 1;
}
.unit-name {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #4a657b;
  font-size: 10px;
  font-weight: 750;
  margin-bottom: 4px;
}
.unit-name > span:not(.manager-mark) {
  color: #a0b1bf;
}
.owner-button strong {
  display: block;
  color: #284358;
  font-size: 11px;
  max-width: 164px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.owner-button small {
  display: block;
  color: #97a6b2;
  font-size: 9px;
  margin-top: 4px;
}
.manager-mark {
  font-size: 8px;
  background: #e9e9fc;
  color: #7572b2;
  border-radius: 3px;
  padding: 1px 3px;
  line-height: 12px;
}
.month {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: auto;
  min-width: 51px;
  min-height: 45px;
  width: 100%;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
  white-space: nowrap;
}
.month small {
  font-size: 8px;
  font-weight: 500;
  opacity: 0.77;
}
.month.paid {
  background: #edf8f3;
  color: #279173;
  border-color: #deefe6;
}
.month.paid > span {
  font-size: 16px;
  line-height: 13px;
}
.month:not(.paid).overdue {
  background: #fff0ed;
  color: #b34234;
  border-color: #f0c5bd;
}
.month:not(.paid).due {
  background: #fff4d9;
  color: #9a6a0b;
  border-color: #ecd298;
}
.month:not(.paid).upcoming {
  background: #edf3f8;
  color: #597489;
  border-color: #dce6ee;
}
.month.old-owner {
  border-style: dashed;
  border-width: 1px;
}
.month .old-owner-label {
  font-size: 8px;
  font-weight: 500;
  opacity: 0.8;
}
.month small {
  white-space: normal;
  line-height: 1.25;
}
.month:hover {
  filter: brightness(0.96);
  box-shadow: 0 0 0 2px #86b6d84a;
}
.no-charge {
  color: #bbc7d1;
}
.balance {
  font-size: 11px;
  font-weight: 600;
  color: #617689;
  white-space: nowrap;
  padding: 8px 11px;
  font-variant-numeric: tabular-nums;
}
.total-cell {
  color: #294359;
  background: #fafcfe;
}
.carry-button {
  font-size: 11px;
  min-height: 44px;
  padding: 4px 0;
  background: none;
  color: #7b8d9d;
  font-weight: 600;
}
.carry-button.has-debt {
  color: #ac783a;
}
.carry-button small {
  display: block;
  font-size: 8px;
  font-weight: 400;
  opacity: 0.75;
  margin-top: 5px;
}
.carry-button:hover {
  text-decoration: underline;
}
.table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 14px 22px;
  color: #8c9ca9;
  font-size: 10px;
}
.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
}
.legend .paid {
  background: #65b899;
}
.legend .overdue {
  background: #cc6d5f;
}
.legend .due {
  background: #d4a52f;
}
.legend .upcoming {
  background: #92aabd;
}
.legend .former {
  background: #b7acc6;
}
.help {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: #edf5fc;
  border: 1px solid #dcebf7;
  border-radius: 8px;
  color: #5d809c;
  font-size: 11px;
  line-height: 1.65;
  padding: 12px 14px;
  margin: 16px 0;
}
.help > span {
  display: grid;
  place-items: center;
  border: 1px solid #aac7de;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  margin-top: 1px;
}
.help p {
  margin: 0;
}
.help strong {
  color: #3a6688;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  color: #92a2af;
  font-size: 10px;
  padding: 4px 0 24px;
}
.loading {
  text-align: center;
  padding: 20vh 20px !important;
}
.muted {
  color: #7f8f9d;
  font-size: 12px;
}
.empty {
  text-align: center;
  padding: 45px 18px;
  color: #8a9ba8;
  font-size: 13px;
}
.empty p {
  margin-top: 8px;
}
.empty strong {
  color: #556e83;
}
.badge {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 5px;
  background: #edf2f6;
  color: #6d7f8d;
  font-size: 10px;
  font-weight: 600;
}
.badge.green {
  background: #e7f5ed;
  color: #228260;
}
.badge.red {
  background: #fcece8;
  color: #ba6557;
}
.badge.blue {
  background: #e7f2fc;
  color: #357fae;
}
dialog {
  padding: 0;
  max-width: 580px;
  width: calc(100% - 32px);
  max-height: 90dvh;
  border: 1px solid #d9e5ee;
  border-radius: 16px;
  box-shadow: 0 28px 80px #0b243449;
  color: #294254;
}
dialog.wide {
  max-width: 900px;
}
dialog::backdrop {
  background: #0b24346b;
  backdrop-filter: blur(3px);
}
.dialog-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: white;
  border-bottom: 1px solid #e4edf3;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.dialog-head h2 {
  font-size: 20px;
  margin: 0;
  letter-spacing: -0.4px;
}
.dialog-head .eyebrow {
  font-size: 9px;
  margin-bottom: 7px;
}
.icon {
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  border-radius: 8px;
  background: #f1f5f8;
  color: #7891a5;
  font-size: 24px;
}
.dialog-body {
  padding: 22px 24px;
}
.dialog-body > .help:first-child,
.dialog-body > form > .help:first-child {
  margin-top: 0;
}
.dialog-body h3 {
  font-size: 14px;
  margin: 20px 0 13px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 15px;
  min-width: 0;
}
.form-grid .field {
  margin: 0;
}
.field > span {
  font-size: 12px;
  font-weight: 600;
  color: #557186;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-size: 16px;
}
.check {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 12px;
  color: #587187;
  min-height: 44px;
}
.form-actions {
  border-top: 1px solid #e4edf3;
  margin-top: 24px;
  padding-top: 18px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.form-error {
  background: #fff0ee;
  color: #ab4e40;
  border-radius: 6px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 16px;
}
.success-message {
  background: #eafaef;
  color: #297c54;
  border-radius: 6px;
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.payment-total {
  border: 1px solid #dce8f0;
  background: #f6f9fc;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px;
  margin: 14px 0;
}
.payment-total span {
  font-size: 12px;
  color: #6d879a;
}
.payment-total strong {
  font-size: 24px;
  color: #244b67;
  letter-spacing: -0.5px;
}
.owner-caption {
  font-weight: 650;
  font-size: 14px;
}
.charge-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.charge-tags span {
  font-size: 10px;
  padding: 5px 7px;
  background: #f1f5f8;
  color: #7991a4;
  border-radius: 4px;
}
.history {
  border-top: 1px solid #e4edf3;
  margin-top: 20px;
  padding-top: 5px;
}
.history-list,
.results {
  list-style: none;
  padding: 0;
  margin: 0;
}
.history-list li {
  padding: 10px 0;
  border-bottom: 1px solid #e4edf3;
  font-size: 12px;
}
.history-list li p {
  font-size: 11px;
  color: #8ba0b1;
  margin: 7px 0;
}
.history-list .badge {
  margin-left: 5px;
}
.history > .button {
  margin-top: 15px;
}
.debt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e4edf3;
  padding: 10px 0;
}
.debt-row > .text-button {
  text-align: left;
  flex: 1;
}
.debt-row > .text-button small {
  display: block;
  font-size: 10px;
  color: #8b9ba8;
  font-weight: 400;
  margin-top: 5px;
}
.debt-row > strong {
  font-size: 13px;
  color: #a8793d;
}
.former-row {
  padding: 18px 0;
  border-bottom: 1px solid #e4edf3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.former-row:first-child {
  padding-top: 0;
}
.former-row h3 {
  margin: 6px 0;
  font-size: 15px;
}
.former-row p {
  font-size: 11px;
  color: #7d91a0;
  line-height: 1.6;
  margin-bottom: 4px;
}
.former-row small {
  font-size: 10px;
  color: #8b9da9;
}
.former-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
}
.former-actions strong {
  color: #ab7841;
  font-size: 21px;
  white-space: nowrap;
}
.guide .lead {
  font-size: 16px;
  color: #738b9d;
}
.guide section {
  padding: 10px 0;
  border-bottom: 1px solid #e7eef4;
}
.guide h3 {
  font-size: 15px;
}
.guide p {
  font-size: 13px;
  line-height: 1.8;
  color: #6d8597;
}
.unit-profile h3 {
  font-size: 23px;
  margin: 0 0 8px;
}
.unit-profile dl {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.unit-profile dt {
  font-size: 10px;
  color: #93a3af;
  margin-bottom: 5px;
}
.unit-profile dd {
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.profile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mail-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 24px;
}
.recipient-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.recipient {
  padding: 13px;
  text-align: left;
  background: #f5f8fa;
  border: 1px solid #e4ebf1;
  border-radius: 8px;
}
.recipient.active {
  background: #edf6ff;
  border-color: #9fc7e7;
}
.recipient strong {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.recipient small {
  display: block;
  font-size: 10px;
  color: #8397a7;
  margin: 7px 0;
  overflow-wrap: anywhere;
}
.mail-frame {
  margin-top: 20px;
  width: 100%;
  height: 360px;
  border: 1px solid #e1e8ee;
  border-radius: 8px;
  background: #fff;
}
.mail-frame.tall {
  height: 65vh;
  margin: 0;
}
.results li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #e4edf3;
}
.results li > div {
  flex: 1;
  min-width: 180px;
}
.results strong {
  font-size: 12px;
}
.results small {
  display: block;
  color: #8ba0af;
  font-size: 10px;
  margin-top: 5px;
}
.results p {
  font-size: 11px;
  color: #7d94a5;
  margin: 6px 0 0;
}
.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-story {
  background: var(--navy);
  color: #fff;
  padding: 48px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100dvh;
}
.auth-story > div:nth-child(2) {
  padding: 65px 0;
}
.auth-story h2 {
  font-size: clamp(36px, 4.5vw, 65px);
  line-height: 1.12;
  letter-spacing: -2px;
  margin: 20px 0 24px;
}
.auth-story .eyebrow {
  color: #75b9cf;
}
.auth-story > div > p {
  color: #9eb9cc;
  font-size: 14px;
  line-height: 1.8;
  max-width: 350px;
}
.auth-story > small {
  font-size: 11px;
  color: #7894a8;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
}
.auth-form {
  max-width: 365px;
  width: 100%;
}
.auth-form h2 {
  font-size: 30px;
  letter-spacing: -0.8px;
  margin: 12px 0;
}
.auth-form > p {
  font-size: 13px;
  color: #8496a4;
  line-height: 1.7;
  margin-bottom: 30px;
}
.auth-form .field {
  margin-bottom: 20px;
}
.auth-form .button {
  width: 100%;
  font-size: 14px;
  min-height: 46px;
  margin-top: 6px;
}
.auth-switch {
  display: block;
  margin: 18px auto 0;
}
.auth-form input {
  min-height: 46px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  max-width: calc(100vw - 30px);
  width: max-content;
  background: #173c52;
  color: #fff;
  padding: 14px 20px;
  border-radius: 10px;
  box-shadow: 0 8px 30px #092b4430;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  transition:
    opacity 0.15s,
    transform 0.15s;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast.error {
  background: #9e443c;
}
@media (min-width: 1600px) {
  .month {
    min-width: 61px;
  }
  table {
    font-size: 12px;
  }
  .month > span {
    font-size: 11px;
  }
  .summary strong {
    font-size: 27px;
  }
}
@media (max-width: 1100px) {
  .topbar-inner {
    padding: 16px 22px;
  }
  #main:not(.auth-shell) {
    padding: 25px 22px 0;
  }
  .summary {
    gap: 8px;
  }
  .summary article {
    padding: 14px 12px;
  }
  .summary strong {
    font-size: 20px;
  }
  .workspace-head {
    align-items: flex-start;
  }
  .toolbar {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .connection {
    display: none;
  }
  .filters select {
    min-width: 120px;
  }
  .auth-story {
    padding: 40px;
  }
  .table-footer {
    align-items: flex-start;
    line-height: 1.6;
  }
  .table-footer > span {
    max-width: 160px;
    text-align: right;
  }
}
@media (max-width: 760px) {
  .topbar-inner {
    padding: 14px 16px;
    gap: 10px;
  }
  .brand h1 {
    font-size: 11px;
    max-width: 210px;
    line-height: 1.4;
  }
  .brand p {
    font-size: 9px;
  }
  .brand-icon {
    width: 35px;
    height: 38px;
  }
  .top-actions {
    gap: 5px;
  }
  .top-actions .header-button {
    font-size: 10px;
    padding: 7px 9px;
    min-height: 38px;
  }
  .connection {
    display: none;
  }
  .top-actions [data-action="guide"],
  .top-actions [data-action="users"] {
    display: none;
  }
  #main:not(.auth-shell) {
    padding: 22px 12px 0;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 10px;
  }
  .page-heading h2 {
    font-size: 24px;
  }
  .page-heading p {
    font-size: 11px;
    line-height: 1.5;
    max-width: 260px;
  }
  .page-heading .eyebrow {
    font-size: 9px;
  }
  .year-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 5px;
  }
  .year-picker span {
    font-size: 9px;
  }
  .year-picker select {
    font-size: 16px;
    min-width: 102px;
    min-height: 40px;
    padding: 5px 10px;
  }
  .year-actions .button {
    font-size: 10px;
    min-height: 28px;
    padding: 6px;
  }
  .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 17px;
  }
  .summary article {
    min-height: 103px;
    padding: 14px;
  }
  .summary article > span {
    font-size: 10px;
  }
  .summary strong {
    font-size: 23px;
    margin-top: 7px;
  }
  .summary article:last-child {
    grid-column: span 2;
    min-height: 95px;
  }
  .summary small {
    font-size: 9px;
  }
  .workspace-head {
    padding: 17px 13px;
    flex-direction: column;
    gap: 14px;
  }
  .workspace-head h3 {
    font-size: 14px;
  }
  .workspace-head p {
    font-size: 10px;
  }
  .toolbar {
    width: 100%;
    justify-content: stretch;
    gap: 6px;
  }
  .toolbar .button {
    flex: 1;
    font-size: 10px;
    padding: 8px 6px;
    min-height: 39px;
  }
  .filters {
    padding: 0 12px 13px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .filters .search {
    max-width: none;
    flex: 1 0 100%;
  }
  .filters input,
  .filters select {
    font-size: 16px;
    min-height: 44px;
  }
  .filters > label:not(.search) {
    flex: 1;
  }
  .filters select {
    width: 100%;
    min-width: 0;
  }
  .filters > .text-button {
    font-size: 10px;
    min-height: 25px;
  }
  .selection-bar {
    padding: 8px 12px;
    align-items: flex-start;
    font-size: 10px;
    gap: 8px;
  }
  .selection-bar > div:first-child {
    padding-top: 5px;
    line-height: 1.5;
  }
  .selection-bar > div:last-child {
    gap: 3px;
    align-items: flex-end;
    flex-direction: column;
  }
  .selection-bar .button {
    min-height: 38px;
    font-size: 10px;
  }
  .selection-bar .text-button {
    font-size: 9px;
    min-height: 23px;
  }
  .matrix-wrap {
    max-height: 66dvh;
  }
  table {
    width: max-content;
    min-width: 100%;
  }
  th.identity {
    min-width: 100px;
    width: 100px;
    max-width: 100px;
  }
  .identity-content {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 2px 5px;
    padding: 0 3px;
  }
  .identity-content .row-select {
    width: 24px;
    height: 24px;
    grid-column: 1;
    grid-row: 1;
  }
  .owner-button strong {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    font-size: 10.5px;
    line-height: 1.2;
    max-width: none;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .owner-button small {
    font-size: 8px;
  }
  .owner-button .unit-name {
    display: none;
  }
  .unit-name.mobile-unit-name {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    font-size: 10px;
    min-height: 24px;
    margin: 0;
    flex-wrap: wrap;
    gap: 3px;
  }
  .owner-button {
    grid-column: 1 / -1;
    width: 100%;
    padding: 1px 0;
    min-height: 44px;
  }
  .mobile-total {
    font-size: 8px;
    line-height: 1.25;
    margin-top: 2px;
    overflow-wrap: anywhere;
  }
  .month {
    min-width: 44px;
    min-height: 44px;
    padding: 4px 2px;
    gap: 3px;
    font-size: 10px;
    border-radius: 5px;
  }
  thead th.identity > div {
    padding-left: 3px;
    gap: 5px;
    font-size: 8px;
  }
  th,
  td {
    padding: 3px 2px;
  }
  thead th {
    height: 34px;
    font-size: 9px;
  }
  .balance {
    padding: 3px 8px;
  }
  .table-footer {
    flex-direction: column;
    gap: 6px;
    padding: 12px;
  }
  .table-footer > span {
    max-width: none;
    text-align: left;
    font-size: 9px;
  }
  .legend {
    gap: 10px;
    font-size: 9px;
  }
  .help {
    font-size: 10px;
    padding: 11px 12px;
    margin: 13px 0;
  }
  .page-footer {
    font-size: 9px;
    gap: 10px;
  }
  .page-footer > span:first-child {
    max-width: 60%;
  }
  dialog,
  dialog.wide {
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  .dialog-head {
    padding: 18px 17px;
  }
  .dialog-head h2 {
    font-size: 19px;
  }
  .dialog-body {
    padding: 18px 17px 30px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .field input,
  .field select {
    min-height: 46px;
  }
  .form-actions {
    position: sticky;
    bottom: 0;
    padding: 15px 0 5px;
    background: white;
    z-index: 2;
  }
  .form-actions .button {
    min-height: 44px;
    flex: 1;
  }
  .form-actions > .muted {
    display: none;
  }
  .debt-row {
    gap: 9px;
    flex-wrap: wrap;
  }
  .debt-row > .button {
    margin-left: 26px;
    margin-top: -4px;
  }
  .debt-row > strong {
    font-size: 12px;
  }
  .former-row {
    align-items: flex-start;
    gap: 12px;
  }
  .former-actions strong {
    font-size: 18px;
  }
  .former-actions .button {
    font-size: 10px;
    padding: 8px;
    min-height: 40px;
  }
  .former-row h3 {
    font-size: 14px;
  }
  .mail-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .recipient-list {
    flex-direction: row;
    overflow-x: auto;
    padding: 3px;
  }
  .recipient {
    min-width: 170px;
  }
  .mail-frame {
    height: 340px;
  }
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-story {
    min-height: auto;
    padding: 20px;
  }
  .auth-story > div:nth-child(2),
  .auth-story > small {
    display: none;
  }
  .auth-story .brand h1 {
    font-size: 13px;
  }
  .auth-panel {
    align-items: flex-start;
    padding: 48px 25px;
  }
  .auth-form {
    max-width: 420px;
  }
  .auth-form h2 {
    font-size: 28px;
  }
  .unit-profile dl {
    gap: 18px 10px;
  }
  .profile-actions > .button {
    flex: 1;
    min-height: 44px;
  }
  .dialog-body .help {
    font-size: 12px;
  }
  .dialog-body .muted {
    line-height: 1.6;
  }
  .field > span {
    font-size: 12px;
  }
  input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
  }
  .row-select {
    outline-offset: 6px;
  }
  .results li > div {
    min-width: 130px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .topbar,
  .toolbar,
  .filters,
  .selection-bar,
  .help,
  .page-footer,
  .table-footer {
    display: none;
  }
  .matrix-wrap {
    overflow: visible;
    max-height: none;
  }
  #main:not(.auth-shell) {
    padding: 0;
  }
  table {
    min-width: 0;
    font-size: 8px;
  }
  .month {
    min-width: 0;
    font-size: 8px;
  }
  .identity {
    position: static !important;
    min-width: 100px !important;
    width: 100px !important;
  }
  body {
    background: white;
  }
}

@media (max-width: 760px) {
  body .owner-button > small {
    display: none;
  }
  .page-footer {
    flex-wrap: wrap;
    align-items: center;
  }
  .page-footer .text-button {
    font-size: 10px;
    min-height: 36px;
  }
  .page-footer > span:last-child {
    width: 100%;
  }
}

.summary-toggle,
.mobile-tools,
.filter-toggle {
  display: none;
}
@media (max-width: 760px) {
  .topbar-inner {
    padding: 10px 13px;
    min-height: 56px;
  }
  .brand-icon {
    width: 32px;
    height: 34px;
  }
  .brand h1 {
    margin-bottom: 3px;
  }
  .brand p {
    font-size: 8px;
  }
  .top-actions .header-button {
    min-height: 34px;
  }
  body #main:not(.auth-shell) {
    padding: 11px 12px 0;
  }
  .page-heading {
    margin-bottom: 10px;
    align-items: center;
    gap: 6px;
  }
  .page-heading > div > .eyebrow,
  .page-heading > div > p {
    display: none;
  }
  .page-heading h2 {
    font-size: 21px;
    margin: 0;
    letter-spacing: -0.6px;
    white-space: nowrap;
  }
  .page-heading .year-label {
    display: none;
  }
  .year-actions {
    flex-direction: row;
    align-items: center;
    gap: 5px;
  }
  .year-picker > span {
    display: none;
  }
  .year-picker select {
    min-width: 77px;
    width: 77px;
    min-height: 36px;
    padding: 5px 6px;
    font-size: 15px;
  }
  .year-actions .button {
    min-height: 36px;
    padding: 6px 7px;
    font-size: 10px;
  }
  .summary-toggle {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    white-space: nowrap;
    min-height: 36px;
    padding: 3px;
  }
  .summary {
    gap: 8px;
    margin-bottom: 11px;
  }
  .summary article {
    min-height: 78px;
    padding: 10px 12px;
  }
  .summary:not(.expanded) article:not(.paid-summary):not(.total-summary) {
    display: none;
  }
  .summary.expanded article {
    display: flex;
  }
  .summary article.total-summary {
    grid-column: auto;
    min-height: 78px;
  }
  .summary strong {
    font-size: 21px;
    margin: 6px 0 3px;
  }
  .summary small {
    font-size: 8px;
    line-height: 1.3;
  }
  .summary article > span {
    font-size: 10px;
  }
  .workspace-head {
    padding: 11px 12px;
    flex-direction: row;
    align-items: center;
    gap: 7px;
  }
  .workspace-head h3 {
    font-size: 11px;
    margin: 0;
  }
  .workspace-head .count {
    font-size: 9px;
    margin-left: 2px;
    padding: 2px 4px;
  }
  .workspace-head > div > p {
    display: none;
  }
  .toolbar {
    width: auto;
    flex-shrink: 0;
    gap: 5px;
    flex-wrap: nowrap;
  }
  .toolbar > .secondary {
    display: none;
  }
  .toolbar > .primary {
    font-size: 10px;
    min-height: 34px;
    padding: 6px 8px;
  }
  .mobile-tools {
    display: block;
    position: relative;
  }
  .mobile-tools summary {
    list-style: none;
    font-size: 10px;
    min-height: 34px;
    padding: 6px 8px;
  }
  .mobile-tools summary::-webkit-details-marker {
    display: none;
  }
  .mobile-tools > div {
    position: absolute;
    right: 0;
    top: 40px;
    min-width: 185px;
    background: #fff;
    border: 1px solid #dbe6ef;
    border-radius: 8px;
    box-shadow: 0 8px 22px #123c5026;
    padding: 7px;
    z-index: 8;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  .mobile-tools > div > .button {
    justify-content: flex-start;
    min-height: 40px;
  }
  .filters {
    padding: 0 12px 10px;
    gap: 6px;
  }
  .filters .search {
    flex: 1 1 calc(100% - 47px);
    min-width: 0;
  }
  .filters .search input {
    font-size: 16px;
    padding: 10px 7px;
    min-width: 0;
  }
  .filter-toggle {
    display: inline-flex;
    width: 38px;
    min-height: 44px;
    padding: 5px;
    font-size: 22px;
  }
  .filters > label:not(.search) {
    min-width: 0;
  }
  .filters > label.extra-filter {
    display: none;
  }
  .filters > .text-button {
    display: none;
  }
  .filters.expanded > label.extra-filter {
    display: block;
    flex: 1 0 65%;
  }
  .filters.expanded > .text-button {
    display: block;
  }
  .filters select {
    font-size: 14px;
    padding: 8px;
    min-height: 40px;
  }
  .selection-bar {
    min-height: 43px;
    padding: 5px 12px;
    align-items: center;
  }
  .selection-bar > div:first-child {
    padding: 0;
  }
  .selection-bar > div:last-child {
    flex-direction: row;
    align-items: center;
  }
  .selection-bar .text-button {
    display: none;
  }
  .selection-bar .button {
    min-height: 33px;
  }
  .matrix-wrap {
    max-height: 70dvh;
  }
}

[hidden] {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.visual-guide {
  max-width: 960px;
  margin: auto;
}
.guide-intro {
  background: #edf5fb;
  padding: 24px;
  border-radius: 16px;
}
.guide-intro h3 {
  font-size: 26px;
  margin: 12px 0;
}
.guide-intro p,
.guide-section > p {
  font-size: 15px;
  line-height: 1.8;
}
.guide-roles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.guide-roles span {
  padding: 8px 12px;
  background: white;
  border: 1px solid #d4e4ef;
  border-radius: 9px;
  font-size: 12px;
}
.guide-toc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 20px 0;
}
.guide-toc a {
  padding: 12px;
  border: 1px solid #dbe4eb;
  border-radius: 10px;
  color: #174f77;
  text-decoration: none;
  font-size: 13px;
  min-height: 44px;
}
.guide-section {
  padding: 24px 0;
  border-bottom: 1px solid #dbe4eb;
  scroll-margin-top: 105px;
}
.guide-step-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}
.guide-step-heading > span {
  background: #126aa6;
  color: white;
  font-weight: 800;
  padding: 10px;
  border-radius: 10px;
}
.guide-step-heading h3 {
  margin: 0;
  font-size: 20px;
}
.guide-figure {
  margin: 20px 0;
  background: #edf3f8;
  border: 1px solid #dbe4eb;
  border-radius: 14px;
  overflow: hidden;
}
.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
}
.guide-figure.phone img {
  max-width: 390px;
  margin: auto;
}
.guide-figure figcaption {
  padding: 12px;
  font-size: 12px;
  color: #426178;
  text-align: center;
}
.guide-note {
  border-left: 4px solid #1989af;
  background: #edf7fb;
  border-radius: 8px;
  padding: 14px;
  line-height: 1.8;
  font-size: 14px;
}
.guide-section details {
  padding: 14px 0;
  border-bottom: 1px solid #e4eaf0;
}
.guide-section summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 32px;
}
.guide-section details p {
  line-height: 1.8;
}
@media (max-width: 600px) {
  .guide-toc {
    grid-template-columns: 1fr;
  }
  .guide-intro {
    padding: 18px;
  }
  .guide-intro h3 {
    font-size: 22px;
  }
  .guide-step-heading h3 {
    font-size: 18px;
  }
  .guide-section {
    padding: 18px 0;
  }
}

.mail-source-list {
  min-width: 0;
  width: 100%;
  margin: 12px 0 18px;
  font-size: 12px;
}
.mail-source-list th {
  position: static;
  text-align: left;
  padding: 9px;
}
.mail-source-list td {
  padding: 9px;
  text-align: left;
}
.mail-source-list td:last-child,
.mail-source-list th:last-child {
  text-align: right;
}
.mail-source-list .source-period {
  font-size: 10px;
  display: block;
  color: #8194a4;
  margin-top: 3px;
}
.mail-sources {
  border: 1px solid #dce7ef;
  border-radius: 8px;
  padding: 0 12px;
  margin: 18px 0;
}
.mail-sources h4 {
  font-size: 12px;
  margin: 15px 0 5px;
}
@media (max-width: 760px) {
  .top-actions [data-action="account"] {
    display: none;
  }
  .mail-source-list {
    font-size: 11px;
  }
}
