:root {
    --gov-blue-900: #163a5f;
    --gov-blue-800: #1d4b78;
    --gov-blue-700: #24598c;
    --gov-blue-600: #346aa0;
    --gov-gold-600: #c89b3c;
    --gov-gold-500: #d7b15c;
    --gov-green-700: #2e6f40;
    --gov-green-600: #3c8550;
    --gov-ink-900: #163a5f;
    --gov-ink-700: #5b6878;
    --gov-ink-500: #7a8797;
    --gov-line: #e5e7eb;
    --gov-surface: rgba(255, 255, 255, .84);
    --gov-surface-strong: #ffffff;
    --gov-hover: #eef4ff;
    --gov-bg: #f5f7fa;
    --gov-shadow: 0 10px 30px rgba(22, 58, 95, .08);
    --gov-shadow-soft: 0 4px 16px rgba(22, 58, 95, .05);
    --app-page-max-width: 1500px;
    --app-page-gutter: 0;
    --app-content-padding-y: 1.25rem;
    --app-content-padding-x: 1.5rem;
    --app-hero-background:
        linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(244, 248, 251, .94)),
        linear-gradient(135deg, rgba(221, 177, 75, .08), rgba(38, 130, 116, .06));
    --app-hero-border: 1px solid var(--gov-line);
    --app-hero-shadow: var(--gov-shadow);
    --app-font-size-base: 14px;
    --app-line-height-base: 1.45;
    --app-font-weight-normal: 400;
    --app-font-weight-medium: 500;
    --app-font-weight-semibold: 500;
}

html, body {
    color: var(--gov-ink-900);
    background:
        radial-gradient(circle at top left, rgba(200, 155, 60, .1), transparent 24rem),
        radial-gradient(circle at top right, rgba(22, 58, 95, .06), transparent 24rem),
        linear-gradient(180deg, var(--gov-bg) 0%, #f8fafc 100%);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: var(--app-font-size-base);
    line-height: var(--app-line-height-base);
    font-weight: var(--app-font-weight-normal);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a, .btn-link {
    color: var(--gov-blue-800);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--gov-ink-900);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.01em;
    font-weight: var(--app-font-weight-semibold);
    line-height: 1.2;
}

button,
.btn,
input,
select,
textarea,
label,
.form-label,
.form-control,
.form-select,
.input-group-text,
.table,
.table th,
.table td {
    font-weight: var(--app-font-weight-normal);
    font-family: inherit;
}

.btn,
.form-label,
th,
.table th,
.page-header-eyebrow,
.card-eyebrow,
.assessment-kicker,
.assessment-eyebrow,
.queue-status {
    font-weight: var(--app-font-weight-medium) !important;
}

.form-control,
.form-select,
input,
select,
textarea {
    font-size: 0.875rem !important;
    color: #334155 !important;
}

.form-label,
label {
    font-weight: 500 !important;
    color: #475569 !important;
    margin-bottom: 0.35rem !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #94a3b8 !important;
    box-shadow: 0 0 0 0.2rem rgba(148, 163, 184, 0.15) !important;
}

.ts-wrapper.form-select-sm .ts-control,
.ts-control {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    background: #fff !important;
    padding: 0.35rem 0.5rem !important;
    border-radius: 0.375rem !important;
    min-height: calc(1.5em + 0.7rem + 2px) !important;
    box-shadow: none !important;
}

.ts-control > input {
    font-family: inherit !important;
    font-size: 14px !important;
    color: #334155 !important;
}

.ts-wrapper.single .ts-control,
.ts-wrapper.single.input-active .ts-control {
    background: #fff !important;
}

.ts-dropdown {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 14px !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
    overflow: hidden !important;
}

.ts-dropdown .option,
.ts-dropdown .create {
    padding: 0.5rem 0.75rem !important;
}

.ts-dropdown .active {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}

.ts-wrapper.focus .ts-control {
    border-color: #94a3b8 !important;
    box-shadow: 0 0 0 0.2rem rgba(148, 163, 184, 0.15) !important;
}

table,
.table,
.data-grid,
.quickgrid-container {
    font-size: 13.5px;
    color: #334155;
    font-variant-numeric: tabular-nums;
}

.text-tabular,
.tabular-data,
.numeric-cell,
td {
    font-variant-numeric: tabular-nums !important;
}

.municipal-container {
    max-width: 100% !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

.desktop-form .row {
    --bs-gutter-y: 0.75rem !important;
    --bs-gutter-x: 1rem !important;
}

.desktop-form .form-group,
.desktop-form .mb-3 {
    margin-bottom: 0.75rem !important;
}

.table-desktop {
    margin-bottom: 0 !important;
}

.table-desktop th,
.table-desktop td {
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

.data-scroll-pane {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
}

.btn-primary {
    color: #fff;
    background-color: var(--gov-blue-700);
    border-color: var(--gov-blue-800);
    border-radius: 10px;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 .1rem white, 0 0 0 .25rem rgba(15, 99, 146, .24);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--gov-blue-800);
    border-color: var(--gov-blue-900);
}

.btn-success {
    color: #fff;
    background-color: var(--gov-green-700);
    border-color: var(--gov-green-700);
    border-radius: 10px;
}

.btn-success:hover,
.btn-success:focus {
    background-color: var(--gov-green-700);
    border-color: #155a53;
}

.btn-info {
    color: var(--gov-blue-900);
    background-color: var(--gov-hover);
    border-color: var(--gov-line);
    border-radius: 10px;
}

.btn,
button,
.dropdown-item,
.form-control,
.form-select,
.input-group-text,
.card,
.modal-content,
.alert,
.list-group-item,
.nav-link,
.page-container {
    border-radius: 10px;
}

.btn,
button,
.form-select,
.form-control,
select,
input {
    min-height: 2.2rem;
}

button:not(.btn-danger):not(.delete):not(.danger):focus-visible,
a:focus-visible {
    outline: 3px solid rgba(15, 99, 146, .22);
    outline-offset: 2px;
}

.button-primary,
.actions .save,
.record-actions .save,
.event-buttons .save,
.filters > button,
.toolbar > button {
    color: #fff !important;
    background: var(--gov-blue-700) !important;
    border-color: var(--gov-blue-800) !important;
    box-shadow: none !important;
}

.button-primary:hover,
.actions .save:hover,
.record-actions .save:hover,
.event-buttons .save:hover,
.filters > button:hover,
.toolbar > button:hover {
    background: var(--gov-blue-800) !important;
    border-color: var(--gov-blue-900) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--gov-blue-600);
    box-shadow: 0 0 0 .2rem rgba(15, 99, 146, .12);
}

.card {
    border-color: var(--gov-line);
    box-shadow: var(--gov-shadow);
    background: var(--gov-surface-strong);
}

.page-container,
.search-card,
.form-card,
.record-list,
.workspace > section,
.workspace > aside,
.dashboard-panel,
.summary-grid article,
.stats article,
.case-form,
.case-list,
.toolbar,
.law-note,
.selected-constituent,
.health-summary-grid .summary-box,
.table-responsive,
.list-group,
.alert,
.modal-content {
    border: 1px solid var(--gov-line);
    box-shadow: var(--gov-shadow-soft);
}

input,
select,
textarea,
.form-control,
.form-select {
    color: var(--gov-ink-900) !important;
    background: rgba(255, 255, 255, .9) !important;
    border-color: var(--gov-line) !important;
    border-radius: 10px !important;
    min-height: 2.2rem !important;
}

input:not([type="email"]):not([type="password"]):not([type="url"]):not([type="hidden"]),
textarea,
select,
.form-control:not([type="email"]):not([type="password"]):not([type="url"]),
.form-select {
    text-transform: uppercase;
}

input[type="email"],
input[type="password"],
input[type="url"],
input[type="hidden"],
.form-control[type="email"],
.form-control[type="password"],
.form-control[type="url"] {
    text-transform: none;
}

textarea,
textarea.form-control {
    min-height: 88px;
}

label,
.form-label,
.section-heading p,
.form-heading p,
.list-header p,
.empty,
small,
.text-muted {
    color: var(--gov-ink-700) !important;
}

.home-page,
.executive-dashboard,
.household-registration,
.users-page,
.barangay-page,
.maternal-page,
.ehr-page,
.imm-page,
.phc-page,
.eopt-page,
.duplicate-page,
.blotter-page,
.summons-page,
.ordinance-page,
.resolution-page,
.resident-page {
    width: 100% !important;
    max-width: var(--app-page-max-width) !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

.content > .home-page,
.content > .executive-dashboard,
.content > .household-registration,
.content > .users-page,
.content > .barangay-page,
.content > .maternal-page,
.content > .ehr-page,
.content > .imm-page,
.content > .phc-page,
.content > .eopt-page,
.content > .duplicate-page,
.content > .blotter-page,
.content > .summons-page,
.content > .ordinance-page,
.content > .resolution-page,
.content > .resident-page {
    padding: 0 !important;
}

.app-page-shell {
    width: 100%;
    max-width: var(--app-page-max-width);
    margin: 0 auto;
    padding-inline: var(--app-page-gutter);
}

.imm-hero,
.phc-hero,
.maternal-header,
.ehr-page > header,
.dashboard-header,
.barangay-header,
.users-header,
.registration-header,
.report-header,
.blotter-page > header,
.summons-page > header,
.ordinance-page > header,
.resolution-page > header {
    background: var(--app-hero-background) !important;
    border: var(--app-hero-border) !important;
    color: #112f55 !important;
    gap: .8rem !important;
    padding: 1.08rem !important;
    border-radius: 10px !important;
    box-shadow: var(--app-hero-shadow) !important;
}

.page {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: all .25s ease;
}

.content {
    flex: 1;
    overflow: auto;
    padding: 1rem 1.15rem 1.2rem;
    background:
        radial-gradient(circle at 0 0, rgba(200, 155, 60, .08), transparent 18rem),
        radial-gradient(circle at 100% 0, rgba(22, 58, 95, .06), transparent 24rem),
        linear-gradient(180deg, #f5f7fa, #f8fafc);
}

.sidebar {
    background: linear-gradient(180deg, #163a5f 0%, #143453 100%);
    box-shadow: 10px 0 28px rgba(22, 58, 95, .16);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 62px;
    padding: .72rem .82rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)),
        linear-gradient(90deg, rgba(200, 155, 60, .08), rgba(255, 255, 255, 0));
    backdrop-filter: blur(10px);
}

.sidebar-brand-block {
    display: flex;
    align-items: center;
    gap: .62rem;
    min-width: 0;
}

.sidebar-seal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.3rem;
    height: 2.3rem;
    color: #f8fbff;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .3), transparent 45%),
        linear-gradient(135deg, #c89b3c, #24598c);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: .8rem;
    box-shadow: 0 10px 20px rgba(7, 26, 45, .18);
    font-size: .96rem;
}

.sidebar-title-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-title {
    color: #f7fbff;
    font-size: .98rem;
    font-weight: 700;
    line-height: 1.1;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed + main {
    width: calc(100% - 72px);
}

.sidebar + main {
    width: calc(100% - 308px);
}

.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    color: #ecf6ff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: .72rem;
    transition: background-color .18s ease, transform .18s ease;
    flex: 0 0 auto;
    margin-left: auto;
}

.sidebar-header {
    gap: .75rem;
}

.sidebar-brand-block {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.sidebar-title-group {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.sidebar-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: .25rem;
}

.sidebar.collapsed .sidebar-title-group {
    display: none;
}

.brand-wordmark {
    display: inline-flex;
    align-items: center;
    gap: .08rem;
    max-width: 100%;
    color: #ffffff;
    font-size: var(--brand-wordmark-size, 1rem);
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1;
    text-shadow: 0 1px 2px rgba(7, 26, 45, .28);
    white-space: nowrap;
}

.brand-wordmark > span[aria-hidden="true"] {
    overflow: hidden;
    text-overflow: ellipsis;
}

.wordmark-o {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: calc(var(--brand-wordmark-size, 1rem) * 1.02);
    height: calc(var(--brand-wordmark-size, 1rem) * 1.02);
}

.wordmark-o img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(7, 26, 45, .3));
}

.top-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 3.8rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .98));
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 6px 18px rgba(22, 58, 95, .06);
    backdrop-filter: blur(16px);
}

