:root {
    --muted: #5f6d63;
}

.brand-mark {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex: none;
    border-radius: 0;
    box-shadow: none;
}

.main-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #c8d8cd transparent;
    scrollbar-width: thin;
}

.main-nav::-webkit-scrollbar {
    width: 6px;
}

.main-nav::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background: #c8d8cd;
}

.nav-item {
    flex: 0 0 auto;
}

.nav-group {
    flex: 0 0 auto;
}

.nav-group-heading {
    width: 100%;
    text-align: left;
    cursor: pointer;
    list-style: none;
}

.nav-group-heading::-webkit-details-marker {
    display: none;
}

.nav-group-heading::after {
    width: 7px;
    height: 7px;
    flex: none;
    margin: 0 7px 3px auto;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    content: "";
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.nav-group[open] > .nav-group-heading::after {
    margin-bottom: -3px;
    transform: rotate(225deg);
}

.nav-subitems {
    padding-left: 12px;
}

.nav-subitem {
    min-height: 40px;
    font-size: 13px;
}

.nav-group[open] > .nav-group-heading {
    color: var(--green);
}

.field-error {
    display: block;
    margin-top: 4px;
    color: #a33b32;
    font-size: 13px;
}

.planning-activity-heading {
    margin-top: 24px;
}

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

.planning-activity-actions button {
    white-space: nowrap;
}

.planning-activities {
    display: grid;
    gap: 14px;
}

.planning-activity-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    min-width: 0;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.planning-activity-row legend {
    padding: 0 7px;
    color: var(--ink);
    font-weight: 700;
}

.planning-activity-row .full {
    grid-column: 1 / -1;
}

.planning-remove-activity {
    justify-self: start;
}

.light-brand .brand-mark {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex: none;
}

body {
    font-size: 16px;
    line-height: 1.5;
}

.planning-guide {
    display: grid;
    gap: 8px;
    margin: 0 0 22px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f5f8f6;
}

.planning-guide p,
.planning-guide small {
    margin: 0;
}

.planning-guide nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.planning-guide nav a {
    padding: 6px 10px;
    border-radius: 999px;
    background: #e6efe9;
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.planning-extra {
    margin: 18px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.planning-extra > summary,
.planning-activity-table [data-activity-details] summary {
    color: var(--ink);
    cursor: pointer;
    font-weight: 700;
}

.planning-extra > summary span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}

.planning-extra[open] > summary {
    margin-bottom: 14px;
}

.planning-section {
    margin-top: 24px;
}

.planning-activity-row > .planning-extra.full {
    grid-column: 1 / -1;
}

.planning-activity-row > .planning-extra.full .form-grid {
    margin-top: 14px;
}

.planning-activity-table-wrap {
    margin: 0;
}

.planning-activity-table {
    min-width: 1180px;
}

.planning-activity-table th,
.planning-activity-table td {
    padding: 8px;
    vertical-align: top;
}

.planning-activity-table td:first-child {
    width: 42px;
    text-align: center;
}

.planning-activity-table .form-control {
    min-width: 105px;
}

.planning-activity-table td:nth-child(2) .form-control {
    min-width: 220px;
}

.planning-activity-table td:nth-child(3) .form-control {
    min-width: 180px;
}

.planning-activity-table td:first-child span[data-row-number] {
    display: inline-block;
    padding-top: 4px;
}

.planning-activity-table [data-activity-details] > td {
    padding: 0 8px 10px;
}

.planning-activity-table [data-activity-details] details {
    padding: 8px 10px;
    border-radius: 8px;
    background: #f7f9f8;
}

.planning-activity-details {
    margin-top: 14px;
}

.planning-total-label {
    text-align: right !important;
}

.planning-paste-hint,
.planning-paste-status {
    margin: 8px 0;
    color: var(--muted);
    font-size: 13px;
}

.planning-paste-status:empty {
    display: none;
}

.planning-regional-note {
    white-space: pre-line;
}

.planning-regulation-form textarea {
    min-height: 100px;
    resize: vertical;
}

.sidebar-label,
.eyebrow {
    font-size: 14px;
}

.brand small {
    font-size: 14px;
}

.nav-item {
    min-height: 45px;
    font-size: 14px;
}

.nav-icon {
    font-size: 17px;
}

.help-card strong,
.profile-copy strong {
    font-size: 14px;
}

.help-card p,
.help-card a,
.profile-copy small {
    font-size: 14px;
}

.breadcrumb {
    font-size: 14px;
}

.today {
    font-size: 14px;
}

.nav-lock,
.avatar,
.small-avatar {
    font-size: 14px;
}

.page-heading h1 {
    font-size: 28px;
}

.page-heading p {
    font-size: 14px;
    line-height: 1.55;
}

.primary-button,
.secondary-button {
    min-height: 46px;
    padding: 10px 16px;
    font-size: 14px;
}

.welcome-tag {
    font-size: 14px;
}

.welcome-banner h2 {
    font-size: 24px;
}

.welcome-banner p {
    font-size: 15px;
}

.card-label,
.profile-detail,
.form-field > span,
.form-field > label {
    font-size: 14px;
}

.form-field small {
    font-size: 13px;
}

.metric-value {
    font-size: 27px;
}

.metric-note,
.module-card small,
.panel-heading p,
.section-title p,
.subscription-actions small {
    font-size: 14px;
}

.panel-heading h3,
.section-title h2 {
    font-size: 17px;
}

.workspace-note strong,
.subscription-info strong,
.module-card strong {
    font-size: 14px;
}

.workspace-note p,
.subscription-info p {
    font-size: 14px;
    line-height: 1.6;
}

.module-card {
    min-height: 118px;
    padding: 14px;
}

.status-pill,
.record-badge {
    font-size: 14px;
}

.alert,
.form-note,
.muted-copy,
.feature-overview p,
.feature-empty p,
.billing-plan-copy > p,
.billing-plan-copy ul {
    font-size: 14px;
    line-height: 1.65;
}

.form-field {
    gap: 8px;
}

.form-control {
    min-height: 46px;
    font-size: 15px;
}

.textarea-control {
    min-height: 90px;
}

.data-table th {
    font-size: 13px;
}

.data-table td {
    font-size: 14px;
}

.auth-form h2 {
    font-size: 24px;
    line-height: 1.25;
}

.auth-form > p {
    font-size: 15px;
    line-height: 1.6;
}

.auth-form .form-control {
    min-height: 48px;
}

.auth-switch,
.auth-features span,
.auth-foot,
.remember-row {
    font-size: 14px !important;
}

.auth-switch a {
    font-size: inherit;
}

.billing-price > strong {
    font-size: 29px;
}

.empty-state {
    font-size: 14px;
}

.logo-dropzone {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 152px;
    padding: 20px 22px;
    overflow: hidden;
    border: 1.5px dashed #b8cfc0;
    border-radius: 16px;
    background: linear-gradient(135deg, #f7fbf8 0%, #f1f7f2 100%);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.logo-dropzone:hover,
.logo-dropzone.is-dragging,
.logo-dropzone:focus-within {
    border-color: var(--green);
    background: #edf6ef;
    box-shadow: 0 0 0 4px rgba(23, 107, 75, .08);
}

.logo-dropzone.is-dragging {
    transform: scale(1.01);
}

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

.logo-drop-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid #dcebe0;
    border-radius: 14px;
    background: #fff;
    color: var(--green);
    box-shadow: 0 5px 14px rgba(23, 72, 45, .06);
}

.logo-drop-icon svg {
    width: 24px;
    height: 24px;
}

.logo-drop-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.logo-drop-copy strong {
    color: var(--ink);
    font-size: 15px;
}

.logo-drop-copy > span {
    color: var(--muted);
    font-size: 14px;
}

.logo-browse {
    color: var(--green);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.logo-drop-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.logo-preview {
    width: 96px;
    height: 96px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid #e1eae3;
    border-radius: 14px;
    background: #fff;
    color: #8a988e;
    text-align: center;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: 0 6px 18px rgba(23, 72, 45, .06);
}

.logo-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.logo-preview.has-image {
    padding: 8px;
}

.logo-drop-status {
    display: block;
    color: var(--green);
    font-size: 13px;
    font-weight: 600;
}

.logo-drop-status.is-error {
    color: #ad4d4d;
}

@media (max-width: 560px) {
    .logo-dropzone {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px;
    }

    .logo-drop-icon {
        width: 42px;
        height: 42px;
    }

    .logo-drop-copy {
        flex-basis: calc(100% - 60px);
    }

    .logo-preview {
        width: 80px;
        height: 80px;
        margin-left: auto;
    }
}

.text-link,
.billing-price > small,
.billing-price > p,
.auth-art-copy p {
    font-size: 14px;
}

.text-link {
    min-height: 40px;
}

.chart-label {
    font-size: 14px;
}

@media (max-width: 760px) {
    .page-heading h1 {
        font-size: 25px;
    }

    .planning-activity-actions {
        width: 100%;
    }

    .planning-activity-actions button {
        flex: 1 1 auto;
    }

    .welcome-banner h2 {
        font-size: 20px;
    }

    .page-content {
        padding: 20px 18px 34px;
    }

    .module-card {
        min-height: 116px;
    }
}

@media (max-width: 430px) {
    .card-label {
        font-size: 14px;
    }

    .page-heading > .primary-button {
        font-size: 14px;
        padding-inline: 11px;
    }
}

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

.official-stat {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
}

.official-stat-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    background: #edf5ef;
    color: var(--green);
    font-size: 20px;
}

.official-stat-icon.active-icon {
    background: #e9f5ec;
    color: #287449;
}

.official-stat-icon.inactive-icon {
    background: #f2f3f1;
    color: #78837b;
}

.official-stat small,
.official-stat strong {
    display: block;
}

.official-stat small {
    color: var(--muted);
    font-size: 13px;
}

.official-stat strong {
    margin-top: 4px;
    font: 700 22px Manrope, sans-serif;
}

.officials-panel {
    padding: 19px;
}

.official-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.official-search .search-box {
    min-width: 220px;
    max-width: 320px;
}

.official-search .search-box input {
    min-height: 46px;
    font-size: 14px;
}

.clear-search {
    padding: 8px;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
}

.officials-table {
    min-width: 840px;
}

.table-sub {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.official-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}

.official-status::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    content: '';
}

.official-status.active {
    background: #e8f5eb;
    color: #287449;
}

.official-status.inactive {
    background: #f0f1ef;
    color: #68736a;
}

.official-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sppd-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 9px;
    background: #edf6ef;
    color: var(--green);
    text-decoration: none;
}

.sppd-action:hover {
    background: #e1f0e5;
    color: var(--green-dark);
}

.sppd-action svg {
    width: 15px;
    height: 15px;
}

.official-actions form {
    margin: 0;
}

.table-action {
    border: 0;
    padding: 5px 0;
    background: transparent;
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.print-action {
    padding: 6px 12px;
    background: #edf6ef;
    border-radius: 9px;
    transition: background .16s ease, color .16s ease;
}

.print-action:hover {
    background: #e1f0e5;
    color: var(--green-dark);
}

.danger-action {
    color: #ad4d4d;
}

.table-icon-action {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border-radius: 9px;
    background: #edf6ef;
    color: var(--green);
    text-decoration: none;
    transition: background .16s ease, color .16s ease;
}

.table-icon-action:hover {
    background: #e1f0e5;
    color: var(--green-dark);
}

.table-icon-action.danger-action {
    background: #fff1f1;
    color: #ad4d4d;
}

.table-icon-action.danger-action:hover {
    background: #fde5e5;
    color: #953b3b;
}

.table-icon-action svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.officials-empty {
    padding: 48px 18px;
    text-align: center;
}

.officials-empty h2 {
    margin: 0 0 7px;
    font: 700 17px Manrope, sans-serif;
}

.officials-empty p {
    margin: 0 auto 17px;
    color: var(--muted);
    font-size: 14px;
}

.officials-empty .empty-symbol {
    margin-bottom: 14px;
}

.pagination-footer,
.pagination-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.planning-activity-row {
    grid-template-columns: minmax(0, 1fr);
}

.planning-activity-row .full {
    grid-column: auto;
}

.pagination-footer {
    padding-top: 15px;
    color: var(--muted);
    font-size: 13px;
}

.pagination-actions .secondary-button {
    min-height: 38px;
    padding: 7px 11px;
    font-size: 12px;
}

.pagination-actions .is-disabled {
    color: #9aa39c;
    cursor: not-allowed;
}

.official-form-panel {
    max-width: 860px;
}

@media (max-width: 760px) {
    .official-stats {
        gap: 8px;
    }

    .official-stat {
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }

    .official-stat-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .official-stat small {
        font-size: 12px;
    }

    .official-stat strong {
        font-size: 18px;
    }

    .officials-panel {
        padding: 14px;
    }

    .officials-panel > .panel-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 13px;
    }

    .official-search,
    .official-search .search-box {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .official-search .secondary-button {
        flex: 0 0 auto;
    }

    .pagination-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 430px) {
    .official-stat {
        flex-direction: column;
    }

    .official-stat small {
        font-size: 11px;
    }
}

.official-photo-upload {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border: 1.5px dashed #b8cfc0;
    border-radius: 15px;
    background: linear-gradient(135deg, #f8fbf8, #f1f7f2);
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.official-photo-upload.is-dragging,
.official-photo-upload:focus-within {
    border-color: var(--green);
    background: #edf6ef;
    box-shadow: 0 0 0 4px rgba(23, 107, 75, .08);
}

.official-photo-preview {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: 50%;
    background: #e5f0e8;
    color: var(--green);
    box-shadow: 0 3px 12px rgba(23, 72, 45, .12);
    font: 700 30px Manrope, sans-serif;
}

.official-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.official-photo-copy {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
}

.official-photo-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.official-photo-button {
    min-height: 40px;
}

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

.official-photo-copy small {
    color: var(--muted);
    font-size: 13px;
}

.official-photo-copy small.photo-upload-error {
    color: #ad4d4d;
}

.official-identity {
    display: flex;
    align-items: center;
    gap: 11px;
}

.official-avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
}

.official-avatar-placeholder {
    background: #e5f0e8;
    color: var(--green);
    font: 700 16px Manrope, sans-serif;
}

@media (max-width: 560px) {
    .official-photo-upload {
        align-items: flex-start;
        gap: 14px;
        padding: 14px;
    }

    .official-photo-preview {
        width: 72px;
        height: 72px;
        font-size: 24px;
    }

    .official-photo-copy p {
        font-size: 13px;
    }
}

.resident-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.resident-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
}

.resident-stat small,
.resident-stat strong {
    display: block;
}

.resident-stat small {
    color: var(--muted);
    font-size: 13px;
}

.resident-stat strong {
    margin-top: 3px;
    font: 700 22px Manrope, sans-serif;
}

.resident-tools {
    margin-bottom: 15px;
    padding: 18px;
}

.resident-tools-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.resident-tools-heading h3,
.resident-list-panel h3 {
    margin: 0;
    font: 700 16px Manrope, sans-serif;
}

.resident-tools-heading p,
.resident-list-panel .panel-heading p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.resident-tool-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resident-import-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.resident-file-label {
    min-width: 260px;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}

.resident-file-label > span:first-child {
    font-size: 19px;
}

.resident-file-label input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.resident-import-form > small {
    flex: 1 0 100%;
    color: var(--muted);
    font-size: 12px;
}

.resident-list-panel {
    padding: 18px;
}

.resident-list-panel > .panel-heading {
    align-items: flex-start;
    gap: 15px;
}

.resident-filter-actions {
    display: flex;
    flex: none;
    align-items: center;
    gap: 8px;
}

.resident-active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: -2px 0 14px;
    color: var(--muted);
    font-size: 11px;
}

.resident-active-filters strong {
    color: var(--ink);
}

.resident-filter-chip {
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--canvas);
    color: var(--ink);
}

