:root{--dg:#34665a;--dm:#e8f5ef;--di:#19322c;--du:#60726d;--dl:#d8e5df;--dr:#a43d4b;--dshadow:0 18px 55px rgba(32,78,67,.13)}
.dashboard{width:min(1180px,calc(100% - 32px));margin:auto;padding:48px 0 80px}.dashboard-heading,.section-toolbar,.dialog-header,.dialog-footer,.archived-toggle{display:flex;align-items:center;justify-content:space-between;gap:18px}.dashboard-heading{margin-bottom:28px}.dashboard-heading h1,.family-overview h2,.section-toolbar h2,.next-step-panel h2,.child-dialog h2{margin:0;color:var(--di)}.dashboard-heading h1{font-size:clamp(2.15rem,5vw,4rem);line-height:1}.dashboard-heading p,.section-toolbar p,.family-overview p,.next-step-panel p{color:var(--du)}.dashboard-notice,.dialog-message{margin-bottom:20px;padding:14px 16px;border:1px solid #bad9ca;border-radius:14px;color:#1d5d43;background:#edf9f2;font-weight:800}.dashboard-notice.error,.dialog-message.error{border-color:#e8bdc4;color:#8f2f3e;background:#fff0f2}
.family-overview,.children-section,.archived-section,.next-step-panel{margin-top:24px;padding:clamp(22px,4vw,36px);border:1px solid var(--dl);border-radius:26px;background:#fff;box-shadow:var(--dshadow)}.family-overview{display:grid;grid-template-columns:minmax(210px,.7fr) minmax(0,2fr);gap:30px}.plan-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.metric-card{padding:18px;border-radius:18px;background:#f7faf8}.metric-card>span{display:block;color:var(--du);font-size:.8rem;font-weight:900;letter-spacing:.07em;text-transform:uppercase}.metric-card>strong{display:block;margin-top:5px;color:var(--di);font-size:1.25rem}.metric-card small{display:block;margin-top:7px;color:var(--du)}.usage-track{height:9px;margin-top:12px;overflow:hidden;border-radius:999px;background:#dfeae5}.usage-track span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--dg),#61a783);transition:width .36s}.primary-button.compact{width:auto;min-width:140px}
.children-loading,.empty-children{margin-top:24px;padding:34px;border:2px dashed var(--dl);border-radius:22px;color:var(--du);text-align:center}.empty-icon{font-size:3.2rem}.empty-children h3{margin:8px 0 4px;color:var(--di)}.empty-children p{max-width:620px;margin:0 auto 18px}.children-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(265px,1fr));gap:18px;margin-top:24px}.child-card{padding:22px;border:1px solid var(--dl);border-radius:22px;background:#fff;box-shadow:0 12px 30px rgba(32,78,67,.09)}.child-card.newly-added{animation:arrive .52s ease both}@keyframes arrive{from{opacity:0;transform:translateY(18px) scale(.97)}to{opacity:1;transform:none}}.child-card.archived{opacity:.76;background:#f7f8f7}.child-card-top{display:flex;align-items:center;gap:14px}.child-avatar{display:grid;place-items:center;width:58px;height:58px;flex:0 0 auto;border-radius:18px;background:var(--dm);font-size:2rem}.child-card h3{margin:0;color:var(--di);font-size:1.45rem}.child-card-subtitle{margin:3px 0 0;color:var(--du)}.child-meta{display:grid;gap:9px;margin:18px 0}.child-meta-row{display:flex;justify-content:space-between;gap:12px;color:var(--du);font-size:.93rem}.child-meta-row strong{color:var(--di)}.child-card-actions{display:flex;flex-wrap:wrap;gap:8px}.child-card-actions button{flex:1 1 auto;min-width:78px;padding:9px 12px;border:1px solid var(--dl);border-radius:11px;color:var(--di);background:#fff;font:inherit;font-weight:900;cursor:pointer}.child-card-actions .danger-action{color:var(--dr)}.child-card-actions button:disabled{opacity:.5}
.archived-section{padding:0}.archived-toggle{width:100%;padding:20px 24px;border:0;border-radius:26px;color:var(--di);background:transparent;font:inherit;font-weight:900}.archived-toggle strong{display:grid;place-items:center;min-width:34px;height:34px;border-radius:999px;background:var(--dm)}.archived-grid{padding:0 24px 24px;margin-top:0}.next-step-panel{display:flex;align-items:center;gap:22px;background:linear-gradient(135deg,#f7fbf8,#eef7f2)}.next-step-icon{font-size:3.2rem}
.modal-backdrop{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px;background:rgba(15,39,33,.68);backdrop-filter:blur(5px)}.child-dialog{width:min(820px,100%);max-height:min(90vh,850px);overflow:auto;border-radius:28px;background:#fff;box-shadow:0 30px 90px rgba(0,0,0,.3)}.dialog-header{padding:22px 24px 16px;border-bottom:1px solid var(--dl)}.dialog-close{width:42px;height:42px;border:0;border-radius:50%;background:#edf3f0;font-size:1.8rem}.dialog-tabs{display:flex;gap:6px;padding:12px 18px 0;overflow:auto}.dialog-tab{padding:10px 14px;border:0;border-radius:12px;color:var(--du);background:transparent;font:inherit;font-weight:900;white-space:nowrap}.dialog-tab.active{color:#fff;background:var(--dg)}#child-form{padding:18px 24px 24px}.child-tab-panel{display:none;min-height:250px}.child-tab-panel.active{display:block}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.form-grid label{display:grid;gap:7px;color:var(--di);font-weight:900}.full-field{grid-column:1/-1}#child-form input,#child-form textarea{width:100%;padding:12px 13px;border:2px solid #d7e3dd;border-radius:12px;font:inherit}.switch-row,.feature-callout{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px;padding:17px;border-radius:16px;background:#f4f8f6}.switch-row input{width:24px!important;height:24px}.switch-row small,.feature-callout p,.form-help{display:block;margin:3px 0 0;color:var(--du);font-weight:400}.feature-callout{justify-content:flex-start}.coming-panel{display:grid;place-items:center;min-height:250px;padding:30px;border:2px dashed var(--dl);border-radius:20px;text-align:center}.coming-panel>div{font-size:3rem}.settings-preview{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.settings-preview article{padding:20px;border-radius:18px;background:#f4f8f6;text-align:center}.settings-preview span,.settings-preview strong,.settings-preview small{display:block}.settings-preview article>span{font-size:2rem}.settings-preview small{margin-top:6px;color:var(--du)}.avatar-picker{display:grid;grid-template-columns:150px 1fr;gap:24px;align-items:center}.avatar-preview{display:grid;place-items:center;width:140px;height:140px;border-radius:34px;background:var(--dm);font-size:5rem}.emoji-options{display:flex;flex-wrap:wrap;gap:8px}.emoji-options button{width:48px;height:48px;border:2px solid transparent;border-radius:13px;background:#f4f8f6;font-size:1.5rem}.emoji-options button.active{border-color:var(--dg);background:var(--dm)}.dialog-footer{margin-top:24px;padding-top:18px;border-top:1px solid var(--dl)}body.modal-open{overflow:hidden}
@media(max-width:820px){.family-overview{grid-template-columns:1fr}}@media(max-width:650px){.dashboard{width:min(100% - 18px,1180px)}.dashboard-heading,.section-toolbar,.next-step-panel{display:grid}.plan-metrics,.form-grid,.settings-preview,.avatar-picker{grid-template-columns:1fr}.full-field{grid-column:auto}.primary-button.compact{width:100%}.modal-backdrop{padding:0}.child-dialog{width:100%;max-height:100dvh;min-height:100dvh;border-radius:0}}

/* Parent dashboard footer alignment */
body > footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}
