/* Family Hub: calm sky-blue surfaces and readable, everyday controls. */
.main-content .dashboard-container .quick-actions-chart .card-header { margin-bottom: 18px; padding-bottom: 14px; border-color: #e3edf5; }
.main-content .dashboard-container .quick-actions-chart .actions-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.main-content .dashboard-container .quick-actions-chart .action-btn { display: flex; flex-direction: row; justify-content: flex-start; align-items: center; min-height: 72px; padding: 14px; gap: 12px; border: 1px solid #dce9f3; border-radius: 13px; background: #f8fbfe; color: #365b75; text-decoration: none; font-size: 13px; font-weight: 500; text-align: left; box-shadow: none; transition: background .16s, border-color .16s; }
.main-content .dashboard-container .quick-actions-chart .action-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; background: #e3f2fc; color: #287daf; font-size: 15px; }
.main-content .dashboard-container .quick-actions-chart .action-btn > span { min-width: 0; font-size: inherit; overflow-wrap: anywhere; }
.main-content .dashboard-container .quick-actions-chart .action-btn::after { content: '\2192'; margin-left: auto; color: #87abc4; font-size: 17px; font-weight: 400; }
.main-content .dashboard-container .quick-actions-chart .action-btn:hover { background: #eaf5fd; border-color: #a9cfe8; color: #205d83; transform: none; box-shadow: none; }
.main-content .dashboard-container .quick-actions-chart .action-btn:focus-visible { outline: 3px solid #287daf; outline-offset: 3px; background: #eaf5fd; }
.main-content .dashboard-container .quick-actions-chart .action-btn.admin { grid-column: 1 / -1; min-height: 60px; background: #fff; border-style: dashed; }
.main-content .dashboard-container .quick-actions-chart .action-btn.admin:hover { background: #edf7fe; border-style: solid; }
@media(max-width:480px) {
    .main-content .dashboard-container .quick-actions-chart .action-btn { min-height: 68px; padding: 10px; gap: 8px; font-size: 12px; }
    .main-content .dashboard-container .quick-actions-chart .action-icon { width: 30px; height: 30px; flex-basis: 30px; font-size: 13px; border-radius: 9px; }
    .main-content .dashboard-container .quick-actions-chart .action-btn::after { display: none; }
}
.main-content .dashboard-container #recentActivities { display: grid; gap: 0; }
.main-content .dashboard-container #recentActivities .activity-item { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 18px 4px; margin: 0; border: 0; border-bottom: 1px solid #e7eff6; border-radius: 0; background: transparent; box-shadow: none; }
.main-content .dashboard-container #recentActivities .activity-item:last-child { border-bottom: 0; }
.main-content .dashboard-container #recentActivities .activity-item:hover { background: #f8fbfe; transform: none; }
.main-content .dashboard-container #recentActivities .activity-icon { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #d2e7f5; border-radius: 13px; background: #e8f4fc; color: #287daf; font-size: 15px; }
.main-content .dashboard-container #recentActivities .activity-icon.negative { background: #f6eff0; border-color: #f0e1e4; color: #b55e6a; }
.main-content .dashboard-container #recentActivities .activity-icon.success { background: #e8f4fc; border-color: #cce5f5; color: #287daf; }
.main-content .dashboard-container #recentActivities .activity-text { margin: 0 0 7px; font-size: 14px; font-weight: 500; line-height: 1.5; color: #20384b; overflow-wrap: anywhere; }
.main-content .dashboard-container #recentActivities .activity-time { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; color: #7890a2; font-size: 11px; line-height: 1.5; }
.main-content .dashboard-container #recentActivities .activity-type { padding: 3px 8px; border-radius: 6px; background: #edf6fc; color: #426c88; font-size: 10px; font-weight: 600; }
.main-content .dashboard-container #recentActivities .activity-type.negative { background: #f8f0f1; color: #a65c67; }
.main-content .dashboard-container #recentActivities .activity-value { color: #264b65; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.main-content .dashboard-container #recentActivities .activity-content:only-child { grid-column: 1 / -1; padding: 12px; }
@media(max-width:600px) {
    .main-content .dashboard-container #recentActivities .activity-item { grid-template-columns: 36px minmax(0,1fr); gap: 8px 12px; padding: 16px 0; }
    .main-content .dashboard-container #recentActivities .activity-icon { width: 36px; height: 36px; border-radius: 11px; }
    .main-content .dashboard-container #recentActivities .activity-value { grid-column: 2; text-align: left; font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
    .main-content .dashboard-container #recentActivities .activity-text { font-size: 13px; }
}
.main-content #planningSummary { max-width: 1440px; margin: 24px auto 0; padding: 26px; border: 1px solid #cee4f3; border-radius: 18px; background: #e8f4fc; box-shadow: none; }
.main-content #planningSummary h2 { margin: 0 0 18px; color: #20384b; font-size: 20px; font-weight: 600; letter-spacing: -.4px; }
.main-content #planningSummaryText { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 0 0 20px; }
.planning-summary-item { display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid #d6e8f4; border-radius: 12px; background: #f8fcff; color: #365b75; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.planning-summary-item > i { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: #e2f1fc; color: #287daf; }
.main-content #planningSummary > a,.main-content .planning-chart-card > a { display: inline-flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 10px 14px; border: 1px solid #cce3f3; border-radius: 10px; background: #fff; color: #205d83; font-size: 13px; font-weight: 600; text-decoration: none; }
.main-content #planningSummary > a::after,.main-content .planning-chart-card > a::after { content: '\2192'; font-size: 18px; }
.main-content #planningSummary > a:hover,.main-content .planning-chart-card > a:hover { background: #dceffc; border-color: #a9cee7; }
.main-content .planning-charts { max-width: 1440px; margin: 20px auto; gap: 18px; align-items: stretch; }
.main-content .planning-chart-card { display: flex; flex-direction: column; padding: 24px; border-radius: 16px; background: #fff; border: 1px solid #dce7ef; box-shadow: 0 2px 5px #20384b04; }
.main-content .planning-chart-card[hidden] { display: none; }
.main-content .planning-chart-card h2 { margin: 0 0 9px; font-size: 16px; font-weight: 600; color: #20384b; }
.main-content .planning-chart-card > p { font-size: 13px; color: #607487; line-height: 1.6; }
.main-content .planning-chart-card .planning-chart-status:empty { display: none; }
.main-content .planning-chart-card details { margin-top: auto; border: 1px solid #e0edf6; border-radius: 10px; background: #f5faff; }
.main-content .planning-chart-card summary { padding: 12px; color: #426c88; font-size: 12px; font-weight: 600; }
.main-content .planning-chart-card details > div { overflow-x: auto; padding: 0 12px 12px; }
.main-content .planning-chart-card table { margin: 0; font-variant-numeric: tabular-nums; }
.main-content .planning-chart-card > a { margin-top: 16px; background: #edf7fe; width: 100%; box-sizing: border-box; }
@media(max-width:1100px) { .main-content #planningSummaryText { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { .main-content #planningSummary { padding: 20px 16px; } .main-content #planningSummaryText { grid-template-columns: 1fr; gap: 8px; } .main-content .planning-chart-card { padding: 20px 16px; } }
.dashboard-container .chart-value-list { display: grid; gap: 0; margin: 16px 0 0; padding: 4px 14px; background: #f5faff; border: 1px solid #e0edf6; border-radius: 12px; }
.dashboard-container .chart-value-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; }
.dashboard-container .chart-value-list > div + div { border-top: 1px solid #e2edf5; }
.dashboard-container .chart-value-list dt { display: flex; align-items: center; gap: 8px; color: #526d82; font-size: 12px; min-width: 0; overflow-wrap: anywhere; }
.dashboard-container .chart-value-list dd { margin: 0; color: #20384b; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.dashboard-container .chart-series-dot { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }
#customModal.modal-overlay { background: #20384b38; backdrop-filter: blur(4px); }
#customModal .modal-card { position: relative; overflow: hidden; padding: 32px 28px 26px; border: 1px solid #d4e6f2; border-radius: 22px; box-shadow: 0 20px 60px #20384b26; }
#customModal .modal-icon.success { width: 58px; height: 58px; margin-bottom: 18px; border: 1px solid #c4e2f6; border-radius: 18px; background: #e3f2fc; color: #287daf; font-size: 23px; }
#customModal .modal-eyebrow { color: #527c98; font-size: 11px; font-weight: 600; letter-spacing: .04em; }
#customModal .modal-title { color: #20384b; font-size: 23px; font-weight: 600; line-height: 1.3; }
#customModal .modal-desc { color: #607487; margin-bottom: 24px; font-size: 14px; line-height: 1.6; }
#customModal .modal-btn { min-height: 44px; border: 1px solid #c7e1f3; border-radius: 11px; background: #eaf5fd; color: #205d83; box-shadow: none; font: inherit; font-size: 14px; font-weight: 600; }
#customModal .modal-btn:hover { background: #dceffc; border-color: #a9cfe8; transform: none; box-shadow: none; }
#customModal .modal-btn:focus-visible { outline: 3px solid #287daf; outline-offset: 3px; }
#customModal.modal-success .modal-progress { display: block; position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: #edf6fc; }
#customModal.modal-success.active .modal-progress span { display: block; height: 100%; background: #72b7e3; transform-origin: left; animation: modal-success-countdown 4s linear forwards; }
@keyframes modal-success-countdown { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media(prefers-reduced-motion:reduce) { #customModal.modal-success .modal-progress { display: none; } }
/* Notifications share the same visual language as the family workspace. */
.toast-container { max-width: 400px; gap: 12px; }
.toast {
    padding: 20px; border: 1px solid #d5e5f0; border-radius: 18px;
    background: #fff; box-shadow: 0 12px 36px #234c681a, 0 2px 6px #234c6808;
    overflow: hidden;
}
.toast::before { display: none; }
.toast:hover { box-shadow: 0 14px 40px #234c6820; }
.toast .toast-header { gap: 12px; margin-bottom: 0; }
.toast .toast-header-left { gap: 13px; align-items: center; }
.toast .toast-icon { width: 44px; height: 44px; border-radius: 14px; font-size: 18px; flex-shrink: 0; }
.toast-info .toast-icon { background: #e3f2fc; color: #287daf; border: 1px solid #cde5f5; }
.toast .toast-title { margin: 0 0 5px; color: #20384b; font-size: 15px; font-weight: 650; line-height: 1.35; letter-spacing: -.25px; }
.toast .toast-subtitle,.toast .toast-message { color: #607487; font-size: 13px; line-height: 1.55; font-weight: 400; }
.toast .toast-message:not(:first-child) { margin-top: 12px; }
.toast .toast-close { width: 32px; height: 32px; min-width: 32px; margin: -6px -6px 0 0; border: 0; border-radius: 10px; color: #738a9c; background: transparent; }
.toast .toast-close:hover { background: #edf6fc; color: #205d83; }
.toast .toast-action {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    width: 100%; min-height: 44px; margin-top: 18px; padding: 11px 14px;
    border: 1px solid #cce3f3; border-radius: 11px; background: #edf7fe;
    color: #205d83; font-size: 13px; font-weight: 600; box-shadow: none; text-decoration: none;
}
.toast .toast-action::after { content: '\2192'; font-size: 19px; line-height: 1; font-weight: 400; }
.toast .toast-action:hover { background: #dceffc; border-color: #a9cee7; color: #194c6c; box-shadow: none; transform: none; }
.toast :is(.toast-action,.toast-close):focus-visible { outline: 3px solid #287daf; outline-offset: 2px; }
.toast-warning .toast-icon { background: #fff5dc; color: #a96709; border-color: #f6dfae; }
.toast-error .toast-icon { background: #fdeaea; color: #c73737; border-color: #f5cccc; }
@media(max-width:480px) {
    .toast-container { top: max(12px,env(safe-area-inset-top)); right: 12px; left: 12px; width: auto; }
    .toast { padding: 18px; border-radius: 16px; }
    .toast .toast-close { width: 40px; height: 40px; min-width: 40px; }
}
@media(prefers-reduced-motion:reduce) { .toast { transition: none; } }
:root {
    --primary: #287daf;
    --primary-hover: #205d83;
    --primary-light: #e6f3fc;
    --text-main: #20384b;
    --text-muted: #607487;
    --border: #dce7ef;
}
body:not(.login-page) { background: #f5f8fb; color: var(--text-main); }
#mainSidebar { background: #fafdff; box-shadow: none; }
#mainSidebar .nav-link.active, #mainSidebar .nav-link.active-module-active {
    background: #dceffc; color: #205d83; border-color: #c1dff3; box-shadow: none;
}
#mainSidebar .nav-links > .nav-link.active > i { background: #c8e5f8; color: #205d83; }
#mainSidebar .nav-group-toggle, #mainSidebar .nav-link { font-size: 13px; font-weight: 500; }
#mainSidebar .nav-group-items .nav-link { font-size: 12px; }
#mainSidebar .nav-section-label { letter-spacing: .08em; font-size: 10px; }
#mainSidebar .nav-group-toggle > i:first-child, #mainSidebar .nav-links > .nav-link > i { background: transparent; }
.main-content :is(.expenses-hero,.income-hero,.savings-hero,.purchases-hero,.members-hero,.feedback-hero,.notes-hero,.reports-hero,.finance-module-hero,.saas-hero,.hub-hero,.page-header),
.main-content .dashboard-container .welcome-section, .saas-public .saas-hero {
    background: #e3f2fc; border: 1px solid #cee5f5; border-radius: 18px;
    color: #20384b; box-shadow: none; padding: clamp(22px,3vw,36px);
}
.main-content :is(.expenses-hero,.income-hero,.savings-hero,.purchases-hero,.members-hero,.feedback-hero,.notes-hero,.reports-hero,.finance-module-hero,.saas-hero,.hub-hero,.page-header) :is(h1,.page-title),
.main-content .dashboard-container .welcome-title, .saas-public .saas-hero h1 {
    color: #20384b; font-size: clamp(24px,2.5vw,34px); font-weight: 600; letter-spacing: -.035em; line-height: 1.25;
}
.main-content :is(.expenses-hero,.income-hero,.savings-hero,.purchases-hero,.members-hero,.feedback-hero,.notes-hero,.reports-hero,.finance-module-hero,.saas-hero,.hub-hero,.page-header) p,
.saas-public .saas-hero p { color: #526d82; font-size: 14px; line-height: 1.7; max-width: 65ch; }
.main-content :is(.page-eyebrow,.purchase-eyebrow,.members-eyebrow,.feedback-eyebrow,.savings-eyebrow,.saas-kicker) { color: #426d8b; }
.main-content :is(.expenses-hero,.income-hero,.savings-hero,.purchases-hero,.members-hero,.feedback-hero,.notes-hero,.reports-hero,.finance-module-hero,.saas-hero,.hub-hero,.page-header) .btn-primary {
    background: #287daf; border-color: #287daf; color: white; box-shadow: none;
}
.main-content :is(.expenses-hero,.income-hero,.savings-hero,.purchases-hero,.members-hero,.feedback-hero,.notes-hero,.reports-hero,.finance-module-hero,.saas-hero,.hub-hero,.page-header) .btn-primary:hover { background: #205d83; border-color: #205d83; color: white; }
.main-content .btn { font-size: 13px; font-weight: 600; min-height: 42px; }
.main-content :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),select,textarea) { font-size: 14px; }
.main-content :is(.data-table,.saas-page table) th { font-size: 12px; padding-top: 14px; padding-bottom: 14px; }
.main-content :is(.data-table,.saas-page table) td { font-size: 13px; padding-top: 15px; padding-bottom: 15px; }
.main-content :is(.expenses-card,.income-card,.savings-card,.purchases-card,.members-content,.feedback-card,.purchase-card,.member-card,.settings-card,.card-like,.report-chart-card,.finance-module-card,.saas-card,.hub-card,.note-card,.planning-chart-card) { box-shadow: 0 2px 5px #20384b04; }
.dashboard-container { --dashboard-ink: #20384b; --dashboard-muted: #607487; --dashboard-line: #dce7ef; --dashboard-accent: #287daf; --dashboard-accent-strong: #205d83; --dashboard-accent-wash: #e6f3fc; }
.main-content .dashboard-container .welcome-section::before,.main-content .dashboard-container .welcome-section::after { display: none; }
.main-content .dashboard-container .dashboard-identity-name { color: #26475f; }
.main-content .dashboard-container :is(.dashboard-identity-period,.live-badge,.date-badge,.role-badge),
.main-content .dashboard-container .dashboard-header-preferences label { background: #f5fbff; color: #42647c; border-color: #c8deed; box-shadow: none; }
.main-content .dashboard-container .dashboard-header-preferences :is(i,select),.main-content .dashboard-container .dashboard-identity-period i { color: #42647c; }
.main-content .dashboard-container .dashboard-avatar { background: #c5e4f8; outline-color: #96c7e8; box-shadow: 0 0 0 4px #f5fbff; }
.main-content .dashboard-container .stat-card { border: 1px solid #dce7ef; border-radius: 14px; box-shadow: none; }
.main-content .dashboard-container .stat-card:hover { transform: none; box-shadow: 0 4px 16px #20384b08; }
.main-content .dashboard-container .stat-value { font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.main-content .dashboard-container .card-title { font-size: 16px; font-weight: 600; }
.main-content .dashboard-container .action-btn { background: #f8fbfe; border-color: #dce7ef; border-radius: 12px; color: #365f7b; }
.main-content .dashboard-container .action-btn:hover { background: #e6f3fc; border-color: #aacfe8; }
.main-footer { background: #f5f8fb; border-color: #dce7ef; color: #607487; }
body.login-page { background: #f2f7fb; background-image: none; }
.login-page .login-shell { box-shadow: 0 16px 48px #2849660d; border-color: #d9e6ef; border-radius: 24px; }
.login-page .login-showcase { background: #dceffc; color: #20384b; }
.login-page .login-showcase::after { display: none; }
.login-page .login-showcase :is(h1,h2,p,.showcase-eyebrow,.showcase-brand) { color: #264b65; }
.login-page .showcase-features span { color: #365f7b; }
.login-page .showcase-features i { color: #287daf; }
.login-page .btn-submit { background: #287daf; box-shadow: none; }
.login-page .btn-submit:hover { background: #205d83; }
@media(max-width:768px) {
    .main-content .dashboard-container .welcome-section { padding: 22px 18px; }
    .main-content .dashboard-container .welcome-title { font-size: 26px; }
    .main-content .btn { min-height: 44px; }
    .main-content :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),select,textarea) { font-size: 16px; }
    .main-content .dashboard-container .card-title { font-size: 14px; }
}
@media(prefers-reduced-motion:reduce) { .login-page * { transition: none !important; animation: none !important; } }
@media print { body:not(.login-page),.main-content .dashboard-container .welcome-section { background: white; } }

/* Dashboard masthead: identity and preferences have distinct, quiet places. */
.main-content .dashboard-container a.stat-card { display: block; text-decoration: none; color: #20384b; cursor: pointer; }
.main-content .dashboard-container a.stat-card:hover { border-color: #9bc8e6; background: #fafdff; }
.main-content .dashboard-container a.stat-card:focus-visible { outline: 3px solid #287daf; outline-offset: 3px; border-color: #287daf; }
.main-content .dashboard-container .shopping-stat { text-decoration: none; color: #20384b; }
.main-content .dashboard-container .shopping-stat .stat-icon { background: #e3f2fc; color: #287daf; border-radius: 12px; }
.main-content .dashboard-container .shopping-stat .stat-badge { background: #edf7fe; color: #356d93; }
.main-content .dashboard-container .shopping-stat .stat-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.main-content .dashboard-container .shopping-stat .stat-label i { color: #287daf; font-size: 12px; }
.main-content .dashboard-container .shopping-stat:hover { border-color: #a9cfe8; background: #fafdff; }
.main-content .header-preferences label { position: relative; }
.main-content .header-preferences select {
    cursor: pointer; border-radius: 7px; color: #264f6c;
    font-family: inherit; font-weight: 600; outline-offset: 3px;
}
.main-content .header-preferences select option { background: #fff; color: #264f6c; padding: 10px 14px; }
/* Native customizable selects retain keyboard navigation and platform semantics. */
@supports (appearance: base-select) {
    .main-content .header-preferences select,
    .main-content .header-preferences select::picker(select) { appearance: base-select; }
    .main-content .header-preferences select {
        display: flex; align-items: center; gap: 10px; min-width: 52px;
        background: transparent; border: 0; box-shadow: none;
    }
    .main-content .header-preferences select::picker-icon { color: #6b91ab; width: 10px; transition: rotate .15s; }
    .main-content .header-preferences select:open::picker-icon { rotate: 180deg; }
    .main-content .header-preferences select::picker(select) {
        margin-top: 10px; padding: 6px; min-width: 112px;
        border: 1px solid #cee3f2; border-radius: 12px; background: #fff;
        box-shadow: 0 10px 28px #234c6824; color: #264f6c;
    }
    .main-content .header-preferences select option {
        display: flex; align-items: center; gap: 12px; min-height: 40px;
        padding: 10px 12px; border-radius: 7px; font-size: 13px;
        font-weight: 500; cursor: pointer; background: #fff;
    }
    .main-content .header-preferences select option:checked { background: #e4f3fd; color: #205d83; font-weight: 650; }
    .main-content .header-preferences select option:hover,
    .main-content .header-preferences select option:focus { background: #eff7fc; outline: none; }
    .main-content .header-preferences select option::checkmark { color: #287daf; order: 1; margin-left: auto; }
    .main-content .header-preferences label:has(select:open) { border-color: #8cbfe0; background: #f6fbff; }
}
.main-content .dashboard-container .family-overview-header {
    padding: 28px 32px; background: #e8f4fc; border-color: #cee4f3; border-radius: 20px;
}
.family-overview-header .overview-eyebrow { display: block; margin-bottom: 8px; color: #52768f; font-size: 12px; font-weight: 500; letter-spacing: .02em; }
.main-content .family-overview-header .welcome-content { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.main-content .dashboard-container .family-overview-header .welcome-title { margin: 0; font-size: clamp(26px,2.4vw,34px); letter-spacing: -.04em; font-weight: 600; }
.main-content .family-overview-header .dashboard-identity { margin-top: 20px; gap: 12px; }
.main-content .dashboard-container .family-overview-header .dashboard-avatar { width: 44px; height: 44px; flex-basis: 44px; padding: 0; border: 2px solid white; outline: none; background: #c8e5f8; box-shadow: 0 2px 6px #205d8314; }
.main-content .family-overview-header .dashboard-avatar img { inset: 0; width: 100%; height: 100%; border: 0; }
.main-content .family-overview-header .dashboard-avatar > span:not(.dashboard-avatar-presence) { border: 0; background: #c8e5f8; color: #205d83; }
.main-content .family-overview-header .dashboard-avatar-presence { display: none; }
.main-content .family-overview-header .dashboard-identity-details { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.main-content .family-overview-header .dashboard-identity-name { font-size: 14px; font-weight: 600; }
.main-content .dashboard-container .family-overview-header .dashboard-identity-period { padding: 0; border: 0; border-radius: 0; background: transparent; color: #607e94; font-size: 12px; font-weight: 400; line-height: 1.4; }
.main-content .family-overview-header .welcome-meta { display: grid; grid-template-columns: auto auto; align-items: center; gap: 14px 18px; width: auto; margin: 0; padding: 20px; border: 1px solid #d7e8f4; border-radius: 14px; background: #f7fcff; }
.main-content .dashboard-container .family-overview-header .date-badge { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 8px; padding: 0; min-height: 0; border: 0; background: transparent; color: #365b75; font-size: 13px; font-weight: 500; }
.main-content .dashboard-container .family-overview-header .live-badge { grid-column: 1 / -1; grid-row: 2; padding: 12px 0 0; min-height: 0; border: 0; border-top: 1px solid #dfebf4; border-radius: 0; background: transparent; color: #688297; font-size: 11px; gap: 7px; }
.main-content .family-overview-header .live-dot { width: 6px; height: 6px; background: #5398bf; box-shadow: none; animation: none; }
.main-content .family-overview-header .dashboard-header-preferences { grid-column: 2; grid-row: 1; display: flex; gap: 8px; width: auto; margin: 0; }
.main-content .dashboard-container .family-overview-header .dashboard-header-preferences label { min-height: 38px; padding: 0 10px; border: 1px solid #d3e4f0; border-radius: 9px; background: #fff; gap: 7px; }
.main-content .family-overview-header .dashboard-header-preferences select { min-width: 45px; padding: 0; border: 0; background: transparent; font-size: 12px; font-weight: 600; cursor: pointer; }
@media(max-width:1050px) {
    .main-content .family-overview-header .welcome-content { align-items: flex-start; flex-direction: column; gap: 22px; }
    .main-content .family-overview-header .welcome-meta { align-self: stretch; }
    .main-content .family-overview-header .dashboard-header-preferences { justify-self: end; }
}
@media(max-width:480px) {
    .main-content .dashboard-container .family-overview-header { padding: 22px 18px; border-radius: 17px; }
    .main-content .family-overview-header .welcome-meta { padding: 14px 12px; gap: 12px 8px; }
    .main-content .dashboard-container .family-overview-header .date-badge { font-size: 12px; gap: 5px; }
    .main-content .family-overview-header .dashboard-header-preferences { gap: 5px; }
    .main-content .dashboard-container .family-overview-header .dashboard-header-preferences label { min-height: 44px; padding: 0 6px; }
}

/* Shared navigation and footer. Keep existing collapsed/mobile mechanics. */
#mainSidebar { background: #fafdff; border-right: 1px solid #d6e6f2; box-shadow: 4px 0 18px #20384b03; }
#mainSidebar .nav-container { gap: 10px; padding: 20px 14px 14px; }
#mainSidebar .nav-brand { padding: 4px 4px 20px; margin-bottom: 4px; border-color: #e1edf5; gap: 11px; }
#mainSidebar .nav-logo { width: 44px; height: 44px; border-radius: 14px; border: 1px solid #d6e6f2; box-shadow: none; }
#mainSidebar .nav-title-marquee { font-size: 15px; font-weight: 650; color: #20384b; letter-spacing: -.4px; }
#mainSidebar .nav-title small { font-size: 11px; color: #7890a2; margin-top: 5px; }
#mainSidebar .sidebar-toggle { background: #eaf5fd; color: #4d819f; border: 1px solid #d5e8f5; }
#mainSidebar .nav-section-label { padding: 8px 12px 12px; color: #7b93a5; font-size: 10px; font-weight: 600; letter-spacing: .07em; }
#mainSidebar .nav-links { gap: 5px; scrollbar-color: #c4deef transparent; }
#mainSidebar .nav-group-toggle,#mainSidebar .nav-link { min-height: 46px; padding: 9px 11px; border-radius: 11px; color: #506c81; font-size: 13px; font-weight: 500; }
#mainSidebar .nav-group-toggle > i:first-child,#mainSidebar .nav-links > .nav-link > i { color: #7197b0; background: transparent; }
#mainSidebar .nav-group-toggle:hover,#mainSidebar .nav-link:hover { background: #edf6fc; color: #205d83; }
#mainSidebar .nav-group.is-open > .nav-group-toggle { background: #edf6fc; color: #205d83; }
#mainSidebar .nav-group-items { margin-left: 26px; border-color: #cfe4f3; padding-left: 11px; }
#mainSidebar .nav-group-items .nav-link { min-height: 38px; font-size: 12px; }
#mainSidebar .nav-link.active,#mainSidebar .nav-link.active-module-active { background: #deeffb; border-color: #c9e3f5; color: #205d83; box-shadow: inset 3px 0 #64acda; font-weight: 600; }
#mainSidebar .nav-links > .nav-link.active > i { color: #287daf; background: transparent; }
#mainSidebar :is(.sidebar-language,.sidebar-currency) { padding: 6px 10px; border: 1px solid #e1edf5; border-radius: 10px; background: #f2f8fd; color: #607e94; font-size: 11px; font-weight: 500; }
#mainSidebar :is(.sidebar-language,.sidebar-currency) select { min-height: 32px; width: 66px; padding: 5px 8px; border-color: #d3e5f2; border-radius: 7px; color: #365f7b; font-size: 11px; }
#mainSidebar :is(.sidebar-language,.sidebar-currency) select:focus-visible { outline: 2px solid #287daf; outline-offset: 2px; }
#mainSidebar .sidebar-version { border: 0; padding: 3px 10px; font-size: 9px; color: #7b93a5; }
#mainSidebar .sidebar-status-dot { background: #72b7e3; }
#mainSidebar .user-info { padding: 12px 10px; border: 1px solid #d3e7f5; border-radius: 13px; background: #eaf5fd; box-shadow: none; }
#mainSidebar .user-avatar { box-shadow: 0 0 0 3px #fff; }
#mainSidebar .user-name { color: #264b65; font-size: 12px; font-weight: 600; }
#mainSidebar .user-level { color: #6b879c; font-size: 11px; }
#mainSidebar .user-submenu { border: 1px solid #d6e6f2; border-radius: 13px; background: #fff; box-shadow: 0 12px 30px #20384b18; }
#mainSidebar .submenu-item:hover { background: #edf6fc; color: #205d83; }
#mainSidebar .nav-logout { color: #a7606a; border-color: transparent; }
#mainSidebar .nav-logout > i { color: #a7606a; }
#mainSidebar .nav-logout:hover { background: #fbf0f2; color: #a14555; }
.main-footer { padding: 24px 28px; border-top: 1px solid #dce9f3; background: #f5f9fd; }
.main-footer .footer-content { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px 28px; max-width: 1440px; margin: 0 auto; text-align: left; }
.main-footer .footer-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.main-footer .footer-copy p { margin: 0; color: #7890a2; font-size: 11px; line-height: 1.7; }
.main-footer .footer-copy strong { color: #365b75; font-weight: 600; }
.main-footer .footer-version { font-size: 10px; color: #8a9eae; }
.main-footer .footer-developers { margin: 0; gap: 10px; justify-content: flex-start; }
.main-footer .footer-credit-label { text-transform: none; letter-spacing: 0; font-size: 11px; color: #7890a2; font-weight: 400; }
.main-footer .footer-developer { padding: 6px 9px; border: 1px solid #dce9f3; border-radius: 9px; background: #fff; gap: 7px; font-size: 11px; color: #4d7089; }
.main-footer .footer-developer img { width: 25px; height: 25px; border: 2px solid #e1f0fa; }
@media(min-width:769px) {
    body.sidebar-collapsed #mainSidebar .nav-brand { padding: 0 0 12px; }
    body.sidebar-collapsed #mainSidebar .user-info { padding: 9px 0; background: transparent; border-color: transparent; }
}
@media(max-width:768px) {
    #mainSidebar .nav-container { padding: 16px 12px 12px; gap: 8px; }
    #mainSidebar .nav-group-items .nav-link { min-height: 44px; }
    .main-footer { padding: 22px 18px; }
    .main-footer .footer-content { flex-direction: column; align-items: flex-start; gap: 16px; }
    .main-footer .footer-developers { gap: 7px; }
    .main-footer .footer-credit-label { flex-basis: 100%; margin-bottom: 2px; }
}
