:root {
  --ink: #19352f;
  --muted: #62736e;
  --cream: #f6f8f4;
  --green: #176b55;
  --green-dark: #0f4f40;
  --gold: #c99a3d;
  --line: #dbe5df;
  --soft-green: #e7f3ed;
  --soft-gold: #fff8e8;
  --danger-bg: #fff0ee;
  --danger: #8b302a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: var(--ink); background: var(--cream); line-height: 1.6; }
a { color: var(--green); }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #e6b94f; outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: .6rem .9rem; background: var(--ink); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.site-header { display: flex; justify-content: space-between; align-items: center; padding: .85rem max(1.25rem, calc((100% - 1100px) / 2)); background: #fff; border-bottom: 1px solid var(--line); }
.menu-toggle { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-right: .7rem; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--green-dark); font-size: 1.35rem; line-height: 1; }
.menu-toggle:hover { background: var(--soft-green); }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--green); font-size: 1.1rem; font-weight: 700; text-decoration: none; letter-spacing: .02em; }
.brand strong { font-weight: 500; }
.brand-logo { display: block; width: 2.5rem; height: 2.5rem; max-width: 2.5rem; max-height: 2.5rem; flex: 0 0 auto; object-fit: contain; }
.login-logo { display: block; width: 4rem; height: 4rem; max-width: 4rem; max-height: 4rem; flex: 0 0 auto; object-fit: contain; }
.brand-mark { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 10px; background: var(--green); color: #fff; font-weight: 800; }
nav { display: flex; align-items: center; gap: 1.15rem; }
.nav-link, .link-button { color: var(--green); font-weight: 650; }
.nav-link { text-decoration: none; }
.inline-form { display: inline; }
button { border: 0; border-radius: 9px; background: var(--green); color: #fff; padding: .8rem 1rem; font: inherit; font-weight: 700; cursor: pointer; }
button:hover { background: var(--green-dark); }
.link-button { padding: .2rem 0; background: transparent; }
body.menu-open { overflow: hidden; }
.app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; width: min(19rem, 86vw); flex-direction: column; padding: 1rem; background: #fff; box-shadow: 12px 0 35px #071f1733; transform: translateX(-105%); transition: transform .22s ease; }
.app-sidebar.is-open { transform: translateX(0); }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 20; background: #071f1780; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .25rem .2rem 1rem; border-bottom: 1px solid var(--line); color: var(--green-dark); }
.sidebar-project-brand { display: inline-flex; align-items: center; gap: .55rem; min-width: 0; max-width: calc(100% - 3rem); overflow: hidden; }
.sidebar-project-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-sidebar .sidebar-project-logo { display: block; width: 2rem !important; height: 2rem !important; max-width: 2rem !important; max-height: 2rem !important; object-fit: contain; flex: 0 0 2rem; }
.sidebar-close { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border-radius: 9px; background: transparent; color: var(--green-dark); font-size: 1.7rem; line-height: 1; }
.sidebar-close:hover { background: var(--soft-green); }
.sidebar-nav { display: grid; gap: .35rem; margin-top: 1rem; }
.sidebar-link { display: flex; align-items: center; gap: .75rem; width: 100%; min-height: 3rem; padding: .7rem .8rem; border-radius: 10px; color: var(--ink); font-weight: 700; text-decoration: none; }
.sidebar-link:hover, .sidebar-link.is-active { background: var(--soft-green); color: var(--green-dark); }
.sidebar-link.is-active { box-shadow: inset 3px 0 0 var(--green); }
.sidebar-icon { display: inline-grid; place-items: center; width: 1.6rem; min-width: 1.6rem; color: var(--green); font-size: 1.1rem; font-weight: 800; }
.sidebar-logout { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line); }
.sidebar-logout-button { border: 0; background: transparent; font: inherit; cursor: pointer; text-align: left; }
.sidebar-logout-button:hover { background: var(--soft-green); }

.container { width: min(1100px, calc(100% - 2rem)); margin: 0 auto; padding: 3.5rem 0; min-height: calc(100vh - 126px); }
footer { text-align: center; padding: 1.2rem; color: var(--muted); font-size: .85rem; }
h1, h2, h3 { line-height: 1.2; }
h1 { margin: .25rem 0 .7rem; font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.04em; }
h2 { margin: .25rem 0 .5rem; font-size: 1.55rem; }
h3 { margin: .5rem 0 .25rem; }
.eyebrow { margin: 0; color: var(--gold); text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 800; }
.lead { max-width: 52ch; margin: 0; color: var(--muted); font-size: 1.08rem; }
.muted { color: var(--muted); }
.auth-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); gap: clamp(2rem, 7vw, 6rem); align-items: center; max-width: 990px; margin: 4vh auto; }
.auth-intro { padding: 1rem 0; }
.trust-note { display: flex; gap: .8rem; align-items: flex-start; max-width: 420px; margin-top: 2rem; padding: 1rem; border: 1px solid #d5e9de; border-radius: 12px; background: var(--soft-green); }
.trust-note strong { display: block; }
.trust-note p { margin: .15rem 0 0; color: var(--muted); font-size: .9rem; }
.trust-icon { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; }
.auth-card { padding: clamp(1.35rem, 4vw, 2rem); background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 14px 35px #19352f12; }
.auth-card-heading { display: flex; gap: .8rem; align-items: center; margin-bottom: 1.5rem; }
.auth-card h2 { margin: 0; }
.auth-card-heading p { margin: .2rem 0 0; font-size: .9rem; }
label { display: block; margin: 1rem 0 .35rem; font-weight: 650; }
input, select { width: 100%; min-height: 3rem; padding: .75rem .85rem; border: 1px solid #b9ccc2; border-radius: 8px; color: var(--ink); background: #fff; font: inherit; }
input[type="file"] { min-height: auto; padding: .65rem; cursor: pointer; }
.photo-upload-field { padding: 1rem; border: 1px dashed #8db7a5; border-radius: 12px; background: #f7fbf8; }
.photo-upload-field label { margin-top: 0; }
.required-mark { color: var(--danger); font-size: .82rem; font-weight: 600; }
.photo-preview { display: block; width: min(100%, 180px); aspect-ratio: 3 / 4; object-fit: cover; margin-top: .75rem; border-radius: 10px; border: 1px solid var(--line); }
.data-form input[type="radio"] { width: auto; min-height: auto; padding: 0; accent-color: var(--green); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%), linear-gradient(135deg, var(--green) 50%, transparent 50%); background-position: calc(100% - 1.1rem) 1.25rem, calc(100% - .8rem) 1.25rem; background-size: .3rem .3rem, .3rem .3rem; background-repeat: no-repeat; }
input:focus, select:focus { border-color: var(--green); }
.field-help { margin: .3rem 0 0; color: var(--muted); font-size: .8rem; }
.primary-button { width: 100%; margin-top: 1.4rem; }
.alert { margin: 1rem 0; padding: .8rem 1rem; border-radius: 8px; background: var(--danger-bg); color: var(--danger); }
.security-note { margin: 1.2rem 0 0; color: var(--muted); font-size: .8rem; text-align: center; }
.dashboard-hero-polished { position: relative; overflow: hidden; min-height: 255px; margin: -.5rem 0 1.25rem; padding: clamp(1.5rem, 4vw, 2.5rem); border: 0; border-radius: 20px; background: linear-gradient(120deg, #0f4f40 0%, #176b55 68%, #258365 100%); color: #fff; box-shadow: 0 16px 32px #19352f1c; }
.dashboard-hero-polished::after { position: absolute; right: -5rem; bottom: -8rem; width: 22rem; height: 22rem; border: 1px solid #ffffff30; border-radius: 50%; content: ""; box-shadow: 0 0 0 1.5rem #ffffff0c, 0 0 0 4rem #ffffff08; }
.dashboard-hero-copy { position: relative; z-index: 1; max-width: 650px; }
.dashboard-hero-polished .eyebrow { color: #e8be61; }
.dashboard-hero-polished h1 { max-width: 14ch; margin: .45rem 0 .8rem; color: #fff; font-size: clamp(2rem, 5vw, 3.4rem); letter-spacing: -.045em; line-height: 1.03; }
.dashboard-hero-polished .lead { max-width: 50ch; color: #d9eee1; line-height: 1.5; }
.dashboard-hero-meta { display: flex; align-items: center; gap: .8rem; margin-top: 1.35rem; }
.dashboard-hero-polished .status { color: #eefaf2; background: #ffffff1c; }
.hero-date { color: #cbe2d3; font-size: .84rem; }
.dashboard-emblem { position: absolute; z-index: 1; right: clamp(1.5rem, 8vw, 5rem); top: 50%; display: grid; place-items: center; width: 150px; height: 150px; transform: translateY(-50%) rotate(3deg); border: 1px solid #e8be6175; border-radius: 50%; color: #e8be61; background: #ffffff0b; }
.dashboard-emblem span { font-size: 2rem; font-weight: 800; letter-spacing: .16em; margin-left: .16em; }
.dashboard-emblem small { position: absolute; bottom: 2rem; color: #e0efe4; font-size: .53rem; letter-spacing: .04em; white-space: nowrap; }
.dashboard-emblem i { position: absolute; inset: .65rem; border: 1px dashed #e8be6160; border-radius: 50%; }
.dashboard-section-heading { margin-top: 2.1rem; }
.dashboard-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 2.5rem; }
.summary-allowance { border-color: #ead8a7; box-shadow: inset 3px 0 var(--gold); }
.feature-card-polished { min-height: 160px; padding: 1.3rem; }
.feature-card-polished h3 { margin-top: 1.35rem; }
.feature-icon-box { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; border-radius: 10px; color: var(--green); background: var(--soft-green); font-size: 1rem; font-weight: 800; }
.module-status-ready { color: var(--green); background: var(--soft-green); text-decoration: none; }
.quick-actions { display: grid; grid-template-columns: minmax(170px, .7fr) 1.3fr; gap: 1.5rem; align-items: start; margin-top: 2.5rem; padding: 1.3rem; border: 1px solid var(--line); border-radius: 14px; background: #fbfdfb; }
.quick-actions h2 { margin: .25rem 0 0; font-size: 1.25rem; }
.quick-action-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.quick-action-list a { display: flex; align-items: center; gap: .65rem; min-height: 78px; padding: .75rem; color: var(--ink); text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.quick-action-list a:hover { border-color: #a9cbbb; box-shadow: 0 6px 14px #19352f0d; }
.quick-action-list a > span:first-child { display: grid; place-items: center; flex: 0 0 auto; width: 1.8rem; height: 1.8rem; border-radius: 8px; color: var(--green); background: var(--soft-green); font-size: .8rem; font-weight: 800; }
.quick-action-list a > span:nth-child(2) { min-width: 0; }
.quick-action-list strong, .quick-action-list small { display: block; }
.quick-action-list strong { font-size: .82rem; }
.quick-action-list small { margin-top: .2rem; color: var(--muted); line-height: 1.25; font-size: .7rem; }
.quick-action-list b { margin-left: auto; color: var(--green); }
.status { display: inline-flex; align-items: center; gap: .45rem; color: var(--green); background: var(--soft-green); border-radius: 999px; padding: .45rem .8rem; white-space: nowrap; font-size: .9rem; font-weight: 650; }
.status-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #2b9b67; }
.summary-grid, .feature-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
.summary-grid { margin: 2rem 0 3.5rem; }
.summary, .feature-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.15rem; }
.summary-label { display: flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .85rem; }
.summary-icon { display: inline-grid; place-items: center; width: 1.55rem; height: 1.55rem; border-radius: 7px; color: var(--green); background: var(--soft-green); font-size: 1rem; font-weight: 800; }
.summary strong { display: block; margin: .15rem 0 .2rem; font-size: 1.1rem; overflow-wrap: anywhere; }
.summary small { color: var(--muted); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; }
.section-heading p:last-child { margin: 0; }
.page-kicker { display: flex; align-items: center; gap: .7rem; margin-bottom: .3rem; }
.privacy-chip { color: #527064; background: var(--soft-green); border-radius: 999px; padding: .25rem .6rem; font-size: .75rem; font-weight: 700; }
.page-header { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; }
.page-header .lead { margin-top: .2rem; }
.feature-grid { grid-template-columns: repeat(2, 1fr); margin-top: 1rem; }
.finance-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2rem; }
.finance-grid .feature-card { min-height: 190px; }
.finance-grid .secondary-action { display: inline-block; margin-top: 1rem; }
.finance-empty { margin-top: 2rem; }
.feature-card { min-height: 145px; transition: transform .18s ease, box-shadow .18s ease; }
.feature-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px #19352f12; }
.feature-card-link { display: block; color: inherit; text-decoration: none; }
.feature-card-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: .9rem; }
.feature-icon { color: var(--gold); font-size: 1.2rem; }
.module-status { color: #8b6b25; background: var(--soft-gold); border-radius: 999px; padding: .2rem .5rem; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.module-status-ready { color: #fff; background: var(--green); text-decoration: none; }
.children-table-wrap { margin-top: 1.25rem; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.children-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.children-table th, .children-table td { padding: .85rem 1rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.children-table th { color: var(--muted); background: var(--soft-green); font-size: .8rem; letter-spacing: .02em; }
.children-table tr:last-child td { border-bottom: 0; }
.child-name-link { font-weight: 700; }
.detail-page { max-width: 900px; margin: 0 auto; }
.back-link { display: inline-block; margin-bottom: 1.25rem; font-weight: 650; }
.child-detail-card { display: grid; grid-template-columns: minmax(160px, 220px) 1fr; gap: clamp(1.25rem, 4vw, 2.25rem); align-items: start; margin-top: 1.25rem; padding: clamp(1.1rem, 3vw, 1.5rem); background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.child-detail-photo, .child-photo-placeholder { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); background: var(--soft-green); }
.child-photo-placeholder { display: grid; place-items: center; padding: 1rem; color: var(--muted); text-align: center; }
.child-detail-content { padding-top: .35rem; }
.child-detail-content h1 { margin: .2rem 0 .65rem; font-size: clamp(1.55rem, 4vw, 2.15rem); }
.child-detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1.25rem; margin: 1.5rem 0; }
.child-detail-list div { padding-bottom: .65rem; border-bottom: 1px solid var(--line); }
.child-detail-list dt { color: var(--muted); font-size: .8rem; }
.child-detail-list dd { margin: .2rem 0 0; font-weight: 650; }
.child-detail-list .detail-wide { grid-column: 1 / -1; }
.child-detail-list .detail-wide dd { line-height: 1.55; }
.child-data-groups { display: grid; gap: 1rem; margin-top: 1rem; }
.child-data-group { padding: clamp(1.1rem, 3vw, 1.5rem); background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.child-data-group h2 { display: flex; align-items: center; gap: .55rem; margin: 0; font-size: 1.08rem; }
.child-data-group h2::before { width: .35rem; height: 1.2rem; border-radius: 999px; background: var(--gold); content: ""; }
.detail-empty-state { margin-top: 1rem; padding: 1rem; border: 1px dashed #b9ccc2; border-radius: 10px; background: #f7fbf8; color: var(--muted); }
.detail-empty-state p { margin: .25rem 0 0; }
.child-detail-actions { margin-top: 1rem; }
.children-filter-form { display: grid; gap: 1rem; }
.children-filter-grid { display: grid; grid-template-columns: 2fr repeat(4, minmax(0, 1fr)); gap: .85rem; }
.children-filter-grid label { margin: 0; }
.children-filter-actions { display: flex; align-items: center; gap: 1rem; }
.children-filter-actions .primary-button { width: auto; margin: 0; }
.children-filter-actions a { font-weight: 650; }
.children-toolbar label { margin: 0; flex: 1; }
.children-toolbar input { min-height: 2.8rem; }
.children-toolbar button { min-height: 2.8rem; white-space: nowrap; }
.children-toolbar-wrap { margin: 2rem 0 1rem; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.status-filters { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .9rem; }
.filter-pill { color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .35rem .75rem; text-decoration: none; font-size: .84rem; font-weight: 650; }
.filter-pill:hover, .filter-pill.is-selected { color: var(--green); background: var(--soft-green); border-color: #b7d9c8; }
.children-summary { display: flex; gap: .75rem; margin-top: 1.5rem; }
.children-summary div { display: flex; align-items: baseline; gap: .45rem; padding: .65rem .85rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.children-summary strong { color: var(--green); font-size: 1.2rem; }
.children-summary span { color: var(--muted); font-size: .82rem; }
.children-add-link { display: inline-flex; align-items: center; gap: .4rem; width: auto; margin: 0; padding: .7rem 1rem; text-decoration: none; }
.children-add-link span { font-size: 1.25rem; line-height: 1; }
.children-list { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.child-record { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.05rem 1.15rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.child-record-main { min-width: 0; }
.record-label { color: var(--muted); font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.child-record h2 { margin: .15rem 0 .2rem; font-size: 1.05rem; }
.child-record p { margin: 0; color: var(--muted); font-size: .9rem; }
.child-record p strong { color: var(--ink); }
.child-record-actions { display: flex; align-items: center; gap: .8rem; flex: 0 0 auto; }
.child-status { color: var(--green); background: var(--soft-green); border-radius: 999px; padding: .3rem .65rem; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.child-status-inactive { color: #806329; background: var(--soft-gold); }
.secondary-action { display: inline-block; color: var(--green); border: 1px solid #a9cabc; border-radius: 8px; padding: .42rem .7rem; text-decoration: none; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.secondary-action:hover { background: var(--soft-green); }
.empty-state { display: flex; align-items: center; gap: .9rem; padding: 1.35rem; border: 1px dashed #b9ccc2; border-radius: 12px; background: #fff; color: var(--muted); }
.empty-state h2 { margin: 0 0 .2rem; color: var(--ink); font-size: 1.05rem; }
.empty-state p { margin: 0; }
.empty-state .secondary-action { margin-left: auto; }
.empty-icon { display: grid; place-items: center; flex: 0 0 auto; width: 2.2rem; height: 2.2rem; border-radius: 10px; color: var(--green); background: var(--soft-green); font-size: 1.5rem; }
.form-page { max-width: 680px; margin: 0 auto; }
.data-form { margin-top: 1.5rem; padding: clamp(1.25rem, 4vw, 2rem); background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.form-field + .form-field { margin-top: 1rem; }
.field-error { margin: .3rem 0 0; color: var(--danger); font-size: .85rem; }
.form-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.form-actions .primary-button { width: auto; margin: 0; }
.demo-notice { display: flex; align-items: flex-start; gap: .75rem; margin-top: 2rem; padding: 1rem 1.15rem; border: 1px solid #ecd99f; border-radius: 12px; background: var(--soft-gold); }
.notice-icon { display: grid; place-items: center; flex: 0 0 auto; width: 1.5rem; height: 1.5rem; border: 2px solid var(--gold); border-radius: 50%; color: #8b6b25; font-weight: 800; }
.demo-notice p { margin: .25rem 0 0; color: var(--muted); }
.sidebar-group { display: block; }
.sidebar-subnav { display: grid; gap: .15rem; margin: -.15rem 0 .45rem 2.7rem; padding-left: .7rem; border-left: 1px solid #b7d9c8; }
.sidebar-sublink { padding: .35rem .5rem; color: var(--muted); text-decoration: none; font-size: .84rem; border-radius: 6px; }
.sidebar-sublink:hover, .sidebar-sublink.is-active { color: var(--green); background: var(--soft-green); font-weight: 700; }
.data-module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.data-module-card { display: flex; gap: .9rem; min-height: 155px; padding: 1.2rem; color: var(--ink); text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.data-module-card > span:last-child { display: flex; flex-direction: column; align-items: flex-start; }
.data-module-card strong { font-size: 1.1rem; }
.data-module-card > span:last-child > span { margin-top: .35rem; color: var(--muted); line-height: 1.45; font-size: .9rem; }
.data-module-card b { margin-top: auto; padding-top: .8rem; color: var(--green); font-size: .84rem; }
.allowance-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin-top: 1.5rem; }
.allowance-rule-grid > div { padding: 1rem 1.15rem; background: var(--soft-green); border: 1px solid #cfe4d7; border-radius: 12px; }
.allowance-rule-grid strong, .allowance-rule-grid span { display: block; }
.allowance-rule-grid span { margin-top: .25rem; color: var(--green); font-weight: 750; }
.allowance-form-panel { margin-top: 1.25rem; padding: 1rem 1.15rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.allowance-form-panel summary { cursor: pointer; color: var(--green); font-weight: 750; }
.allowance-form { display: grid; gap: 1rem; max-width: 650px; margin-top: 1rem; }
.allowance-list { display: grid; gap: .6rem; margin-top: 1.25rem; }
.allowance-record { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.allowance-record strong, .allowance-record span { display: block; }
.allowance-record span { margin-top: .2rem; color: var(--muted); font-size: .85rem; }
.allowance-record b { color: var(--green); white-space: nowrap; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.service-card { display: flex; gap: .9rem; min-height: 170px; padding: 1.25rem; color: var(--ink); text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.service-card:hover { border-color: #a9cbbb; box-shadow: 0 12px 28px #19352f12; transform: translateY(-2px); }
.service-card > span:last-child { display: flex; flex-direction: column; align-items: flex-start; }
.service-card strong { font-size: 1.15rem; }
.service-card > span:last-child > span { margin-top: .4rem; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.service-card b { margin-top: auto; padding-top: .8rem; color: var(--green); font-size: .84rem; }
.service-icon { display: grid; place-items: center; flex: 0 0 auto; width: 2.8rem; height: 2.8rem; border-radius: 12px; color: var(--green); background: var(--soft-green); font-size: 1.35rem; }
.service-icon-large { width: 4rem; height: 4rem; font-size: 1.8rem; }
.service-detail-card { display: flex; align-items: flex-start; gap: 1rem; margin-top: 1.25rem; padding: clamp(1.2rem, 3vw, 1.6rem); background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.service-detail-card h1 { margin: 0 0 .4rem; }
.service-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 2rem 0 1rem; }
.service-section-heading h2 { margin: .25rem 0 0; font-size: 1.35rem; }
.status-badge { padding: .35rem .65rem; border-radius: 999px; color: #80621e; background: var(--soft-gold); font-size: .76rem; font-weight: 750; white-space: nowrap; }
.health-focus-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.health-focus-card { position: relative; min-height: 175px; padding: 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.health-focus-card h3 { margin: 1.4rem 0 .35rem; font-size: 1rem; }
.health-focus-card p, .service-flow p { margin: 0; color: var(--muted); line-height: 1.5; font-size: .9rem; }
.health-focus-number { color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
.service-flow-heading { margin-top: 2.25rem; }
.service-flow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 0; padding: 0; list-style: none; }
.service-flow li { display: flex; gap: .65rem; align-items: flex-start; padding: .9rem; background: #f7fbf8; border: 1px solid #dceae1; border-radius: 10px; }
.service-flow li > span { display: grid; place-items: center; flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 50%; color: #fff; background: var(--green); font-size: .75rem; font-weight: 800; }
.service-flow strong { display: block; margin-bottom: .25rem; font-size: .88rem; }
.service-note { margin-top: 2rem; }
.nhm-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 2rem; align-items: center; min-height: 290px; margin: -1rem 0 3.5rem; padding: clamp(2rem, 6vw, 4rem); overflow: hidden; border: 1px solid #d7e5dc; border-radius: 24px; background: linear-gradient(125deg, #0f4f40 0%, #176b55 62%, #237c62 100%); color: #fff; box-shadow: 0 18px 40px #19352f18; }
.nhm-hero::after { position: absolute; right: -5rem; bottom: -7rem; width: 22rem; height: 22rem; border: 1px solid #ffffff2b; border-radius: 50%; content: ""; box-shadow: 0 0 0 2rem #ffffff0d, 0 0 0 5rem #ffffff08; }
.nhm-hero-copy { position: relative; z-index: 1; }
.nhm-hero .eyebrow { color: #f0cd78; }
.nhm-hero h1 { margin: .25rem 0 .75rem; color: #fff; font-size: clamp(3rem, 8vw, 5.1rem); letter-spacing: -.07em; line-height: .95; }
.nhm-hero h1 span { color: #e8be61; font-weight: 450; }
.nhm-lead { max-width: 35rem; margin: 0; color: #eef8f1; font-size: clamp(1.12rem, 2vw, 1.35rem); line-height: 1.45; }
.nhm-intro { max-width: 39rem; margin: 1rem 0 0; color: #cbe1d5; }
.nhm-emblem { position: relative; z-index: 1; justify-self: center; width: 9rem; height: 9rem; border: 1px solid #e8be6170; border-radius: 50%; }
.nhm-emblem::before { position: absolute; inset: 1.15rem; border: 1px solid #e8be6166; border-radius: 50%; content: ""; }
.nhm-emblem-star { position: absolute; top: 1.7rem; right: 2rem; color: #f0cd78; font-size: 1.3rem; }
.nhm-emblem-arc { position: absolute; top: 2.6rem; left: 2.8rem; width: 3.4rem; height: 3.4rem; border: .55rem solid #f0cd78; border-top-color: transparent; border-right-color: transparent; border-radius: 50%; transform: rotate(35deg); }
.nhm-emblem-dot { position: absolute; top: 2.15rem; left: 5.45rem; width: .45rem; height: .45rem; border-radius: 50%; background: #f0cd78; }
.nhm-section-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1rem; }
.project-entry-cta { display: flex; justify-content: center; margin: 1.5rem 0 2.35rem; }
.project-entry-button { display: inline-flex; align-items: center; justify-content: center; gap: .7rem; min-height: 3.15rem; padding: .85rem 1.35rem; border-radius: 11px; background: var(--green); color: #fff; box-shadow: 0 8px 18px #19352f1f; font-weight: 750; text-decoration: none; }
.project-entry-button:hover { background: var(--green-dark); color: #fff; transform: translateY(-1px); }
.nhm-section-heading h2 { margin-bottom: 0; }
.nhm-project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.nhm-project-card { display: flex; gap: 1rem; min-height: 190px; padding: 1.35rem; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); text-decoration: none; }
a.nhm-project-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
a.nhm-project-card:hover { border-color: #a9cbbb; box-shadow: 0 12px 28px #19352f12; transform: translateY(-2px); }
.nhm-project-card-active { border-color: #b6d5c3; }
.nhm-project-card-soon { background: #fbfcfa; }
.nhm-project-icon { display: grid; place-items: center; flex: 0 0 auto; width: 2.8rem; height: 2.8rem; border-radius: 12px; background: var(--soft-green); color: var(--gold); font-size: 1.35rem; }
.nhm-project-logo { padding: .3rem; object-fit: contain; }
.nhm-project-card-soon .nhm-project-icon { background: #f2f4f0; color: #94a49d; }
.nhm-project-content { display: flex; flex-direction: column; align-items: flex-start; }
.nhm-project-kicker { color: var(--gold); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.nhm-project-content strong { margin: .25rem 0 .35rem; font-size: 1.2rem; }
.nhm-project-content > span:not(.nhm-project-kicker):not(.nhm-project-action) { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.nhm-project-action { margin-top: auto; padding-top: 1rem; color: var(--green); font-size: .88rem; font-weight: 750; }
.nhm-project-action-muted { color: var(--muted); }
.nhm-values { display: flex; gap: .85rem; align-items: center; max-width: 700px; margin: 2rem auto 0; padding: 1rem 1.15rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); }
.nhm-values p { margin: 0; font-size: .92rem; }
.nhm-values strong { color: var(--ink); }
.nhm-value-mark { color: var(--gold); font-size: 1.4rem; }
@media (max-width: 720px) {
  .nhm-hero { grid-template-columns: 1fr; min-height: 0; margin-top: 0; margin-bottom: 2.5rem; padding: 2rem 1.5rem 2.25rem; }
  .nhm-emblem { position: absolute; right: -1.5rem; bottom: -2.75rem; width: 10rem; height: 10rem; opacity: .45; }
  .nhm-section-heading { align-items: stretch; flex-direction: column; }
  .nhm-project-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .nhm-project-card { transition: none; } }
@media (max-width: 720px) {
  .container { padding: 2.25rem 0; }
  .auth-layout { grid-template-columns: 1fr; gap: 1.5rem; margin-top: 1rem; }
  .auth-intro { padding: 0; }
  .auth-intro h1 { font-size: 2.25rem; }
  .trust-note { margin-top: 1.25rem; }
  .dashboard-hero { display: block; margin-bottom: .5rem; }
  .dashboard-hero-polished { min-height: 320px; padding: 1.5rem; }
  .dashboard-emblem { right: 1.25rem; bottom: -2rem; top: auto; width: 120px; height: 120px; transform: rotate(3deg); opacity: .75; }
  .dashboard-emblem span { font-size: 1.55rem; }
  .dashboard-emblem small { bottom: 1.6rem; font-size: .43rem; }
  .quick-actions { grid-template-columns: 1fr; gap: 1rem; }
  .quick-action-list { grid-template-columns: 1fr; }
  .status { margin-top: 1rem; }
  .page-header { align-items: stretch; flex-direction: column; gap: 1rem; }
  .page-header .children-add-link { width: 100%; justify-content: center; }
  .summary-grid, .feature-grid { grid-template-columns: 1fr; }
  .finance-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .data-module-grid, .allowance-rule-grid { grid-template-columns: 1fr; }
  .service-detail-card { flex-direction: column; }
  .health-focus-grid, .service-flow { grid-template-columns: 1fr; }
  .service-section-heading { align-items: flex-start; flex-direction: column; }
  .summary-grid { margin: 1.5rem 0 2.5rem; }
  .summary, .feature-card { padding: 1rem; }
  .children-toolbar { align-items: stretch; flex-direction: column; }
  .children-toolbar button { width: 100%; }
  .children-filter-grid { grid-template-columns: 1fr; }
  .children-filter-actions { align-items: stretch; flex-direction: column; }
  .children-filter-actions .primary-button { width: 100%; }
  .children-summary { flex-wrap: wrap; }
  .children-table-wrap { overflow: visible; background: transparent; border: 0; }
  .children-table { display: block; min-width: 0; }
  .children-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .children-table tbody, .children-table tr, .children-table td { display: block; }
  .children-table tr { margin-bottom: .85rem; padding: .8rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
  .children-table td { display: grid; grid-template-columns: 7rem 1fr; gap: .5rem; padding: .45rem 0; border: 0; }
  .children-table td::before { color: var(--muted); content: attr(data-label); font-size: .78rem; font-weight: 700; }
  .child-detail-card { grid-template-columns: 1fr; }
  .child-detail-photo, .child-photo-placeholder { width: min(100%, 220px); margin: 0 auto; }
  .child-detail-list { grid-template-columns: 1fr; }
  .child-record { align-items: flex-start; flex-direction: column; }
  .child-record-actions { width: 100%; justify-content: space-between; }
  .empty-state { align-items: flex-start; flex-wrap: wrap; }
  .empty-state .secondary-action { margin-left: 3.1rem; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .children-add-link { width: 100%; text-align: center; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .primary-button { width: 100%; }
  .section-heading { display: block; }
}
@media (max-width: 480px) {
  .site-header { flex-wrap: wrap; gap: .75rem; }
  nav { width: 100%; justify-content: space-between; }
  .summary-grid, .feature-grid { grid-template-columns: 1fr; }
  .summary-grid { margin-bottom: 2.5rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