.top-row-leading,
.page-title,
.page-title-copy,
.system-status,
.top-row-date,
.user-menu,
.user-menu-trigger,
.user-menu-dropdown,
.nav-shell,
.nav-menu,
.nav-submenu {
    display: flex;
}

.top-row-leading,
.page-title,
.nav-shell,
.nav-menu,
.nav-submenu {
    flex-direction: column;
}

.top-row-leading {
    align-items: center;
    gap: .7rem;
    min-width: 0;
    flex-direction: row;
}

.page-title {
    align-items: center;
    min-width: 0;
    gap: .58rem;
    color: #16385a;
    flex-direction: row;
}

.page-title-mark,
.top-row-date,
.user-avatar,
.entry-icon,
.footer-shield {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-title-mark {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    color: #fff;
    background: linear-gradient(135deg, #24598c, #163a5f);
    border-radius: 10px;
    font-size: .94rem;
}

.page-title-copy {
    min-width: 0;
}

.page-title-overline {
    color: #c89b3c;
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.page-title-description {
    overflow: hidden;
    font-size: .84rem;
    font-weight: 550;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #5b6878;
}

.system-status {
    align-items: center;
    gap: .45rem;
    min-width: 0;
    flex-wrap: wrap;
}

.system-status span {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    padding: .3rem .5rem;
    color: #234765;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    font-size: .66rem;
    font-weight: 600;
}

.top-row-date {
    gap: .5rem;
    margin-left: auto;
    padding: .4rem .62rem;
    color: #173b68;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: .74rem;
    font-size: .74rem;
    font-weight: 550;
    white-space: nowrap;
}

.top-row a,
.top-row .btn-link {
    white-space: nowrap;
    margin-left: 1.5rem;
    text-decoration: none;
}

.user-menu {
    position: relative;
    min-width: 0;
}

.user-menu .btn-link {
    display: flex;
    align-items: center;
    max-width: min(26rem, 32vw);
    padding: .28rem .42rem;
    color: #18385f;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.user-menu-trigger {
    align-items: center;
    min-width: 0;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(22, 58, 95, .06);
}

.user-menu-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-avatar {
    width: 1.75rem;
    height: 1.75rem;
    margin-right: .45rem;
    color: #fff;
    background: #24598c;
    border-radius: 50%;
}

.user-menu-dropdown {
    position: absolute;
    right: 0;
    margin-top: 10px;
    width: min(22rem, calc(100vw - 2rem));
    min-width: 260px;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(22, 58, 95, .12);
    overflow: hidden;
    z-index: 1000;
}

.user-menu-dropdown .dropdown-item {
    display: block;
    width: 100%;
    padding: .8rem 1rem;
    margin: 0;
    color: #18385f;
    background: #fff;
    border: 0;
    text-align: left;
    white-space: normal;
}

.nav-shell {
    height: calc(100vh - 72px);
    min-height: 0;
}

.nav-scrollable {
    flex: 1;
    min-height: 0;
    padding: .68rem .62rem .82rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.nav-menu {
    gap: .18rem;
}

.nav-section-label {
    margin: .9rem .62rem .34rem;
    color: rgba(230, 243, 250, .68);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.nav-entry,
.submenu-entry {
    position: relative;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-entry {
    gap: .56rem;
    width: 100%;
    min-height: 38px;
    padding: .4rem .56rem;
    overflow: hidden;
    color: rgba(247, 251, 255, .94);
    background: transparent;
    border: 0;
    border-radius: 9px;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    white-space: nowrap;
}

.nav-entry.active,
.nav-entry:hover,
.submenu-entry.active,
.submenu-entry:hover {
    color: #fff;
    background: rgba(255, 255, 255, .08);
    text-decoration: none;
}

.nav-entry.active::before {
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 0;
    width: 3px;
    content: "";
    background: #c89b3c;
    border-radius: 0 4px 4px 0;
}

.entry-icon {
    flex: 0 0 auto;
    width: 1.72rem;
    height: 1.72rem;
    color: rgba(248, 255, 251, .96);
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    font-size: .84rem;
}

.menu-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: .01em;
}

.toggle-chevron {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, .68);
    font-size: .58rem;
}

.nav-submenu {
    position: relative;
    gap: .1rem;
    margin: .12rem 0 .28rem 1.42rem;
    padding-left: .7rem;
}

.nav-submenu::before {
    position: absolute;
    top: .25rem;
    bottom: .25rem;
    left: 0;
    width: 1px;
    content: "";
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .18), rgba(199, 229, 197, .16));
}

.submenu-entry {
    gap: .42rem;
    min-height: 30px;
    padding: .28rem .46rem;
    color: rgba(243, 249, 255, .9);
    border-radius: 8px;
    font-size: .7rem;
    font-weight: 550;
}

.submenu-dot {
    position: absolute;
    left: -1rem;
    width: .42rem;
    height: .42rem;
    background: rgba(255, 255, 255, .22);
    border: 2px solid #0f4772;
    border-radius: 50%;
}

.nav-footer {
    display: flex;
    align-items: center;
    gap: .58rem;
    margin: .62rem;
    padding: .68rem;
    color: rgba(255, 255, 255, .72);
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: .95rem;
}

.footer-shield {
    width: 1.7rem;
    height: 1.7rem;
    color: #f8dfa0;
    background: rgba(248, 223, 160, .12);
    border-radius: .5rem;
}

@media (max-width: 640.98px) {
    .content {
        padding: 1rem;
    }

    .top-row {
        justify-content: space-between;
    }

    .top-row-leading {
        gap: .7rem;
    }

    .top-row a,
    .top-row .btn-link {
        margin-left: 0;
    }

    .system-status,
    .page-title-overline,
    .top-row-date span {
        display: none;
    }
}

@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        width: 308px;
        height: 100vh;
        position: sticky;
        top: 0;
        overflow: hidden;
        transition: width .25s ease;
        flex-shrink: 0;
    }

    .sidebar.collapsed {
        width: 72px;
    }

    main {
        flex: 1;
        min-width: 0;
    }

    .top-row {
        position: sticky;
        top: 0;
        z-index: 10;
    }
}