.resident-filter-open {
    flex: none;
}

.resident-filter-dialog {
    width: min(620px, calc(100% - 24px));
    max-width: none;
    max-height: min(88vh, 760px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 24px 80px rgba(15, 23, 42, .24);
}

.resident-filter-dialog::backdrop {
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
}

.resident-filter-form {
    display: flex;
    max-height: min(88vh, 760px);
    flex-direction: column;
}

.resident-filter-dialog-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
}

.resident-filter-dialog-heading h2 {
    margin: 0;
    color: var(--ink);
    font: 700 17px Manrope, sans-serif;
}

.resident-filter-dialog-heading p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.resident-filter-close {
    display: grid;
    width: 34px;
    height: 34px;
    flex: none;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
}

.resident-filter-dialog-body {
    display: grid;
    min-height: 0;
    flex: 1 1 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    overflow-y: auto;
    padding: 20px 22px;
}

.resident-filter-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 7px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
}

.resident-filter-field-full,
.resident-filter-help {
    grid-column: 1 / -1;
}

.resident-filter-help {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.resident-filter-result-count {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--canvas);
    color: var(--muted);
    font-size: 12px;
}

.resident-filter-result-count output {
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
}

.resident-filter-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 22px;
    border-top: 1px solid var(--line);
}

.resident-filter-dialog-actions > div {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.resident-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.resident-filters .search-box {
    min-width: 230px;
}

.resident-filters .search-box input {
    min-height: 44px;
    font-size: 13px;
}

.resident-filters .filter-select {
    width: auto;
    min-width: 150px;
    min-height: 44px;
    padding-right: 28px;
    font-size: 13px;
}

.residents-table {
    min-width: 1050px;
}

.resident-status {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.resident-status.active {
    background: #e8f5eb;
    color: #287449;
}

.resident-status.moved {
    background: #fff3e3;
    color: #9b671f;
}

.resident-status.deceased {
    background: #f0f1ef;
    color: #68736a;
}

.import-report {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    margin-bottom: 15px;
    border: 1px solid #d9ebde;
    border-radius: 10px;
    background: #eff8f1;
    color: #25643f;
}

.import-report.has-failures {
    border-color: #f0dfc2;
    background: #fff8ec;
    color: #815916;
}

.import-report strong {
    font-size: 14px;
}

.import-report p,
.import-report summary,
.import-report li {
    font-size: 13px;
}

.import-report p {
    margin: 3px 0 0;
}

.import-report summary {
    cursor: pointer;
    font-weight: 700;
}

.import-report ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.resident-form-panel {
    max-width: 1000px;
    padding: 22px;
}

.resident-form-section {
    padding: 19px 0;
    border-bottom: 1px solid var(--line);
}

.resident-form-section:first-child {
    padding-top: 4px;
}

.resident-form-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.resident-form-section-title > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 10px;
    background: #eaf4ed;
    color: var(--green);
    font: 700 13px Manrope, sans-serif;
}

.resident-form-section-title h2 {
    margin: 0;
    font: 700 16px Manrope, sans-serif;
}

.resident-form-section-title p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.resident-form-panel .form-grid {
    row-gap: 2px;
}

.resident-form-panel .form-actions {
    padding-top: 18px;
}

.family-count {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    background: #edf5ef;
    color: var(--green);
    font-size: 13px;
    font-weight: 700;
}

.families-table {
    min-width: 800px;
}

.family-search .search-box {
    min-width: 260px;
}

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

    .resident-list-panel > .panel-heading {
        flex-direction: column;
    }

    .resident-filter-actions {
        align-self: flex-end;
    }

    .resident-filters {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .resident-tools,
    .resident-list-panel,
    .resident-form-panel {
        padding: 14px;
    }

    .resident-tools-heading {
        flex-direction: column;
    }

    .resident-filter-actions {
        width: 100%;
        align-self: stretch;
    }

    .resident-filter-actions > button,
    .resident-filter-actions > a {
        flex: 1;
    }

    .resident-tool-links {
        width: 100%;
    }

    .resident-import-form {
        align-items: stretch;
        flex-direction: column;
    }

    .resident-file-label {
        min-width: 0;
    }

    .resident-import-form .primary-button {
        width: 100%;
    }

    .resident-filter-dialog-body {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .resident-filter-dialog-heading {
        padding: 16px;
    }

    .resident-filter-dialog-actions {
        align-items: stretch;
        flex-direction: column-reverse;
        padding: 14px 16px;
    }

    .resident-filter-dialog-actions > div,
    .resident-filter-dialog-actions > a {
        width: 100%;
    }

    .resident-filter-dialog-actions > div > button {
        flex: 1;
    }

    .resident-filters .search-box,
    .resident-filters .filter-select {
        width: 100%;
        min-width: 0;
    }

    .resident-filters .secondary-button {
        flex: 1;
    }

    .resident-form-section {
        padding: 15px 0;
    }

    .resident-form-section-title {
        align-items: flex-start;
    }
}

@media (max-width: 430px) {
    .resident-stats {
        gap: 7px;
    }

    .resident-stat {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
        padding: 11px;
    }

    .resident-stat small {
        font-size: 12px;
    }

    .resident-stat strong {
        font-size: 19px;
    }

    .resident-tool-links .secondary-button {
        flex: 1;
        padding-inline: 9px;
        font-size: 12px;
    }

    .resident-form-section-title h2 {
        font-size: 15px;
    }
}

/* Keep dense data and supporting text comfortable to read. */
.data-table th {
    font-size: 14px;
    line-height: 1.5;
}

.data-table td {
    font-size: 15px;
    line-height: 1.5;
}

.table-sub,
.resident-status,
.official-status,
.table-action,
.family-count,
.pagination-footer,
.clear-search,
.resident-stat small,
.resident-tools-heading p,
.resident-list-panel .panel-heading p,
.resident-file-label,
.resident-import-form > small,
.import-report p,
.import-report summary,
.import-report li,
.official-stat small,
.official-search .search-box input,
.official-photo-copy small,
.form-field small {
    font-size: 14px;
}

.admin-shell .admin-badge,
.admin-shell .admin-stat-label,
.admin-shell .admin-stat-card > small,
.admin-shell .admin-panel-heading p,
.admin-shell .admin-text-link,
.admin-shell .admin-table th,
.admin-shell .admin-table td,
.admin-shell .admin-cell-subtext,
.admin-shell .admin-status,
.admin-shell .admin-empty-state p,
.admin-shell .admin-search-form input,
.admin-shell .admin-search-form button,
.admin-shell .admin-search-form > a,
.admin-shell .admin-price-form label,
.admin-shell .admin-price-form > small,
.admin-shell .admin-info-card p,
.admin-shell .admin-info-card li,
.admin-shell .admin-note strong,
.admin-shell .admin-note p,
.admin-shell .admin-note a {
    font-size: 14px;
}

.inline-icon {
    display: inline-block;
    flex: 0 0 auto;
    vertical-align: -0.125em;
}

.inline-icon {
    display: inline-block;
    flex: 0 0 auto;
    vertical-align: -0.125em;
}

.admin-shell .admin-table th {
    line-height: 1.5;
}

.admin-shell .admin-table td {
    line-height: 1.5;
}

.admin-customer-actions {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.admin-customer-actions details {
    position: relative;
}

.admin-customer-actions summary {
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.admin-customer-actions .icon-summary {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    list-style: none;
    border: 1px solid #dfe7df;
    border-radius: 8px;
    background: #eaf4ed;
}

.admin-customer-actions .icon-summary::-webkit-details-marker {
    display: none;
}

.admin-customer-actions .icon-summary::marker {
    content: "";
}

.admin-customer-actions .icon-summary:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 2px;
}

.admin-customer-actions .icon-summary svg {
    display: block;
}

.admin-customer-actions .danger-summary {
    color: #ad4d4d;
}

.admin-customer-actions .danger-summary.icon-summary {
    border-color: #f0d6d4;
    background: #fff0ef;
}

.admin-customer-actions details form {
    position: absolute;
    z-index: 4;
    top: 25px;
    right: 0;
    width: 260px;
    display: grid;
    gap: 8px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(29, 53, 40, .14);
    white-space: normal;
}

.admin-customer-actions label,
.admin-user-form label,
.integration-fields label,
.report-filters label {
    display: grid;
    gap: 6px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

.admin-customer-actions input,
.admin-user-form input,
.admin-user-form select,
.integration-fields input,
.integration-fields select,
.report-filters input,
.report-filters select,
.admin-search-form select {
    min-height: 42px;
    width: 100%;
    border: 1px solid #dfe7df;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 14px;
}

.admin-action-button {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    border: 0;
    border-radius: 7px;
    padding: 8px 11px;
    background: #eaf4ed;
    color: #176b4b;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.whatsapp-button {
    justify-content: flex-start;
    gap: 6px;
    min-height: 30px;
    padding: 5px 9px;
    border: 1px solid #ccebd5;
    border-radius: 999px;
    background: #edfaf1;
    color: #128c48;
    font-size: 11px;
    line-height: 1;
    white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.admin-phone-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
}

.whatsapp-button:hover {
    border-color: #a8dbb6;
    background: #dcf5e4;
    color: #0d743b;
}

.whatsapp-button:focus-visible {
    outline: 2px solid #128c48;
    outline-offset: 2px;
}

.whatsapp-button svg {
    flex: none;
}

.admin-action-button.danger-button {
    background: #fff0ef;
    color: #a33f3f;
}

.admin-notifications {
    position: relative;
}

.admin-notification-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 6px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #526158;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
}

.admin-notification-toggle:hover,
.admin-notification-toggle[aria-expanded="true"] {
    border-color: #e3ebe4;
    background: #f5f8f5;
}

.admin-notification-toggle svg {
    width: 17px;
    height: 17px;
}

.admin-notification-count {
    display: inline-grid;
    place-items: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: #c64040;
    color: #fff;
    font-size: 9px;
    line-height: 1;
}

.admin-notification-panel {
    position: absolute;
    z-index: 8;
    top: calc(100% + 10px);
    right: 0;
    width: min(360px, calc(100vw - 24px));
    overflow: hidden;
    border: 1px solid #e4eae4;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(24, 45, 31, .18);
}

.admin-notification-panel[hidden],
.admin-notification-count[hidden],
.admin-notification-toast[hidden] {
    display: none;
}

.admin-notification-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 15px;
    border-bottom: 1px solid #edf1ed;
}

.admin-notification-heading strong {
    color: #24352b;
    font-size: 12px;
}

.admin-notification-heading small,
.admin-notification-empty {
    color: #78857c;
    font-size: 10px;
}

.admin-notification-list {
    max-height: 350px;
    overflow-y: auto;
}

.admin-notification-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f3f0;
    color: #58655c;
    text-decoration: none;
}

.admin-notification-item:last-child {
    border-bottom: 0;
}

.admin-notification-item:hover {
    background: #f7faf7;
}

.admin-notification-item strong {
    color: #24352b;
    font-size: 10px;
}

.admin-notification-item span {
    font-size: 10px;
}

.admin-notification-item small {
    color: #89958d;
    font-size: 9px;
}

.admin-notification-empty {
    margin: 0;
    padding: 18px 15px;
}

.admin-notification-toast {
    position: fixed;
    z-index: 30;
    top: 76px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: min(350px, calc(100vw - 24px));
    padding: 14px 16px;
    border: 1px solid #d5e8d9;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(24, 45, 31, .16);
    color: #526158;
}

.admin-notification-toast[hidden] {
    display: none;
}

.admin-notification-toast strong {
    color: #176b4b;
    font-size: 11px;
}

.admin-notification-toast span {
    font-size: 10px;
}

.report-filters,
.integration-fields,
.admin-user-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.report-filters {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    margin-bottom: 18px;
}

.report-filters .report-search,
.integration-fields .wide-field {
    grid-column: span 2;
}

.report-filters > a {
    padding: 10px 0;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
    text-decoration: none;
}

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

.integration-settings-form {
    display: grid;
    gap: 16px;
}

.integration-fields label > span,
.admin-user-form label small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}

