:root {
  color-scheme: light;
  --navy: #102a43;
  --navy-deep: #0b2034;
  --teal: #87c7b5;
  --teal-dark: #4f9c89;
  --ink: #20364b;
  --muted: #718190;
  --paper: #f4f7f8;
  --white: #fff;
  --line: #e4e9ed;
  --font-body: "DM Sans", sans-serif;
  --font-heading: "Manrope", sans-serif;
  --shadow: 0 18px 50px rgba(16, 42, 67, .07);
}
* { box-sizing: border-box; }
body { min-width: 0; min-height: 100vh; margin: 0; display: flex; flex-direction: column; color: var(--ink); background: var(--paper); font: 15px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 5; top: 10px; left: 10px; padding: 10px 16px; transform: translateY(-160%); background: var(--white); color: var(--navy); }
.skip-link:focus { transform: translateY(0); }
.admin-header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-inline: max(24px, calc((100% - 1160px)/2)); background: var(--white); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); }
.brand-copy { display: grid; line-height: 1.3; }
.brand-copy strong { font: 800 15px var(--font-heading); letter-spacing: .1em; }
.brand-copy small { color: var(--muted); font-size: 8px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
.back-link { color: var(--muted); font-size: 11px; font-weight: 600; }
.back-link:hover, .admin-footer a:hover { color: var(--teal-dark); }
.admin-main { width: min(1120px, calc(100% - 48px)); flex: 1; margin: 56px auto 60px; }
.admin-login { min-height: 430px; display: grid; grid-template-columns: 1fr .75fr; align-items: center; gap: 65px; padding: clamp(30px, 6vw, 68px); background: var(--white); box-shadow: var(--shadow); }
.admin-login h1, .dashboard-heading h1 { margin: 0 0 16px; color: var(--navy); font: 600 clamp(33px, 4.7vw, 47px)/1.15 var(--font-heading); letter-spacing: -.045em; }
.admin-login h1 em { color: var(--teal-dark); font-style: normal; }
.admin-login > div > p:not(.eyebrow), .dashboard-heading > div > p:last-child { max-width: 420px; color: var(--muted); font-size: 13px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; color: var(--teal-dark); font-size: 9px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow > span { width: 21px; height: 1px; background: currentColor; }
.form-card, .admin-card { padding: 28px; background: var(--white); box-shadow: var(--shadow); }
.form-card h2, .admin-card h2 { margin: 0 0 6px; color: var(--navy); font: 700 19px var(--font-heading); }
.form-card { display: grid; gap: 8px; }
.form-card label, .admin-card form label { margin-top: 7px; color: #42576a; font-size: 10px; font-weight: 700; }
.form-card input, .admin-card input:not([type="file"]), .admin-card select, .admin-card textarea { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #dfe5e9; border-radius: 2px; outline: none; background: var(--white); color: var(--ink); font-size: 11px; }
.admin-card textarea { min-height: 130px; resize: vertical; }
.form-card input:focus, .admin-card input:focus, .admin-card select:focus, .admin-card textarea:focus { border-color: var(--teal-dark); box-shadow: 0 0 0 3px rgba(79,156,137,.12); }
.admin-card input[type="file"] { min-height: auto; padding: 9px; background: #f9fbfb; font-size: 10px; }
.admin-card input[type="file"]::file-selector-button { margin-right: 12px; padding: 7px 9px; border: 0; background: #e9f3f0; color: var(--navy); font: 600 10px var(--font-body); cursor: pointer; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 11px; padding: 0 16px; border: 1px solid transparent; border-radius: 3px; font-size: 11px; font-weight: 700; cursor: pointer; transition: background .2s, transform .2s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .6; cursor: wait; transform: none; }
.button-primary { margin-top: 10px; background: var(--navy); color: var(--white); }
.button-primary:hover { background: #1a4565; }
.button-outline { border-color: #d9e1e6; background: var(--white); color: var(--navy); }
.button-outline:hover { background: #f7fafb; }
.status { margin: 0; color: #a34239; font-size: 10px; }
.status.is-success { color: #286c57; }
.status:empty { display: none; }
.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.dashboard-heading h1 { margin-bottom: 7px; font-size: clamp(31px, 4vw, 42px); }
.dashboard-heading .eyebrow { margin-bottom: 10px; }
.dashboard-heading > div > p:last-child { margin-bottom: 0; }
.dashboard-status { margin-bottom: 20px; padding: 12px 15px; border: 1px solid #b9dfd2; background: #edf8f4; color: #286c57; font-size: 11px; }
.dashboard-status.is-error { border-color: #e9c3bf; background: #fff4f2; color: #923d35; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
.admin-card { min-width: 0; }
.condominium-management { margin-bottom: 20px; }
.condominium-layout { display: grid; grid-template-columns: minmax(250px, .8fr) 1.2fr; gap: 32px; }
.condominium-layout form { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 7px; }
.condominium-layout h3, .condominium-list-panel h3, .user-management-layout h3 { margin: 0 0 7px; color: var(--navy); font: 700 14px var(--font-heading); }
.condominium-layout form label { margin-top: 5px; color: #42576a; font-size: 10px; font-weight: 700; }
.condominium-layout form label span { color: var(--muted); font-weight: 400; }
.condominium-layout form input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #dfe5e9; border-radius: 2px; outline: none; background: var(--white); color: var(--ink); font-size: 11px; }
.condominium-layout form input:focus { border-color: var(--teal-dark); box-shadow: 0 0 0 3px rgba(79,156,137,.12); }
.condominium-form-actions, .condominium-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.condominium-actions { justify-content: flex-end; white-space: nowrap; }
.condominium-form-actions .button { margin-top: 10px; }
.condominium-list-panel { min-width: 0; }
.condominium-list-panel .managed-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
.condominium-tax-code { letter-spacing: .05em; }
.user-management { margin-bottom: 20px; }
.resident-export { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 1.2fr); align-items: end; gap: 24px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.resident-export h3 { margin: 0 0 5px; color: var(--navy); font: 700 14px var(--font-heading); }
.resident-export .card-description { margin: 0; }
.resident-export form { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; align-items: end; gap: 10px; }
.resident-export form > div { display: grid; gap: 5px; }
.resident-export form label { color: #42576a; font-size: 10px; font-weight: 700; }
.resident-export form .status { grid-column: 1 / -1; }
.resident-export form .button { min-height: 44px; }
.pending-requests { margin-bottom: 20px; }
.table-scroll { width: 100%; overflow-x: auto; }
.requests-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 10px; }
.requests-table th, .requests-table td { padding: 11px 9px; border-top: 1px solid #edf0f2; vertical-align: middle; }
.requests-table th { color: var(--muted); font-size: 9px; font-weight: 700; white-space: nowrap; }
.requests-table td { color: var(--ink); }
.requests-table .empty-message, .requests-table .loading-message { padding-block: 16px; }
.contact-requests-table { min-width: 760px; }
.contact-requests-table td:nth-child(1) { min-width: 170px; overflow-wrap: anywhere; }
.contact-requests-table td:nth-child(4) { min-width: 220px; white-space: pre-wrap; overflow-wrap: anywhere; }
.contact-requests-table td:nth-child(4) small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; }
.contact-request-complete { min-height: 34px; padding-inline: 10px; font-size: 9px; white-space: nowrap; }
.contact-request-reply { display: grid; gap: 6px; min-width: 190px; }
.contact-request-reply textarea { min-height: 72px; padding: 8px; font-size: 10px; }
.payments-table { min-width: 760px; }
.payments-table td:nth-child(3) { min-width: 180px; overflow-wrap: anywhere; }
.payments-table td:nth-child(5) { white-space: nowrap; }
.payment-management { margin-top: 20px; }
.payment-actions { display: flex; gap: 6px; white-space: nowrap; }
.payment-edit-button { min-height: 31px; padding: 0 9px; font-size: 9px; }
.payment-list-status { margin-top: 10px; }
.accounting-management { margin-top: 20px; }
.accounting-filters { display: grid; grid-template-columns: minmax(220px, 1fr) 180px; align-items: end; gap: 12px; margin: 20px 0; }
.accounting-filters > div { display: grid; gap: 5px; }
.accounting-filters label, .accounting-subsection form label { color: #42576a; font-size: 10px; font-weight: 700; }
.accounting-filters input, .accounting-filters select, .accounting-subsection form input, .accounting-subsection form select { width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid #dfe5e9; border-radius: 2px; background: var(--white); color: var(--ink); font-size: 11px; }
.accounting-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0 26px; }
.accounting-summary article { display: grid; gap: 5px; padding: 14px; border: 1px solid var(--line); background: #fbfcfc; }
.accounting-summary span { color: var(--muted); font-size: 9px; font-weight: 600; }
.accounting-summary strong { color: var(--navy); font: 700 18px var(--font-heading); overflow-wrap: anywhere; }
.accounting-subsection { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.accounting-subsection h3 { margin: 0 0 12px; color: var(--navy); font: 700 15px var(--font-heading); }
.accounting-subsection form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; align-items: end; }
.accounting-subsection form label { align-self: end; }
.accounting-subsection form label:not(:first-child) { margin-top: 6px; }
.accounting-form-actions { display: flex; gap: 8px; }
.accounting-subsection form > .status, .accounting-form-actions { grid-column: 1 / -1; }
.accounting-table { min-width: 850px; }
.accounting-table td:nth-child(4) { min-width: 220px; overflow-wrap: anywhere; }
.accounting-table td:nth-child(5) { white-space: nowrap; }
.accounting-table .payment-actions { gap: 6px; }
.payment-dialog { width: min(520px, calc(100% - 32px)); max-height: min(90vh, 760px); overflow-y: auto; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: var(--white); color: var(--ink); box-shadow: 0 24px 80px rgba(11,32,52,.24); }
.payment-dialog::backdrop { background: rgba(11,32,52,.55); }
.payment-dialog form { display: grid; gap: 7px; padding: 26px; }
.payment-dialog form label { margin-top: 5px; color: #42576a; font-size: 10px; font-weight: 700; }
.payment-dialog input, .payment-dialog select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #dfe5e9; border-radius: 2px; background: var(--white); color: var(--ink); font-size: 11px; }
.payment-dialog input:focus, .payment-dialog select:focus { border-color: var(--teal-dark); outline: none; box-shadow: 0 0 0 3px rgba(79,156,137,.12); }
.payment-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 8px; }
.request-actions { display: flex; gap: 6px; }
.button-approve { min-height: 31px; padding: 0 9px; background: #edf8f4; color: #286c57; font-size: 9px; }
.button-approve:hover { background: #dff1ea; }
.user-management-layout { display: grid; grid-template-columns: minmax(250px, .8fr) 1.2fr; gap: 32px; }
.user-management-layout form { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 7px; }
.user-management-layout form label { margin-top: 5px; color: #42576a; font-size: 10px; font-weight: 700; }
.user-management-layout form input, .user-management-layout form select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #dfe5e9; border-radius: 2px; outline: none; background: var(--white); color: var(--ink); font-size: 11px; }
.user-management-layout form input:focus, .user-management-layout form select:focus { border-color: var(--teal-dark); box-shadow: 0 0 0 3px rgba(79,156,137,.12); }
.user-list-panel { min-width: 0; }
.user-list-panel h3 { margin: 0 0 7px; color: var(--navy); font: 700 14px var(--font-heading); }
.form-hint { color: var(--muted); font-size: 9px; }
.user-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
.user-actions { display: grid; justify-items: end; gap: 8px; }
.user-password-reset { color: var(--navy); font-size: 9px; }
.user-password-reset summary { cursor: pointer; font-weight: 700; }
.user-reset-form { display: grid; grid-template-columns: minmax(100px, 1fr) auto; gap: 6px; margin-top: 7px; }
.admin-card .user-reset-form input { min-height: 32px; padding: 6px 8px; font-size: 9px; }
.user-reset-form .button { min-height: 32px; padding: 0 9px; font-size: 9px; }
.card-kicker { margin: 0 0 5px; color: var(--teal-dark); font-size: 8px; font-weight: 700; letter-spacing: .16em; }
.admin-card h2 { margin-bottom: 7px; }
.card-description { min-height: 36px; margin: 0 0 18px; color: var(--muted); font-size: 10px; line-height: 1.8; }
.admin-card form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; }
.admin-card .accounting-subsection form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-card form label { margin-top: 5px; }
.management-card { min-height: 200px; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.list-heading h2 { margin-bottom: 0; }
.button-refresh { min-height: 34px; padding-inline: 11px; font-size: 9px; }
.managed-list { display: grid; }
.managed-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid #edf0f2; }
.managed-icon { display: grid; place-items: center; width: 32px; height: 35px; background: #eff6f4; color: var(--teal-dark); }
.managed-copy { min-width: 0; display: grid; gap: 2px; }
.managed-copy strong { overflow-wrap: anywhere; color: #31495d; font-size: 10px; }
.managed-copy small { color: var(--muted); font-size: 9px; }
.managed-copy p { display: -webkit-box; overflow: hidden; margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.delete-button { min-height: 31px; padding: 0 9px; border: 1px solid #edd9d6; background: #fff8f7; color: #9d4b43; font-size: 9px; }
.delete-button:hover { background: #fff0ed; }
.loading-message, .empty-message { margin: 12px 0; color: var(--muted); font-size: 10px; }
.app-error { max-width: 620px; margin: 60px auto; padding: 20px; border: 1px solid #e9c3bf; background: #fff4f2; color: #923d35; font-size: 12px; }
.admin-footer { width: min(1120px, calc(100% - 48px)); display: flex; justify-content: space-between; gap: 20px; margin: 0 auto 19px; color: #8b99a4; font-size: 9px; }
.admin-footer a { color: var(--navy); }
@media (max-width: 760px) {
  .admin-main { margin-block: 35px 45px; }
  .admin-login { grid-template-columns: 1fr; gap: 25px; }
  .admin-grid { grid-template-columns: 1fr; }
  .condominium-layout { grid-template-columns: 1fr; gap: 27px; }
  .user-management-layout { grid-template-columns: 1fr; gap: 27px; }
  .dashboard-heading { align-items: flex-start; }
}
@media (max-width: 480px) {
  .admin-header { min-height: 68px; padding-inline: 16px; }
  .brand-copy strong { font-size: 13px; }
  .brand-copy small { font-size: 8px; }
  .back-link { font-size: 9px; }
  .admin-main, .admin-footer { width: calc(100% - 32px); }
  .admin-main { margin-top: 25px; }
  .admin-login { gap: 21px; padding: 26px 20px; }
  .admin-login h1 { font-size: 34px; }
  .form-card, .admin-card { padding: 21px 17px; }
  .dashboard-heading { gap: 10px; }
  .dashboard-heading h1 { font-size: 28px; }
  .dashboard-heading > .button { min-height: 38px; padding-inline: 10px; font-size: 9px; }
  .user-row { grid-template-columns: 28px minmax(0, 1fr); }
  .user-actions { grid-column: 2; justify-items: start; }
  .admin-footer { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
.admin-workspace { display: grid; grid-template-columns: 232px minmax(0, 1fr); align-items: start; gap: 22px; }
.admin-sidebar { position: sticky; top: 20px; min-width: 0; min-height: 430px; display: flex; flex-direction: column; padding: 20px 13px 15px; border-radius: 6px; background: linear-gradient(155deg, #102a43, #0b2034 78%); color: #eaf1f5; box-shadow: 0 18px 40px rgba(11, 32, 52, .16); }
.sidebar-label { margin: 4px 10px 15px; color: #8fa7b8; font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.admin-tabs { display: grid; gap: 5px; }
.admin-tab { min-height: 45px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #c0ced8; text-align: left; font-size: 11px; font-weight: 600; cursor: pointer; transition: background .18s, color .18s, border-color .18s; }
.admin-tab > span { width: 18px; color: #9bb1c0; text-align: center; font-size: 15px; }
.admin-tab > .sidebar-badge { width: 21px; height: 21px; flex: 0 0 21px; display: inline-grid; place-items: center; margin-left: auto; border-radius: 50%; background: #d84a42; color: #fff; font-size: 10px; font-weight: 700; }
.admin-tab > .sidebar-badge[hidden] { display: none; }
.admin-tab:hover, .admin-tab:focus-visible { outline: none; border-color: rgba(135, 199, 181, .2); background: rgba(255, 255, 255, .07); color: var(--white); }
.admin-tab.is-active { border-color: rgba(135, 199, 181, .17); background: rgba(135, 199, 181, .14); color: #fff; }
.admin-tab.is-active > span { color: var(--teal); }
.sidebar-caption { margin: auto 10px 0; padding-top: 25px; color: #829aaa; font-size: 8px; font-weight: 600; letter-spacing: .09em; }
.admin-tab-panels { min-width: 0; }
.admin-tab-panel { min-width: 0; }
.admin-tab-content { display: grid; gap: 20px; }
.overview-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { min-width: 0; display: grid; gap: 7px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); box-shadow: 0 8px 24px rgba(16, 42, 67, .04); }
.stat-card span { color: var(--muted); font-size: 9px; font-weight: 600; }
.stat-card strong { color: var(--navy); font: 700 25px/1.1 var(--font-heading); }
.settings-card { margin-bottom: 20px; }
.settings-card form { max-width: 520px; }
.settings-list { display: grid; gap: 0; margin: 5px 0 0; }
.settings-list > div { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(0, 1.3fr); gap: 15px; padding: 13px 0; border-top: 1px solid #edf0f2; }
.settings-list dt { color: #42576a; font-size: 10px; font-weight: 700; }
.settings-list dd { margin: 0; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.settings-list code { color: var(--navy); }
@media (max-width: 900px) {
  .admin-workspace { grid-template-columns: 190px minmax(0, 1fr); gap: 15px; }
  .overview-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resident-export { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .admin-workspace { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .admin-sidebar { position: static; min-height: 0; padding: 12px; }
  .sidebar-label, .sidebar-caption { display: none; }
  .admin-tabs { display: flex; overflow-x: auto; gap: 5px; padding-bottom: 1px; scrollbar-width: thin; }
  .admin-tab { min-height: 42px; flex: 0 0 auto; padding-inline: 11px; white-space: nowrap; }
  .admin-tab > span { width: auto; }
}
@media (max-width: 480px) {
  .overview-stats { gap: 8px; }
  .stat-card { padding: 13px 12px; }
  .stat-card strong { font-size: 22px; }
  .accounting-filters, .accounting-summary { grid-template-columns: 1fr; }
  .admin-card .accounting-subsection form { grid-template-columns: 1fr; }
  .accounting-subsection form > .status, .accounting-form-actions { grid-column: auto; }
  .resident-export form { grid-template-columns: 1fr; }
  .resident-export form .status { grid-column: auto; }
  .settings-list > div { grid-template-columns: 1fr; gap: 4px; }
}