.imm-hero > i,
.phc-hero .hero-icon,
.maternal-header .header-icon,
.ehr-page > header > span,
.dashboard-header .header-icon,
.barangay-header .barangay-icon,
.users-header .header-icon,
.registration-header .header-icon,
.report-header .header-icon,
.blotter-page > header > span,
.summons-page > header > span,
.ordinance-page > header > span,
.resolution-page > header > span {
    display: grid !important;
    place-items: center !important;
    flex: 0 0 58px !important;
    width: 58px !important;
    height: 58px !important;
    padding: 0 !important;
    border-radius: 12px !important;
    color: #fff !important;
    background: var(--gov-blue-700) !important;
    box-shadow: none !important;
    font-size: 1.35rem !important;
}

.imm-hero small,
.phc-hero small,
.maternal-header .eyebrow,
.ehr-page > header small,
.dashboard-header .eyebrow,
.barangay-header .eyebrow,
.users-header .eyebrow,
.registration-header .eyebrow,
.report-header small,
.blotter-page > header small,
.summons-page > header small,
.ordinance-page > header small,
.resolution-page > header small {
    color: #b78313 !important;
    font-size: .7rem !important;
    font-weight: 800 !important;
    letter-spacing: .12em !important;
    text-transform: uppercase !important;
}