.admin-user-form-panel {
    max-width: 760px;
}

.admin-user-form {
    align-items: start;
}

.admin-user-form .admin-primary-button {
    justify-self: start;
}

.admin-search-form select {
    width: 100%;
    min-width: 180px;
}

.support-mode-banner {
    position: sticky;
    top: 0;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 48px;
    margin-left: 246px;
    padding: 8px 22px;
    background: #fff3dc;
    color: #684812;
    font-size: 14px;
    font-weight: 700;
}

.support-mode-banner form {
    margin: 0;
}

.support-mode-banner button {
    min-height: 34px;
    border: 0;
    border-radius: 7px;
    padding: 6px 11px;
    background: #684812;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

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

@media (max-width: 760px) {
    .admin-customer-actions {
        flex-direction: column;
    }

    .admin-customer-actions details form {
        right: auto;
        left: 0;
    }

    .admin-notification-toggle {
        padding: 6px;
    }

    .admin-notification-toggle span:not(.admin-notification-count) {
        display: none;
    }

    .admin-notification-panel {
        right: -88px;
    }

    .admin-notification-toast {
        top: 66px;
        right: 12px;
    }

    .report-filters,
    .integration-fields,
    .admin-user-form {
        grid-template-columns: 1fr;
    }

    .report-filters .report-search,
    .integration-fields .wide-field {
        grid-column: auto;
    }

    .support-mode-banner {
        margin-left: 0;
        padding: 8px 14px;
    }
}

.auth-art {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    background-color: #174f3b;
    background-image:
        linear-gradient(135deg, rgba(10, 57, 39, 0.82), rgba(14, 70, 48, 0.78)),
        url('../images/background.jpeg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.auth-art .brand {
    gap: 12px;
}

.auth-art .brand > span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
}

.auth-art .brand strong {
    line-height: 1.05;
}

.auth-art .brand small {
    max-width: 320px;
    margin-top: 3px;
    font-size: clamp(13px, 1.05vw, 15px);
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.01em;
    text-wrap: balance;
}

.auth-form-side {
    place-items: center start;
    padding: clamp(24px, 5vw, 64px);
}

.auth-form {
    width: min(100%, 460px);
    margin: 0;
    text-align: left;
}

.auth-form h2,
.auth-form > p,
.auth-form .form-field,
.auth-form .remember-row,
.auth-form .auth-switch {
    text-align: left;
}

.auth-form > p {
    margin-bottom: 24px;
}

.auth-form .form-field {
    gap: 8px;
    margin-bottom: 16px;
}

.auth-form .form-field > span {
    line-height: 1.4;
}

.auth-form .form-control {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    border-radius: 10px;
}

.auth-form .auth-submit {
    min-height: 50px;
    margin-top: 8px;
}

.auth-form .auth-switch {
    margin-top: 14px !important;
}

@media (max-width: 800px) {
    .auth-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: 56px minmax(0, 1fr);
        align-items: start;
    }

    .auth-art {
        position: relative;
        display: flex;
        flex-direction: row;
        grid-column: 1;
        grid-row: 1;
        align-items: center;
        justify-content: flex-start;
        min-height: 56px;
        height: 56px;
        padding: 0 16px;
        background-position: center 42%;
    }

    .auth-art .brand {
        width: auto;
        gap: 9px;
    }

    .auth-art .brand-mark {
        width: 36px;
        height: 36px;
    }

    .auth-art .brand strong {
        font-size: 18px;
        line-height: 1.05;
    }

    .auth-art .brand small {
        max-width: none;
        margin-top: 1px;
        font-size: 10px;
        line-height: 1.15;
        white-space: nowrap;
    }

    .auth-art-copy,
    .auth-foot {
        display: none;
    }

    .auth-form-side {
        grid-column: 1;
        grid-row: 2;
        min-height: calc(100vh - 56px);
        place-items: start start;
        padding: 24px;
    }

    .auth-form {
        width: min(100%, 460px);
    }
}
