.sidebar { min-height: 0; }
.sidebar .brand { margin-bottom: 22px; flex-shrink: 0; }
.nav { overflow: auto; align-content: start; scrollbar-width: thin; }
.nav a { min-height: 39px; padding-inline: 10px; font-size: .91rem; }
.extra-nav { display: grid; gap: 4px; border-top: 1px solid #ffffff29; padding-top: 6px; margin-top: 3px; }
.extra-nav a, .module-menu a { display: grid; grid-template-columns: 20px minmax(0, 1fr); column-gap: 8px; }
.extra-nav a small, .module-menu a small { grid-column: 2; font-size: .72rem; opacity: .8; }
.mobile-modules, .mobile-scan { display: none; }
.sidebar-footer { flex: 0 0 auto; }
.sidebar-footer .family-members { gap: 7px; }
.sidebar-footer .family-members span:last-child { margin-left: 0; overflow-wrap: anywhere; }
.dashboard { gap: 16px; }
.welcome-row h1 { text-wrap: balance; }
.welcome-row h1 span { white-space: normal; }
.quick-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.quick-actions .button { white-space: normal; min-width: 0; padding: 7px; }
.quick-actions .button:first-child { background: var(--forest-dark); }
.quick-actions .button:first-child svg { color: #eace94; }
.overview-grid { gap: 15px; }
.member-grid { grid-template-columns: repeat(auto-fit, minmax(min(132px, 100%), 1fr)); }
.profile-color { display: grid; place-items: center; width: 45px; height: 45px; overflow: hidden; border-radius: 13px; font-size: 1.05rem; font-weight: 750; color: var(--forest-dark); background: var(--sage); }
.profile-color img { width: 100%; height: 100%; object-fit: cover; }
.profile-color.gold, .person-tag.gold { color: #6e431f; background: var(--gold); }
.profile-color.sage, .person-tag.sage { color: var(--forest-dark); background: var(--sage); }
.profile-color.plum, .person-tag.plum { color: #644967; background: #f1e8f3; }
.profile-color.sand, .person-tag.sand { color: #704d35; background: #f2e8df; }
.member-card .profile-color { grid-row: 1 / 3; width: 100%; }
.member-name, .person-tag { overflow-wrap: anywhere; }
.task-tags { flex-wrap: wrap; max-width: 220px; white-space: normal; }
.person-tag { max-width: 100%; }
.priorities-label { padding: 8px 0; color: #6e431f; }
.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; align-items: start; }
.dashboard-widgets { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; }
.module-panel { min-width: 0; padding: 0 16px 14px; }
.module-panel .card-heading { flex-wrap: wrap; padding: 9px 0; }
.module-panel .card-heading h2 { display: flex; align-items: center; gap: 9px; font-size: 1.19rem; }
.module-panel .card-heading .stat-icon { width: 32px; height: 32px; }
.module-panel p + p { margin-top: 8px; }
.module-panel progress { margin: 10px 0 4px; }
.module-mark { margin: 0 0 10px; }
.module-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 13px; }
.module-toolbar select { width: auto; min-width: 180px; }
.module-toolbar label { font-weight: 650; }
.module-rows { list-style: none; margin: 0; padding: 0; }
.module-rows > li { display: flex; justify-content: space-between; align-items: center; gap: 9px; min-height: 43px; padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.module-rows > li > div:first-child { min-width: 0; }
.module-rows small { display: block; color: var(--muted); font-size: .875rem; }
.row-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.row-controls .button, .module-rows > li .button { min-height: 36px; }
.check-entry { display: inline-flex; align-items: center; gap: 9px; min-width: 0; cursor: pointer; }
input[type="checkbox"] { min-width: 16px; width: 18px; height: 18px; min-height: 0; padding: 0; flex: 0 0 auto; accent-color: var(--forest); }
.check-entry > span { min-width: 0; }
.check-entry input:checked + span { text-decoration: line-through; color: var(--muted); }
.module-form { display: grid; gap: 10px; margin-top: 13px; }
.module-form label, .receipt-filters label { display: grid; gap: 4px; min-width: 0; font-size: .95rem; font-weight: 650; }
.module-form .inline-check, .assignment-picker label, #editor-form .assignment-picker label { display: flex; align-items: center; gap: 5px; }
.assignment-picker { min-width: 0; padding: 8px 10px 10px; border: 1px solid var(--line); border-radius: 8px; }
.assignment-picker legend { padding: 0 4px; font-weight: 640; }
.assignment-picker > div { display: flex; flex-wrap: wrap; gap: 8px 13px; }
#editor-form .assignment-picker label input { margin: 0; }
.module-form input[type="file"] { overflow: hidden; }
.preserve-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.project-notes { margin: 0 0 15px; padding: 10px; background: var(--gold); border-radius: 9px; }
.plain-list { margin: 2px 0; padding-left: 18px; }
.plain-list li + li { margin-top: 8px; }
.member-profile { padding: 15px; }
.profile-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.profile-heading p { color: var(--muted); margin-top: 2px; }
.event-operations { margin: 0 0 16px; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.week-strip a { display: grid; justify-items: center; gap: 2px; padding: 6px 1px; border: 1px solid var(--line); border-radius: 6px; font-size: .82rem; }
.week-strip a.current, .week-strip a:hover { background: var(--sage); color: var(--forest-dark); }
.week-strip small { color: var(--muted); }
.weather-current { display: flex; gap: 11px; align-items: center; margin-bottom: 8px; }
.weather-current > strong { font-size: 1.8rem; line-height: 1; color: var(--forest-dark); white-space: nowrap; }
.weather-current small { display: block; color: var(--muted); }
.forecast { list-style: none; margin: 0; padding: 0; }
.forecast li { display: grid; grid-template-columns: 2.7em 4.1em minmax(0, 1fr); gap: 5px; padding: 4px 0; border-top: 1px solid var(--line); }
.forecast small, .weather-credit { color: var(--muted); font-size: .83rem; }
.weather-credit { display: inline-block; margin-top: 5px; text-decoration: underline; }
.receipt-filters { display: grid; grid-template-columns: 1.45fr 1fr 1fr 1.15fr auto; align-items: end; gap: 8px; padding-bottom: 10px; }
.receipt-review-image { display: block; width: auto; max-width: 100%; max-height: 32vh; margin: 0 auto 8px; border-radius: 6px; object-fit: contain; }
.receipt-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 0 0 12px; }
.receipt-summary div { background: var(--sage); padding: 7px; border-radius: 7px; }
.receipt-summary dt { font-size: .88rem; color: var(--muted); }
.receipt-summary dd { margin: 0; font-weight: 690; }
.return-date { color: #6e431f !important; }
.lock-panel { max-width: 420px; margin-inline: auto; }
.lock-panel h1 { font-size: 2.6rem; }
.family-locked .sidebar, .family-locked .top-actions, .family-locked .mobile-scan, .child-mode .backup-link, .child-mode .mobile-backup, .child-mode #header-add, .child-mode .mobile-scan { display: none !important; }
.family-locked .layout { display: block; }
#module-nav { width: min(525px, calc(100% - 20px)); }
.module-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.module-menu a { padding: 8px; border-radius: 8px; background: var(--sage); min-height: 41px; font-size: .9rem; }

@media(max-width: 1280px) {
  .dashboard-widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media(max-width: 960px) {
  .quick-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .receipt-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media(max-width: 800px) {
  .sidebar .brand { margin-bottom: 0; }
  .nav { grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; }
  .child-mode .nav { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .nav a, .mobile-modules, .mobile-scan { min-height: 49px; padding: 4px 1px; font-size: .76rem; }
  .extra-nav { display: none; }
  .mobile-modules, .mobile-scan { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 650; }
  .mobile-modules.active { color: var(--forest-dark); background: var(--sage); }
  .mobile-scan { background: var(--forest-dark); color: var(--paper); }
  .mobile-scan svg { color: #eace94; }
}
@media(max-width: 570px) {
  .module-grid, .dashboard-widgets { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-actions .button { font-size: .84rem; }
  .page-heading { flex-wrap: wrap; }
  .member-grid { grid-template-columns: repeat(auto-fit, minmax(min(124px, 100%), 1fr)); }
  .member-card .profile-color { height: 36px; }
  .task-tags { max-width: 100%; }
}