.imm-hero h1,
.phc-hero h1,
.maternal-header h1,
.ehr-page > header h1,
.dashboard-header h1,
.barangay-header h1,
.users-header h1,
.registration-header h1,
.report-header h1,
.blotter-page > header h1,
.summons-page > header h1,
.ordinance-page > header h1,
.resolution-page > header h1 {
    margin: .15rem 0 .2rem !important;
    color: #112f55 !important;
    font-size: 2rem !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

.imm-hero p,
.phc-hero p,
.maternal-header p,
.ehr-page > header p,
.dashboard-header p,
.barangay-header p,
.users-header p,
.registration-header p,
.report-header p,
.blotter-page > header p,
.summons-page > header p,
.ordinance-page > header p,
.resolution-page > header p {
    margin: 0 !important;
    color: #667085 !important;
    font-size: .78rem !important;
}

.dashboard-header .primary-action,
.barangay-header .new-household-button,
.users-header .new-user-button,
.report-header .print-button,
.blotter-page > header button,
.summons-page > header button,
.ordinance-page > header button,
.resolution-page > header button {
    min-height: 42px !important;
    padding: .65rem .9rem !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    font-size: .72rem !important;
    font-weight: 800 !important;
}

.dashboard-header .primary-action,
.quick-actions a,
.barangay-header .new-household-button,
.users-header .new-user-button,
.report-header .print-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.blotter-page label,
.summons-page label,
.ordinance-page label,
.resolution-page label,
.maternal-page label,
.ehr-page label,
.imm-page label,
.phc-page .top-fields label,
.phc-page .form-field,
.users-page .form-field,
.household-registration .form-field,
.resident-page .profile-content label {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.blotter-page input,
.blotter-page select,
.blotter-page textarea,
.summons-page input,
.summons-page select,
.summons-page textarea,
.ordinance-page input,
.ordinance-page select,
.ordinance-page textarea,
.resolution-page input,
.resolution-page select,
.resolution-page textarea,
.maternal-page input,
.maternal-page select,
.maternal-page textarea,
.ehr-page input,
.ehr-page select,
.ehr-page textarea,
.imm-page input,
.imm-page select,
.imm-page textarea,
.phc-page input,
.phc-page select,
.phc-page textarea,
.resident-page .profile-content .form-control,
.resident-page .profile-content .form-select,
.card .table .form-control.form-control-sm,
.card .table .form-select.form-select-sm,
.users-page .form-control,
.users-page .form-select {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 42px;
    box-sizing: border-box;
}

.card .table .form-control.form-control-sm,
.card .table .form-select.form-select-sm {
    min-width: 110px;
    min-height: 38px;
    font-size: .75rem;
}

input[type="checkbox"],
input[type="radio"],
.form-check-input {
    display: inline-block !important;
    width: 1rem !important;
    min-width: 1rem !important;
    max-width: 1rem !important;
    height: 1rem !important;
    min-height: 1rem !important;
    padding: 0 !important;
    margin: 0 .4rem 0 0 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
}

label > input[type="checkbox"],
label > input[type="radio"] {
    flex: 0 0 auto !important;
}

.blotter-page textarea,
.summons-page textarea,
.ordinance-page textarea,
.resolution-page textarea,
.maternal-page textarea,
.ehr-page textarea,
.imm-page textarea,
.phc-page textarea,
.resident-page .profile-content textarea.form-control {
    min-height: 90px;
}

/* Sidebar links require global rules because NavLink rendering and visited-link
   styles can otherwise override component-scoped colors. */
.sidebar .nav-entry,
.sidebar .nav-entry:link,
.sidebar .nav-entry:visited,
.sidebar .nav-entry:hover,
.sidebar .nav-entry:focus,
.sidebar .nav-entry:active,
.sidebar .submenu-entry,
.sidebar .submenu-entry:link,
.sidebar .submenu-entry:visited,
.sidebar .submenu-entry:hover,
.sidebar .submenu-entry:focus,
.sidebar .submenu-entry:active {
    color: #fff !important;
    text-decoration: none !important;
}

.sidebar .nav-section-label {
    color: rgba(255, 255, 255, .68) !important;
}

.sidebar .entry-icon {
    color: #fff !important;
    background: rgba(255, 255, 255, .13) !important;
}

.sidebar .submenu-entry > i {
    color: rgba(255, 255, 255, .9) !important;
}

.sidebar .nav-entry:hover,
.sidebar .nav-entry.active,
.sidebar .submenu-entry:hover,
.sidebar .submenu-entry.active {
    background: rgba(255, 255, 255, .1) !important;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Fluent 2 LGU normalization across older module CSS */
.dashboard-card,
.selected-constituent,
.resident-hero,
.profile-tab-card,
.profile-content-card,
.module-redirect-card,
.patient-search,
.ehr-card,
.setup-card,
.members-card,
.search-card,
.form-card,
.record-list,
.case-form,
.case-list,
.workspace > section,
.workspace > aside,
.toolbar,
.law-note,
.summary-grid article,
.stats article,
.identity-grid > div,
.record-item,
.contact-item,
.chat-window,
.chat-window header,
.record-form,
.record-form input,
.record-form select,
.record-form textarea {
    background-image: none !important;
}

.dashboard-card,
.selected-constituent,
.resident-hero,
.profile-tab-card,
.profile-content-card,
.module-redirect-card,
.patient-search,
.ehr-card,
.setup-card,
.members-card,
.search-card,
.form-card,
.record-list,
.case-form,
.case-list,
.workspace > section,
.workspace > aside,
.toolbar,
.law-note,
.record-form,
.chat-window {
    background: #fff !important;
    border: 1px solid var(--gov-line) !important;
    box-shadow: var(--gov-shadow-soft) !important;
}

.dashboard-card.blue,
.dashboard-card.green,
.dashboard-card.purple,
.dashboard-card.orange,
.dashboard-card.red,
.dashboard-card.gold,
.dashboard-card.teal {
    background: #fff !important;
    color: var(--gov-ink-900) !important;
    border: 1px solid var(--gov-line) !important;
}

.dashboard-card .dashboard-title,
.dashboard-card .dashboard-value,
.dashboard-card .dashboard-icon,
.dashboard-card i {
    color: var(--gov-ink-900) !important;
}

.dashboard-card .dashboard-icon,
.selected-constituent .constituent-icon,
.resident-hero .edit-profile-button,
.resident-hero .photo-wrap::after,
.section-icon,
.welcome-icon,
.chat-launcher,
.chat-window header,
.composer button,
.status-badge,
.record-status,
.tag.active-tag,
.tab-button.active,
.save-profile-button,
.module-redirect-card button,
.load-error button,
.confirm-purok-button,
.save-button,
.footer-save {
    background: var(--gov-blue-700) !important;
    color: #fff !important;
    border-color: var(--gov-blue-800) !important;
    box-shadow: none !important;
}

.member-icon,
.verified-tag,
.success-message,
.message.good,
.record-status.completed,
.membership.active,
.tag.verified-tag {
    background: rgba(46, 111, 64, .08) !important;
    color: var(--gov-green-700) !important;
    border-color: rgba(46, 111, 64, .18) !important;
}

.warning-count,
.clinical-notice,
.edit-actions,
.record-status.procurement,
.membership.inactive {
    background: rgba(200, 155, 60, .1) !important;
    color: #8a6823 !important;
    border-color: rgba(200, 155, 60, .24) !important;
}

.error-message,
.message.bad,
.load-error,
.confirm,
.record-status.delayed {
    box-shadow: none !important;
}

.tab-button:hover,
.record-item:hover,
.record-item.active,
.contact-item:hover,
.list-group-item:hover,
.submenu-entry:hover,
.nav-entry:hover {
    background: var(--gov-hover) !important;
}

.profile-breadcrumb a,
.tab-card-eyebrow,
.identity-label,
.constituent-copy > small,
.generated-label {
    color: var(--gov-gold-600) !important;
}

.resident-page,
.ehr-page,
.household-registration,
.selected-constituent,
.profile-content,
.record-form,
.case-form,
.setup-card,
.members-card,
.patient-search,
.ehr-card {
    color: var(--gov-ink-900) !important;
}

.chat-launcher {
    border-radius: 50% !important;
}

.chat-window header small,
.showcase-note,
.showcase-trust span,
.secure-label {
    color: inherit;
}

.header-icon,
.hero-icon,
.quick-icon,
.patient-avatar,
.resident-name i,
.module-redirect-card > i,
.profile-spinner,
.status-indicator.active,
.section-title > span:first-child,
.demographics-card > header > i,
.record-item.active .status-dot,
.scope-badge,
.header-status > span,
.new-household-button,
.add-row-button,
.save-button,
.footer-save {
    color: var(--gov-blue-700) !important;
}

.scope-badge,
.tab-card-active,
.row-count,
.code-badge,
.selected,
.patient-meta span,
.identity-details > span,
.constituent-meta span,
.quick-actions a,
.registration-steps,
.registration-footer,
.patient-information,
.demographics-card > header,
.form-section > header,
.history-card > header,
.filters,
.toolbar > div {
    background: #fff !important;
    border-color: var(--gov-line) !important;
}

.item.active,
.case-item.active,
.record-item.active,
.tab-button.active,
.section-index button.active {
    background: var(--gov-hover) !important;
    color: var(--gov-blue-900) !important;
    box-shadow: inset 3px 0 0 var(--gov-gold-600) !important;
}

.item.active i,
.case-item.active i,
.record-item.active i,
.tab-button.active i {
    color: var(--gov-blue-900) !important;
}

/* Shared module system based on the HHMembers treatment */
.page-container,
.content > article,
.app-page-shell {
    color: var(--gov-ink-900);
}

.search-card,
.form-card,
.record-list,
.records-card,
.dashboard-panel,
.patient-card,
.demographics-card,
.account-form-card,
.users-list-card,
.episodes-card,
.record-card,
.section-card,
.workspace > section,
.workspace > aside,
.maternal-workspace > aside,
.maternal-workspace > main,
.aics-workspace > aside,
.aics-workspace > section,
.pwd-workspace > aside,
.pwd-workspace > section,
.senior-workspace > aside,
.senior-workspace > section,
.mental-workspace > aside,
.mental-workspace > section,
.user-workspace > section {
    background: var(--gov-surface-strong) !important;
    border: 1px solid var(--gov-line) !important;
    border-radius: 14px !important;
    box-shadow: var(--gov-shadow-soft) !important;
}

.search-card,
.form-card,
.record-list,
.records-card,
.account-form-card,
.users-list-card,
.episodes-card,
.record-card,
.section-card,
.workspace > section,
.workspace > aside,
.maternal-workspace > aside,
.maternal-workspace > main,
.aics-workspace > aside,
.aics-workspace > section,
.pwd-workspace > aside,
.pwd-workspace > section,
.senior-workspace > aside,
.senior-workspace > section,
.mental-workspace > aside,
.mental-workspace > section,
.user-workspace > section {
    padding: 1.15rem !important;
}

.search-card > header,
.form-card > header,
.record-list > header,
.dashboard-panel > header,
.patient-card > header,
.demographics-card > header,
.records-card > header,
.section-card > .section-heading,
.card-heading,
.list-header,
.form-heading,
.service-heading,
.toolbar header,
.workspace header {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 1rem !important;
}

.search-card > header,
.form-card > header,
.record-list > header,
.dashboard-panel > header,
.patient-card > header,
.demographics-card > header,
.records-card > header,
.card-heading,
.list-header,
.form-heading {
    margin-bottom: 1rem !important;
}

.search-card h2,
.form-card h2,
.record-list h2,
.dashboard-panel h2,
.dashboard-panel h3,
.patient-card h2,
.demographics-card h2,
.records-card h2,
.card-heading strong,
.list-header h2,
.form-heading h2,
.section-heading h2,
.service-heading h2 {
    margin: 0 !important;
    color: var(--gov-ink-900) !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

.search-card p,
.form-card p,
.record-list p,
.dashboard-panel p,
.patient-card p,
.demographics-card p,
.records-card p,
.card-heading small,
.list-header p,
.form-heading p,
.section-heading p,
.toolbar p,
.workspace p {
    margin: 0 !important;
    color: var(--gov-ink-700) !important;
    font-size: .78rem !important;
}

.search-card small,
.form-card small,
.record-list small,
.dashboard-panel small,
.patient-card small,
.demographics-card small,
.records-card small,
.form-section > header small,
.card-heading .section-icon + span small,
.section-eyebrow,
.form-section-title > span,
.records-heading h2 + p {
    color: var(--gov-gold-600) !important;
    font-size: .68rem !important;
    font-weight: 800 !important;
    letter-spacing: .12em !important;
    text-transform: uppercase !important;
}

.search-card,
.toolbar,
.records-shell,
.status-stack,
.account-summary,
.summary-grid,
.dashboard-grid,
.maternal-summary-grid,
.dashboard-metrics,
.feature-grid,
.service-list,
.workspace,
.maternal-workspace,
.aics-workspace,
.pwd-workspace,
.senior-workspace,
.mental-workspace,
.user-workspace {
    margin-bottom: 1rem !important;
}

.toolbar,
.filters,
.members-toolbar,
.top-fields,
.form-actions,
.record-actions,
.toolbar-actions,
.embedded-actions {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: .75rem !important;
}

.toolbar,
.filters,
.members-toolbar {
    padding: 1rem 1.1rem !important;
    background: linear-gradient(180deg, rgba(238, 244, 255, .72), rgba(255, 255, 255, .98)) !important;
    border: 1px solid #dbe5f0 !important;
    border-radius: 14px !important;
}

.toolbar > div,
.filters > div,
.members-toolbar > div,
.search-panel,
.search-panel-wrap {
    min-width: 0;
}

.toolbar input,
.toolbar select,
.filters input,
.filters select,
.members-toolbar input,
.members-toolbar select,
.search-card input,
.search-card select,
.search-card textarea,
.form-card input,
.form-card select,
.form-card textarea,
.records-card input,
.records-card select,
.records-card textarea,
.account-form-card input,
.account-form-card select,
.account-form-card textarea,
.record-card input,
.record-card select,
.record-card textarea {
    min-height: 44px !important;
}

.form-field,
.field-grid > div,
.form-grid > label,
.demographic-grid > div,
.identity-grid > div,
.household-meta-item,
.patient-meta > span {
    display: flex !important;
    flex-direction: column !important;
    gap: .35rem !important;
}

.form-field label,
.field-grid label,
.form-grid label,
.top-fields label,
.demographic-grid small,
.patient-meta small,
.identity-grid small,
.household-meta-item span,
.form-label {
    color: var(--gov-ink-700) !important;
    font-size: .7rem !important;
    font-weight: 700 !important;
}

.form-section-title {
    display: flex !important;
    align-items: center !important;
    gap: .75rem !important;
    margin: 1rem 0 .8rem !important;
}

.form-section-title::after {
    content: "" !important;
    flex: 1 1 auto !important;
    height: 1px !important;
    background: linear-gradient(90deg, rgba(22, 58, 95, .16), rgba(22, 58, 95, .04)) !important;
}

.form-actions,
.record-actions,
.search-actions {
    justify-content: flex-end !important;
}

.table-responsive,
.table-wrap {
    border: 1px solid var(--gov-line) !important;
    border-radius: 12px !important;
    background: #fff !important;
}

table:not(.no-style),
.table {
    margin-bottom: 0 !important;
}

table thead th,
.table thead th {
    color: var(--gov-ink-700) !important;
    background: #f8fafc !important;
    font-size: .62rem !important;
    font-weight: 700 !important;
    letter-spacing: .04em !important;
    text-transform: uppercase !important;
    vertical-align: middle !important;
    padding: .48rem .58rem !important;
}

table tbody td,
.table tbody td {
    color: #475467 !important;
    font-size: .72rem !important;
    vertical-align: middle !important;
}

.notice,
.page-message,
.form-message,
.alert,
.validation-panel,
.unauthorized-panel,
.load-error {
    border-radius: 12px !important;
    box-shadow: none !important;
}

.notice,
.page-message,
.form-message,
.alert {
    padding: .9rem 1rem !important;
}

.validation-message,
.invalid-feedback {
    display: block !important;
    margin-top: .3rem !important;
    color: #b42318 !important;
    font-size: .72rem !important;
    font-weight: 600 !important;
}

.form-label b,
label b,
.required-note span,
.floating-field label span {
    color: #b42318 !important;
}

.workspace,
.maternal-workspace,
.aics-workspace,
.pwd-workspace,
.senior-workspace,
.mental-workspace,
.user-workspace {
    display: grid !important;
    gap: 1rem !important;
}

.dashboard-metrics,
.account-summary,
.summary-grid,
.stats,
.demographic-grid,
.field-grid,
.form-grid,
.name-grid {
    display: grid !important;
    gap: 1rem !important;
}

.dashboard-metrics,
.account-summary,
.summary-grid,
.stats {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.field-grid,
.form-grid,
.name-grid,
.demographic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.dashboard-metrics article,
.account-summary article,
.summary-grid article,
.stats article {
    min-height: 124px !important;
    padding: 1rem !important;
    border-radius: 14px !important;
}

.dashboard-metrics article span,
.account-summary article div,
.summary-grid article div {
    display: flex !important;
    flex-direction: column !important;
    gap: .2rem !important;
}

.dashboard-metrics article strong,
.account-summary article strong,
.summary-grid article strong,
.stats article strong {
    color: var(--gov-ink-900) !important;
    font-size: 1.6rem !important;
    line-height: 1.1 !important;
}

.dashboard-metrics article small,
.account-summary article small,
.summary-grid article small,
.stats article small {
    color: var(--gov-ink-700) !important;
    font-size: .72rem !important;
    font-weight: 700 !important;
}

.empty,
.empty-state,
.empty-users,
.loading-users {
    border-radius: 12px !important;
}

.empty-state,
.empty-users,
.loading-users,
.panel-empty {
    padding: 1rem !important;
    background: #f8fafc !important;
    border: 1px dashed #d0d5dd !important;
}

.record-tabs,
.maternal-section-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: .5rem !important;
    padding-bottom: .85rem !important;
    margin-bottom: 1rem !important;
    border-bottom: 1px solid rgba(22, 58, 95, .1) !important;
}

.record-tabs button,
.maternal-section-nav a,
.tab-button {
    min-height: 40px !important;
    padding: .55rem .8rem !important;
    border-radius: 10px !important;
    border: 1px solid var(--gov-line) !important;
    background: #fff !important;
    color: var(--gov-ink-900) !important;
    font-size: .74rem !important;
    font-weight: 700 !important;
}

.record-tabs button.active,
.maternal-section-nav a.active,
.tab-button.active {
    background: var(--gov-hover) !important;
}

.floating-field input,
.floating-field select,
.form-floating > .form-control,
.form-floating > .form-select {
    min-height: 44px !important;
    border-radius: 12px !important;
}

@media (max-width: 1100px) {
    .dashboard-metrics,
    .account-summary,
    .summary-grid,
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .field-grid,
    .form-grid,
    .name-grid,
    .demographic-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 700px) {
    .dashboard-metrics,
    .account-summary,
    .summary-grid,
    .stats,
    .field-grid,
    .form-grid,
    .name-grid,
    .demographic-grid {
        grid-template-columns: 1fr !important;
    }

    .toolbar,
    .filters,
    .members-toolbar,
    .form-actions,
    .record-actions,
    .search-actions,
    .top-fields {
        align-items: stretch !important;
    }

    .toolbar > *,
    .filters > *,
    .members-toolbar > *,
    .form-actions > *,
    .record-actions > *,
    .search-actions > *,
    .top-fields > * {
        width: 100% !important;
    }
}

.business-permit-page{display:grid;gap:.85rem;color:#173426}
.business-permit-page header{display:grid;grid-template-columns:auto 1fr;gap:.9rem;align-items:center;padding:1.15rem 1.3rem;border:1px solid #c8ddd1;border-radius:1.25rem;background:linear-gradient(135deg,#f9fcf7 0%,#eef8ff 50%,#f9fcfa 100%);box-shadow:0 12px 26px rgba(20,52,38,.06)}
.business-permit-page header>span{display:grid;place-items:center;width:3.25rem;height:3.25rem;border-radius:1rem;background:linear-gradient(135deg,#185f58,#2f8c72);color:#fff;font-size:1.35rem}
.business-permit-page header small{display:block;color:#486658;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.business-permit-page header h1{margin:.1rem 0;color:#173426;font-size:1.7rem;line-height:1.05}
.business-permit-page header p{margin:0;color:#456556;max-width:74ch}
.permit-tabs{display:flex;gap:.45rem;flex-wrap:wrap}
.permit-tab{border:1px solid #c8ddd1;background:#fff;color:#295444;border-radius:999px;padding:.55rem .9rem;font-weight:800;font-size:.92rem}
.permit-tab.active{background:#1f7a4f;color:#fff;border-color:#1f7a4f}
.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.9rem}
.stats article{display:flex;gap:.85rem;align-items:center;padding:1rem 1.1rem;background:#fff;border:1px solid #d9e6dd;border-radius:1.2rem}
.stats i{font-size:1.3rem;color:#1f7a4f}
.stats small{display:block;color:#607869}
.stats strong{font-size:1.25rem;color:#173426}
.toolbar{display:grid;grid-template-columns:minmax(0,1fr) 220px 120px;gap:.8rem}
.toolbar>div,.toolbar select,.toolbar button,.record-form input,.record-form select,.record-form textarea{border:1px solid #c9d8ce;border-radius:1rem;background:#fff}
.toolbar>div{display:flex;align-items:center;gap:.7rem;padding:0 .9rem}
.toolbar input{border:none;outline:none;width:100%;padding:.85rem 0;background:transparent}
.toolbar select,.toolbar button,.record-form input,.record-form select,.record-form textarea{padding:.82rem .95rem}
.toolbar button,.actions button{border:none;font-weight:800}
.toolbar button,.actions .save{background:linear-gradient(135deg,#1f7a4f,#1d6a88);color:#fff}
.workspace{display:grid;grid-template-columns:320px minmax(0,1fr);gap:1rem;align-items:start}
.workspace-single{grid-template-columns:minmax(0,1fr)}
.workspace-form-only{grid-template-columns:minmax(0,1fr)}
.applications-workspace{display:grid;grid-template-columns:minmax(260px,32%) minmax(0,1fr);gap:1rem;align-items:start}
.assessment-shell{display:grid;grid-template-columns:minmax(260px,31%) minmax(0,1fr);gap:1rem;align-items:start}
.assessment-detail-panel,.assessment-queue-panel{background:#fff;border:1px solid #d9e6dd;border-radius:1.15rem;box-shadow:0 12px 24px rgba(20,52,38,.05)}
.assessment-queue-panel{padding:.85rem;display:grid;gap:.65rem;max-height:calc(100vh - 220px);overflow:auto}
.assessment-detail-panel{position:relative;padding:1rem;display:grid;gap:.85rem}
.treasurer-shell{grid-template-columns:minmax(260px,31%) minmax(0,1fr)}
.treasurer-shell .assessment-queue-panel{order:1}
.treasurer-shell .assessment-detail-panel{order:2}
.assessment-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:.95rem 1rem;border:1px solid #dfe8e1;border-radius:1rem;background:linear-gradient(135deg,#f8fcfa 0%,#eef7f3 100%)}
.assessment-hero-copy{display:grid;gap:.18rem;min-width:0}
.assessment-hero-copy h3{margin:0;color:#173426;font-size:1.25rem;line-height:1.08}
.assessment-hero-copy p{margin:0;color:#567063}
.assessment-kicker,.assessment-eyebrow{display:inline-flex;align-items:center;font-size:.72rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#61786b}
.assessment-layout{display:grid;gap:.85rem}
.assessment-profile-card,.assessment-workspace-card,.assessment-results-card{border:1px solid #d9e6dd;border-radius:1rem;background:#fbfdfc}
.assessment-profile-card,.assessment-workspace-card{padding:.95rem 1rem}
.assessment-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding-bottom:.7rem;margin-bottom:.8rem;border-bottom:1px solid #e4ede6}
.assessment-card-header h4,.assessment-results-header h5{margin:0;color:#173426}
.assessment-profile-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.7rem}
.assessment-stat{display:grid;gap:.2rem;padding:.78rem .85rem;border:1px solid #dfe8e1;border-radius:.9rem;background:#fff;min-width:0}
.assessment-stat-wide{grid-column:1/-1}
.assessment-stat small,.assessment-total-card small{font-size:.7rem;font-weight:900;letter-spacing:.05em;text-transform:uppercase;color:#6c8276}
.assessment-stat strong{color:#173426;line-height:1.3;word-break:break-word}
.assessment-inline-select{width:100%;min-width:0}
.assessment-computation-panel{display:grid;gap:.75rem}
.assessment-input-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;align-items:end}
.assessment-gross-field{display:grid;gap:.3rem;min-width:0}
.assessment-total-card{display:grid;gap:.2rem;padding:.82rem .9rem;border:1px solid #dfe8e1;border-radius:.9rem;background:linear-gradient(180deg,#f9fcfa 0%,#f2f8f4 100%)}
.assessment-total-card strong{color:#173426;font-size:1.15rem;line-height:1}
.assessment-total-card span,.assessment-help-text,.assessment-results-header p{color:#5d7568;font-size:.8rem}
.assessment-run-button{padding:.72rem .95rem;border:none;border-radius:.85rem;background:linear-gradient(135deg,#1f7a4f,#1d6a88);color:#fff;font-weight:800}
.assessment-results-card{padding:.9rem 1rem}
.assessment-results-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding-bottom:.65rem;margin-bottom:.7rem;border-bottom:1px solid #e4ede6}
.assessment-lines-table{overflow:auto;border:1px solid #dfe8e1;border-radius:.9rem;background:#fff}
.assessment-lines-table table{width:100%;border-collapse:collapse}
.assessment-lines-table th,.assessment-lines-table td{padding:.55rem .65rem;border-bottom:1px solid #edf3f0;font-size:.78rem;vertical-align:top}
.assessment-lines-table th{background:#f7faf8;color:#61786b;font-size:.68rem;font-weight:900;letter-spacing:.05em;text-transform:uppercase}
.assessment-lines-table .amount-cell{text-align:right;font-weight:800;color:#173426}
.assessment-empty-state{display:grid;place-items:center;gap:.4rem;padding:1.6rem;border:1px dashed #c9d8ce;border-radius:.9rem;background:#f8fbf9;color:#5d7568;text-align:center}
.assessment-save-actions{padding-top:.35rem;border-top:1px solid #e4ede6}
.assessment-loading-overlay{position:absolute;inset:0;z-index:8;display:grid;place-items:center;padding:1.25rem;background:rgba(248,252,250,.82);backdrop-filter:blur(3px);border-radius:1.15rem}
.assessment-loading-card{display:grid;justify-items:center;gap:.45rem;min-width:min(22rem,100%);padding:1rem 1.1rem;border:1px solid #d9e6dd;border-radius:1rem;background:#fff;box-shadow:0 14px 28px rgba(20,52,38,.12);text-align:center}
.assessment-loading-card .spinner-border{width:2rem;height:2rem;color:#1f7a4f}
.assessment-loading-card strong{color:#173426;font-size:.95rem}
.assessment-loading-card span{color:#5d7568;font-size:.8rem}
.applications-queue,.application-review{background:#fff;border:1px solid #d9e6dd;border-radius:1.15rem;box-shadow:0 12px 24px rgba(20,52,38,.05)}
.applications-queue{padding:.85rem;display:grid;gap:.65rem;max-height:calc(100vh - 220px);overflow:auto}
.queue-header h3,.review-pane-header h3{margin:0;color:#173426}
.queue-header p,.review-pane-header p{margin:.2rem 0 0;color:#5d7568}
.queue-item{display:grid;grid-template-columns:auto 1fr auto;gap:.75rem;align-items:center;border:none;border-radius:.95rem;background:#f7faf8;padding:.8rem .85rem;text-align:left}
.queue-item.active{background:#ebf6ef;outline:2px solid #9fceb1}
.queue-item strong{display:block;color:#173426}
.queue-item small,.queue-item em{display:block;color:#5d7568;font-style:normal}
.queue-status{display:inline-flex;width:max-content;margin-top:.2rem;padding:.18rem .5rem;border-radius:999px;font-size:.74rem;font-weight:900}
.queue-status.new{background:#e8f5e9;color:#1c6b2a}
.queue-status.for-review{background:#fff3d9;color:#8a5b00}
.queue-status.incomplete{background:#fee4e2;color:#b42318}
.queue-status.re-submitted{background:#e0f2fe;color:#075985}
.queue-status.approved{background:#e7f3ee;color:#0e5c44}
.application-review{padding:1rem;display:grid;gap:.85rem}
.review-pane-header{display:flex;justify-content:space-between;gap:1rem;align-items:start;padding-bottom:.5rem;border-bottom:1px solid #e4ede6}
.review-pane-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem}
.review-pane-grid article,.review-card{border:1px solid #d9e6dd;border-radius:.95rem;background:#fbfdfc;padding:.8rem .9rem}
.review-pane-grid small{display:block;font-size:.74rem;font-weight:900;letter-spacing:.05em;text-transform:uppercase;color:#61786b}
.review-pane-grid strong{color:#173426}
.review-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}
.review-card h4{margin:0 0 .55rem;color:#234b3c}
.review-card p{margin:.3rem 0;color:#345546}
.review-expiration-row{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.expiry-badge{display:inline-flex;align-items:center;padding:.22rem .55rem;border-radius:999px;background:linear-gradient(135deg,#ff7a18,#ff3d00);color:#fff;font-size:.72rem;font-weight:900;letter-spacing:.03em;text-transform:uppercase;box-shadow:0 8px 18px rgba(255,61,0,.22)}
.review-card-full{grid-column:1/-1}
.review-actions{justify-content:flex-start}
.review-documents{display:grid;gap:.5rem}
.review-document-item{display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:.45rem .55rem;border-radius:.8rem;background:#f7faf8}
.review-map-block{display:grid;gap:.55rem;margin-top:.8rem;padding-top:.8rem;border-top:1px solid #e4ede6}
.review-map-header{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem;flex-wrap:wrap}
.review-map-header strong{color:#173426}
.review-map-header small{color:#5d7568}
.review-map-host{width:100%;height:260px;border:1px solid #d9e6dd;border-radius:.95rem;overflow:hidden;background:linear-gradient(180deg,#eef4f0 0%,#f7faf8 100%)}
.record-list,.record-form,.reports-placeholder{background:#fff;border:1px solid #d9e6dd;border-radius:1.15rem;box-shadow:0 12px 24px rgba(20,52,38,.05)}
.record-list{padding:.8rem;display:grid;gap:.65rem;max-height:calc(100vh - 250px);overflow:auto}
.record-form-wide{max-width:1180px;width:100%;margin:0 auto}
.applications-workspace .record-form-wide{max-width:none;margin:0}
.record-item{display:grid;grid-template-columns:auto 1fr auto;gap:.8rem;align-items:center;padding:.9rem;border:none;border-radius:1rem;background:#f7faf8;text-align:left}
.record-item.active{background:#ebf6ef;outline:2px solid #9fceb1}
.record-item strong{display:block;color:#173426}
.record-item small,.record-item em{display:block;color:#5d7568;font-style:normal}
.status-dot{width:.7rem;height:.7rem;border-radius:999px;background:#89a595;margin-top:.2rem}
.status-dot.new,.record-status.new{background:#e8f5e9;color:#1c6b2a}
.status-dot.for-evaluation,.record-status.for-evaluation{background:#fff3d9;color:#8a5b00}
.status-dot.for-evaluation,.queue-status.for-evaluation{background:#fff3d9;color:#8a5b00}
.status-dot.for-review,.record-status.for-review{background:#fff3d9;color:#8a5b00}
.status-dot.for-review,.queue-status.for-review{background:#fff3d9;color:#8a5b00}
.status-dot.incomplete,.record-status.incomplete{background:#fee4e2;color:#b42318}
.status-dot.incomplete,.queue-status.incomplete{background:#fee4e2;color:#b42318}
.status-dot.re-submitted,.record-status.re-submitted{background:#e0f2fe;color:#075985}
.status-dot.re-submitted,.record-status.re-submitted,.queue-status.re-submitted{background:#e0f2fe;color:#075985}
.status-dot.re-submission,.record-status.re-submission,.queue-status.re-submission{background:#e0f2fe;color:#075985}
.status-dot.approved,.record-status.approved{background:#e7f3ee;color:#0e5c44}
.status-dot.released,.record-status.released{background:#e7f3ee;color:#0e5c44}
.status-dot.for-assessment,.record-status.for-assessment,.queue-status.for-assessment{background:#e6f4ea;color:#166534}
.status-dot.assessment,.record-status.assessment,.queue-status.assessment{background:#dbeafe;color:#1d4ed8}
.status-dot.re-assess,.record-status.re-assess,.queue-status.re-assess{background:#ede9fe;color:#6d28d9}
.status-dot.for-assessment-approval,.record-status.for-assessment-approval,.queue-status.for-assessment-approval{background:#fef3c7;color:#92400e}
.status-dot.for-payment,.record-status.for-payment,.queue-status.for-payment{background:#dcfce7;color:#166534}
.record-form{padding:1rem;display:grid;gap:.8rem;background:linear-gradient(180deg,#fbfdfc 0%,#ffffff 100%)}
.form-title{display:flex;justify-content:space-between;gap:1rem;align-items:start;padding:.15rem 0 .35rem;border-bottom:1px solid #e4ede6}
.form-title h2{margin:0;color:#173426;font-size:1.3rem}
.form-title p{margin:.2rem 0 0;color:#577061;font-size:.93rem}
.record-status{padding:.45rem .75rem;border-radius:999px;font-weight:800;font-size:.82rem}
.review-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem}
.review-summary small{font-size:.72rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:#6b8175}
.summary-card{padding:.8rem .9rem;border:1px solid #d9e6dd;border-radius:.95rem;background:linear-gradient(180deg,#f9fcfa 0%,#f3f9f6 100%);display:grid;gap:.15rem}
.summary-card strong{color:#173426;font-size:.94rem;line-height:1.32}
fieldset{margin:0;padding:.9rem;border:1px solid #dfe8e1;border-radius:1rem;display:grid;gap:.75rem;background:linear-gradient(180deg,#ffffff 0%,#fbfdfc 100%)}
legend{padding:0 .45rem;font-weight:900;color:#234b3c;font-size:.96rem;letter-spacing:.01em}
.legend-inline{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap;width:100%}
.legend-checkbox{display:flex;align-items:center;gap:.55rem;font-weight:700;color:#295444}
.legend-checkbox input{width:1rem;height:1rem}
fieldset>label:first-of-type:not(.checkbox-field){margin-top:-.1rem}
label{display:grid;gap:.28rem;color:#295444;font-weight:700;font-size:.9rem}
input,select,textarea{font:inherit;color:#173426;box-shadow:inset 0 1px 2px rgba(13,36,27,.03)}
input::placeholder,textarea::placeholder{color:#8aa092}
select,input,textarea{transition:border-color .15s ease, box-shadow .15s ease, background-color .15s ease}
select:focus,input:focus,textarea:focus{outline:none;border-color:#63a886;box-shadow:0 0 0 3px rgba(99,168,134,.14)}
textarea{min-height:82px;resize:vertical}
.remarks{min-height:105px}
.grid.one,.grid.two,.grid.three,.grid.four{display:grid;gap:.7rem}
.grid.one{grid-template-columns:minmax(0,1fr)}
.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.grid.three.psic-search-row{grid-template-columns:minmax(0,1fr) auto}
.psic-search-row>label{width:100%;min-width:0}
.psic-search-row>label input{width:100%}
.psic-search-row>.inline-actions{justify-content:flex-end}
.inline-actions{display:flex;align-items:end}
.inline-upload-card{display:flex;align-items:stretch}
.inline-upload-card .document-card{height:100%}
.minor-button{border:none;border-radius:.8rem;padding:.72rem .95rem;background:#eef4f0;color:#294437;font-weight:800}
.resident-search-panel{display:grid;gap:.5rem;padding:.75rem;border:1px dashed #c9d8ce;border-radius:.95rem;background:#f8fbf9}
.resident-option{border:none;border-radius:.8rem;padding:.7rem .8rem;background:#fff;text-align:left;color:#173426;font-weight:700}
.resident-option.active{background:#ebf6ef;outline:2px solid #9fceb1}
.resident-placeholder{color:#5d7568;padding:.15rem 0;font-size:.9rem}
.psic-dropdown{min-height:15rem;background:#fff}
.checkbox-field{display:flex;align-items:center;gap:.55rem}
.checkbox-field span,.checkbox-field h3{margin:0}
.legend-checkbox h3{font-size:.92rem;font-weight:900;color:#234b3c}
.document-card{display:grid;gap:.45rem;padding:.85rem;border:1px solid #d9e6dd;border-radius:.95rem;background:#f8fbf9}
.document-card.missing{border-color:#efb6af;background:linear-gradient(180deg,#fff8f7 0%,#fffdfc 100%)}
.document-heading{display:flex;align-items:center;justify-content:space-between;gap:.6rem;flex-wrap:wrap}
.document-card strong{color:#173426;font-size:.92rem}
.document-badge{padding:.2rem .5rem;border-radius:999px;font-size:.72rem;font-weight:900;letter-spacing:.03em;text-transform:uppercase}
.document-badge.required{background:#fff3d9;color:#8a5b00}
.document-badge.optional{background:#eef4f0;color:#456556}
.document-progress{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem}
.document-progress-card{padding:.75rem .85rem;border:1px solid #d9e6dd;border-radius:.9rem;background:linear-gradient(180deg,#f9fcfa 0%,#f2f8f4 100%);display:grid;gap:.15rem}
.document-progress-card small{font-size:.74rem;font-weight:900;letter-spacing:.05em;text-transform:uppercase;color:#61786b}
.document-progress-card strong{font-size:1.05rem;color:#173426}
.document-toolbar{display:flex;justify-content:flex-end;gap:.55rem;flex-wrap:wrap}
.document-group{border:1px solid #d9e6dd;border-radius:.95rem;background:#fbfdfc;padding:.2rem .75rem .75rem}
.document-group summary{cursor:pointer;list-style:none;font-weight:900;color:#234b3c;padding:.65rem 0;display:flex;align-items:center;justify-content:space-between;gap:.75rem}
.document-group summary::-webkit-details-marker{display:none}
.document-group[open] summary{padding-bottom:.55rem}
.document-group summary span{font-size:.8rem;font-weight:800;color:#5d7568;background:#eef4f0;border-radius:999px;padding:.22rem .55rem}
.document-upload-label{display:grid;gap:.45rem}
.document-upload-label span{font-weight:800;color:#295444}
.document-warning{padding:.8rem .9rem;border:1px solid #f4c97a;border-radius:.9rem;background:#fff9eb;color:#8a5b00;font-weight:700}
.document-meta{font-size:.84rem;color:#5d7568}
.document-meta.pending{color:#8a5b00;font-weight:700}
.document-actions{display:flex;align-items:center;justify-content:space-between;gap:.6rem;flex-wrap:wrap}
.document-status{font-size:.84rem;color:#5d7568}
.document-status.pending{color:#8a5b00;font-weight:700}
.document-link{color:#1d6a88;font-weight:800;text-decoration:none}
.document-link:hover{text-decoration:underline}
.document-clear{border:none;border-radius:.7rem;padding:.45rem .7rem;background:#eef4f0;color:#294437;font-weight:800;font-size:.82rem}
.actions{display:flex;gap:.6rem;justify-content:flex-end;position:sticky;bottom:0;background:linear-gradient(180deg,rgba(255,255,255,.15) 0%,rgba(255,255,255,.95) 18%,#fff 100%);padding-top:.35rem}
.actions button{padding:.72rem 1rem;border-radius:.82rem}
.actions .secondary{background:#eef4f0;color:#294437}
.actions .delete,.confirm .danger{background:#b42318;color:#fff}
.confirm{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.85rem .95rem;background:#fff7f7;border:1px solid #f0c3bf;border-radius:.95rem}
.confirm small{display:block;color:#7b5a5a}
.confirm button{border:none;border-radius:.85rem;padding:.75rem .95rem;font-weight:800}
.empty{display:grid;place-items:center;gap:.5rem;padding:2rem;color:#5d7568}
.reports-placeholder{padding:1.3rem}
@media (max-width:1100px){.workspace,.applications-workspace,.assessment-shell,.treasurer-shell{grid-template-columns:1fr}.record-list,.applications-queue,.assessment-queue-panel{max-height:none}.document-progress,.review-summary,.review-pane-grid,.review-sections,.stats,.grid.four,.grid.three,.grid.two,.toolbar{grid-template-columns:1fr}.form-title{align-items:flex-start}}
@media (max-width:1100px){.assessment-profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.assessment-input-row{grid-template-columns:1fr}.assessment-hero{flex-direction:column}}
@media (max-width:700px){.assessment-profile-grid{grid-template-columns:1fr}.assessment-card-header,.assessment-results-header{flex-direction:column;align-items:stretch}.assessment-run-button{width:100%}}
