:root {
  --ink: #21352f;
  --muted: #718078;
  --cream: #f7f4ed;
  --paper: #fffdfa;
  --green: #2f6b57;
  --mint: #dceadf;
  --peach: #f6d5b8;
  --yellow: #f5e3a6;
  --lav: #dcd7ef;
  --red: #b64b48;
  --shadow: 0 16px 45px rgba(46, 72, 62, 0.09);
  font-family: "Sofia Pro Soft", "Arial Rounded MT Bold", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 0, #e3eee4 0, transparent 28%), var(--cream);
}
button,
input,
select {
  font: inherit;
}
.shell {
  max-width: 1180px;
  margin: auto;
  padding: 0 28px 70px;
}
.topbar {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  border: 0;
  background: none;
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  font-size: 21px;
  color: var(--ink);
  cursor: pointer;
}
.brandmark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  font-family: "Sofia Pro Soft", "Arial Rounded MT Bold", ui-rounded, sans-serif;
  font-style: italic;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 14px;
}
.icon-btn,
.back {
  border: 0;
  background: var(--paper);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}
.view {
  display: none;
}
.view.active {
  display: block;
  animation: rise 0.35s ease;
}
.hero {
  text-align: center;
  padding: 52px 10px 35px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  font-weight: 900;
  color: var(--green);
  margin: 0 0 10px;
}
.hero h1,
.child-head h1,
.parent-head h1 {
  font-family: "Sofia Pro Soft", "Arial Rounded MT Bold", ui-rounded, sans-serif;
  font-size: clamp(40px, 6vw, 70px);
  line-height: 1.02;
  margin: 0;
}
.hero h1 em {
  color: var(--green);
  font-weight: 400;
}
.hero > p:last-child {
  color: var(--muted);
  font-size: 17px;
}
.profiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 12px auto 35px;
  max-width: 900px;
}
.profile {
  position: relative;
  border: 0;
  border-radius: 28px;
  padding: 28px 18px 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: 0.2s;
}
.profile:hover {
  transform: translateY(-5px);
}
.avatar {
  width: 96px;
  height: 96px;
  border-radius: 31px;
  display: grid;
  place-items: center;
  margin: auto;
  font-size: 50px;
}
.profile h3 {
  font-size: 20px;
  margin: 16px 0 4px;
}
.profile p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.point-pill {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--ink);
  color: white;
  border-radius: 99px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 800;
}
.card {
  background: var(--paper);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.family-goal {
  max-width: 900px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.goal-icon {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--yellow);
  display: grid;
  place-items: center;
  font-size: 27px;
}
.grow {
  flex: 1;
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.row span {
  color: var(--muted);
  font-size: 13px;
}
.progress {
  height: 9px;
  background: #e9e9e3;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: 10px;
}
.family-goal small {
  color: var(--muted);
}
.back {
  border-radius: 99px;
  padding: 10px 15px;
  color: var(--ink);
  margin: 16px 0 30px;
}
.child-head,
.parent-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.child-head h1,
.parent-head h1 {
  font-size: clamp(40px, 6vw, 60px);
}
.wallet {
  text-align: right;
  background: var(--ink);
  color: #fff;
  padding: 18px 24px;
  border-radius: 23px;
}
.wallet small,
.wallet span {
  display: block;
  opacity: 0.7;
}
.wallet strong {
  font-size: 31px;
}
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #dedfd9;
  margin-bottom: 28px;
}
.tabs button {
  border: 0;
  background: transparent;
  padding: 13px 18px;
  color: var(--muted);
  font-weight: 750;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
.tabs button.active {
  color: var(--green);
  border-color: var(--green);
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 18px;
}
.section-title h2 {
  margin: 0;
  font-family: "Sofia Pro Soft", "Arial Rounded MT Bold", ui-rounded, sans-serif;
  font-size: 28px;
}
.streak {
  background: #fff0db;
  padding: 9px 13px;
  border-radius: 99px;
  font-size: 13px;
}
.task-list {
  display: grid;
  gap: 12px;
}
.task {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 16px;
  background: var(--paper);
  padding: 15px 18px;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(46, 72, 62, 0.06);
}
.task.done {
  opacity: 0.65;
}
.task-emoji {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: var(--mint);
  font-size: 25px;
}
.task h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.task p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.task button,
.approve,
.reject {
  border: 0;
  border-radius: 13px;
  padding: 11px 14px;
  font-weight: 800;
  cursor: pointer;
}
.task button {
  background: var(--green);
  color: #fff;
}
.task button[disabled] {
  background: #cbd2cd;
}
.reward-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.reward {
  background: var(--paper);
  box-shadow: var(--shadow);
  border-radius: 24px;
  overflow: hidden;
}
.reward-visual {
  height: 140px;
  display: grid;
  place-items: center;
  font-size: 60px;
  background: var(--mint);
}
.reward-body {
  padding: 18px;
}
.reward h3 {
  margin: 0 0 7px;
}
.reward p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
}
.history-list {
  display: grid;
  gap: 10px;
}
.history {
  background: var(--paper);
  border-radius: 16px;
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
}
.history.plus strong {
  color: var(--green);
}
.history.minus strong {
  color: var(--red);
}
.primary {
  border: 0;
  background: var(--green);
  color: #fff;
  border-radius: 14px;
  padding: 13px 17px;
  font-weight: 800;
  cursor: pointer;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.stat {
  background: var(--paper);
  box-shadow: var(--shadow);
  border-radius: 20px;
  padding: 19px;
}
.stat small {
  display: block;
  color: var(--muted);
}
.stat strong {
  display: block;
  font-size: 30px;
  margin-top: 5px;
}
.parent-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 20px;
}
.approval {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 15px;
  align-items: center;
  padding: 15px 0;
  border-top: 1px solid #ecece7;
}
.approval:first-child {
  border: 0;
}
.approval p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}
.approve {
  background: var(--green);
  color: #fff;
}
.reject {
  background: #f6e4e1;
  color: var(--red);
}
.approval-actions {
  display: flex;
  gap: 7px;
}
.person-progress {
  margin: 18px 0;
}
.person-progress .row strong {
  font-size: 14px;
}
dialog {
  border: 0;
  padding: 0;
  border-radius: 25px;
  background: transparent;
}
dialog::backdrop {
  background: rgba(24, 43, 36, 0.45);
  backdrop-filter: blur(6px);
}
.dialog-card {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  background: var(--paper);
  padding: 30px;
  border-radius: 25px;
  box-shadow: var(--shadow);
}
.dialog-card h2 {
  font-family: "Sofia Pro Soft", "Arial Rounded MT Bold", ui-rounded, sans-serif;
  font-size: 30px;
  margin: 0;
}
.dialog-card > p:not(.eyebrow) {
  color: var(--muted);
}
.dialog-card label {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  font-weight: 700;
  font-size: 13px;
}
.dialog-card input,
.dialog-card select {
  width: 100%;
  border: 1px solid #dcded8;
  background: #fff;
  padding: 13px;
  border-radius: 12px;
  outline: none;
}
.dialog-close {
  position: absolute;
  right: 18px;
  top: 15px;
  border: 0;
  background: none;
  font-size: 27px;
  cursor: pointer;
}
.wide {
  width: 100%;
  margin-top: 10px;
}
.error {
  color: var(--red) !important;
  min-height: 20px;
  font-size: 13px;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 100px);
  background: var(--ink);
  color: #fff;
  padding: 13px 20px;
  border-radius: 99px;
  opacity: 0;
  transition: 0.25s;
  z-index: 10;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }
  .shell {
    padding: 0 16px 50px;
  }
  .topbar {
    height: 75px;
  }
  .top-actions > span {
    display: none;
  }
  .hero {
    padding-top: 32px;
  }
  .hero h1 {
    font-size: clamp(35px, 9.5vw, 42px);
  }
  .profiles {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  .profile {
    width: 100%;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    align-items: center;
    text-align: left;
    padding: 15px 78px 15px 15px;
  }
  .avatar {
    width: 68px;
    height: 68px;
    border-radius: 22px;
    font-size: 38px;
    margin: 0;
  }
  .profile h3 {
    margin: 0 0 4px;
  }
  .point-pill {
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    font-size: 10px;
  }
  .family-goal {
    align-items: flex-start;
  }
  .family-goal .row {
    flex-wrap: wrap;
  }
  .family-goal .row span {
    width: 100%;
  }
  .child-head,
  .parent-head {
    align-items: flex-start;
  }
  .wallet {
    padding: 14px 16px;
  }
  .wallet strong {
    font-size: 23px;
  }
  .reward-grid,
  .stats,
  .parent-grid {
    grid-template-columns: 1fr;
  }
  .task {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    padding: 13px;
  }
  .task-emoji {
    width: 46px;
    height: 46px;
  }
  .task button {
    padding: 10px;
    font-size: 12px;
  }
  .approval {
    grid-template-columns: 1fr;
  }
  .parent-head .primary {
    font-size: 0;
  }
  .parent-head .primary:after {
    content: "+";
    font-size: 22px;
  }
}
.hidden {
  display: none !important;
}
.auth-wrap {
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 70px;
  align-items: center;
  max-width: 980px;
  margin: auto;
}
.auth-wrap.compact {
  max-width: 820px;
}
.auth-copy h1 {
  font: 700 58px/1.03 var(--font-rutina);
  margin: 0;
}
.auth-copy h1 em {
  font-weight: 400;
  color: var(--green);
}
.auth-copy > p:last-child {
  color: var(--muted);
  font-size: 17px;
  max-width: 520px;
}
.auth-card h2 {
  font: 600 32px/1.1 var(--font-rutina);
  margin: 0 0 22px;
}
.auth-card label {
  display: grid;
  gap: 7px;
  margin: 15px 0;
  font-size: 13px;
  font-weight: 800;
}
.auth-card input,
.auth-card select,
.dialog-card input,
.dialog-card select {
  border: 1px solid #dcded8;
  background: #fff;
  padding: 13px;
  border-radius: 12px;
  outline: none;
}
.auth-card input:focus,
.dialog-card input:focus,
.dialog-card select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 107, 87, 0.1);
}
.text-btn {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 14px;
  width: 100%;
  cursor: pointer;
}
.button-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.secondary {
  border: 1px solid #d7ddd9;
  background: var(--paper);
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 15px;
  font-weight: 800;
  cursor: pointer;
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-row label:first-child {
  max-width: 90px;
}
.form-row .grow {
  max-width: none;
}
.weekday-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 18px;
}
.weekday-picker label {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--cream);
  padding: 8px;
  border-radius: 10px;
  margin: 0;
}
.weekday-picker input {
  width: auto;
  padding: 0;
}
.reward-child-picker {
  margin: 12px 0 18px;
  padding: 14px;
  border: 1px solid #dcded8;
  border-radius: 14px;
  background: var(--cream);
}
.reward-child-picker > strong,
.reward-child-picker > small {
  display: block;
}
.reward-child-picker > small {
  margin-top: 8px;
  color: var(--muted);
}
#rewardChildChoices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
#rewardChildChoices label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 9px 11px;
  border-radius: 11px;
  background: #fff;
}
#rewardChildChoices input {
  width: auto;
  padding: 0;
}
.reward-btn[disabled],
.primary[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.empty {
  color: var(--muted);
  padding: 20px;
  text-align: center;
}
.manage-card {
  margin-top: 20px;
}
.people-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.mini-person {
  display: grid;
  grid-template-columns: 48px auto;
  grid-template-rows: auto auto;
  column-gap: 11px;
  align-items: center;
}
.avatar.small {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  font-size: 25px;
  grid-row: 1/3;
}
.mini-person small {
  color: var(--muted);
}
.reward-approval {
  background: #fffaf0;
  margin: 0 -10px;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 12px;
}
@media (max-width: 760px) {
  .auth-wrap {
    grid-template-columns: 1fr;
    gap: 25px;
    min-height: auto;
    padding: 35px 0;
  }
  .auth-copy h1 {
    font-size: 42px;
  }
  .auth-card {
    padding: 22px;
  }
  .parent-head {
    display: block;
  }
  .button-row {
    justify-content: flex-start;
    margin-top: 18px;
  }
  .button-row button {
    font-size: 12px !important;
  }
  .parent-head .primary:after {
    content: none;
  }
  .form-row {
    align-items: end;
  }
  .child-head h1 {
    font-size: 39px;
  }
}
.management-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.manage-card {
  min-width: 0;
}
.manage-list {
  display: grid;
  gap: 10px;
}
.manage-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: #f8f8f4;
  border: 1px solid #edf0eb;
}
.round-icon,
.approval-media {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 27px;
  flex: none;
}
.media-img,
.round-icon img,
.round-preview img,
.reward-visual img,
.task-emoji img,
.avatar img,
.approval-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-emoji {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}
.media-img.preset-task-icon {
  width: 80%;
  height: 80%;
  object-fit: contain;
}
.media-img.preset-avatar,
.round-preview img.preset-avatar {
  width: 90%;
  height: 90%;
  object-fit: contain;
}
.media-img.uploaded-photo,
.round-preview img.uploaded-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.manage-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.manage-copy strong,
.manage-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.manage-copy small {
  color: var(--muted);
  font-size: 11px;
}
.icon-actions {
  display: flex;
  gap: 5px;
}
.icon-actions button,
.circle-add {
  border: 0;
  background: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 5px 15px rgba(46, 72, 62, 0.08);
  cursor: pointer;
  transition: 0.2s;
}
.icon-actions button:hover,
.circle-add:hover {
  transform: translateY(-2px);
  background: var(--mint);
}
.circle-add {
  font-size: 23px;
  color: var(--green);
}
.approval {
  grid-template-columns: 52px minmax(0, 1fr) auto;
}
.approval-media {
  width: 48px;
  height: 48px;
  background: var(--mint);
  font-size: 23px;
}
.image-picker {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 8px 14px;
  align-items: center;
  margin: 20px 0;
}
.round-preview {
  grid-row: 1/3;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: var(--mint);
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 40px;
  border: 4px solid white;
  box-shadow: 0 8px 22px rgba(46, 72, 62, 0.12);
}
.upload-btn {
  display: block !important;
  margin: 0 !important;
  background: var(--ink);
  color: #fff;
  padding: 11px 14px;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
}
.upload-btn input {
  display: none;
}
.remove-image {
  padding: 5px !important;
  text-align: left;
}
.task-icon-section {
  margin: 2px 0 18px;
  padding: 14px;
  border: 1px solid #e8e3ef;
  border-radius: 16px;
  background: #faf8ff;
}
.task-icon-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.task-icon-heading span {
  display: grid;
  gap: 3px;
}
.task-icon-heading strong {
  font-size: 13px;
}
.task-icon-heading small {
  color: var(--muted);
  font-size: 11px;
}
.task-icon-picker {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  max-height: 310px;
  overflow-y: auto;
  margin-top: 12px;
  padding: 2px 4px 2px 2px;
}
.task-icon-picker.hidden {
  display: none;
}
.task-icon-choice {
  position: relative;
  min-width: 0;
  padding: 7px 5px 6px;
  border: 2px solid transparent;
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.task-icon-choice img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
  margin: 0 auto 4px;
}
.task-icon-choice span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 700;
}
.task-icon-choice:hover,
.task-icon-choice.selected {
  border-color: #7625ed;
  background: #f2eaff;
}
.task-icon-choice.selected::after {
  content: "✓";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #7625ed;
  color: white;
  font-size: 10px;
  font-weight: 900;
}
@media (max-width: 620px) {
  .task-icon-picker {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.avatar-choice-label {
  display: block;
  margin: 18px 0 10px;
  font-size: 13px;
  font-weight: 800;
}
.avatar-choice-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.avatar-choice {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  padding: 5px;
  border: 2px solid #ece8f4;
  border-radius: 14px;
  background: #faf8ff;
  cursor: pointer;
  transition: 0.15s ease;
}
.avatar-choice img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.avatar-choice:hover {
  transform: translateY(-2px);
  border-color: #b47af3;
}
.avatar-choice.selected {
  border-color: #7625ed;
  background: #f1e8ff;
  box-shadow: 0 0 0 2px rgba(118, 37, 237, 0.14);
}
.avatar-choice.selected::after {
  content: "✓";
  position: absolute;
  right: -4px;
  top: -5px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #7625ed;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}
.avatar-choice-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 4px;
  color: #777a99;
  font-size: 11px;
}
.avatar-choice-divider::before,
.avatar-choice-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #ece9f2;
}
#childDialog .dialog-card {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
@media (max-width: 560px) {
  .avatar-choice-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
.dialog-card small {
  font-weight: 400;
  color: var(--muted);
}
.reward-visual .media-emoji {
  font-size: 60px;
}
.reward-visual .media-img {
  border-radius: 0;
}
.task-emoji .media-emoji {
  font-size: 25px;
}
@media (max-width: 980px) {
  .management-grid {
    grid-template-columns: 1fr;
  }
  .manage-card {
    margin-top: 0;
  }
}
@media (max-width: 760px) {
  .manage-item {
    grid-template-columns: 50px minmax(0, 1fr) auto;
  }
  .round-icon {
    width: 50px;
    height: 50px;
  }
  .icon-actions button {
    width: 34px;
    height: 34px;
  }
  .approval {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .approval-actions {
    grid-column: 2;
  }
  .image-picker {
    grid-template-columns: 76px 1fr;
  }
  .round-preview {
    width: 76px;
    height: 76px;
  }
  .reward-visual {
    height: 180px;
  }
}

/* Homepage redesign based on the supplied iPad and iPhone renders */
:root {
  --rutina-navy: #080d46;
  --rutina-purple: #7c2df2;
  --rutina-pink: #f238a0;
  --rutina-blue: #008eeb;
  --rutina-orange: #ff8a00;
  --rutina-green: #20bd64;
}
.app-sidebar {
  display: none;
}
.login-mode {
  background: #fff;
  color: var(--rutina-navy);
}
.login-mode .shell {
  max-width: none;
  margin: 0;
  padding: 0 0 48px;
}
.login-mode .topbar {
  display: none;
}
.login-mode .app-sidebar {
  display: none;
  position: fixed;
  z-index: 5;
  inset: 0 auto 0 0;
  width: 286px;
  background: rgba(255, 255, 255, 0.96);
  border-right: 1px solid #e6e8f5;
  flex-direction: column;
  padding: 48px 24px 40px;
}
.device-time {
  position: absolute;
  top: 12px;
  left: 24px;
  font-size: 12px;
  font-weight: 800;
}
.side-brand {
  border: 0;
  background: none;
  padding: 18px 28px 30px;
  cursor: pointer;
}
.side-brand img {
  display: block;
  width: 178px;
}
.side-nav {
  display: grid;
  gap: 8px;
}
.side-nav button {
  height: 53px;
  border: 0;
  background: transparent;
  border-radius: 14px;
  padding: 0 18px;
  color: #5c63a0;
  text-align: left;
  font-size: 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
}
.side-nav button span {
  font-size: 15px;
  font-weight: 650;
}
.side-nav button.active {
  color: #fff;
  background: linear-gradient(110deg, #7025ec, #a642f4);
  box-shadow: 0 10px 24px rgba(126, 43, 240, 0.22);
}
.side-message {
  margin-top: auto;
  border: 1px solid #ead9ff;
  border-radius: 20px;
  padding: 28px 22px 24px;
  color: var(--rutina-navy);
  font-size: 14px;
  line-height: 1.5;
}
.side-message b {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7024ef, #a845f4);
  color: white;
  font-size: 25px;
  margin-bottom: 14px;
}
.login-hero {
  height: auto;
  aspect-ratio: 1774 / 515;
  position: relative;
  overflow: hidden;
  background: #f6f3ff;
}
.login-hero picture,
.hero-banner {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-banner {
  object-fit: contain;
}
.hero-copy {
  position: absolute;
  left: 8.7%;
  top: 90px;
  z-index: 2;
}
.hero-logo {
  width: 420px;
  max-height: 110px;
}
.hero-copy p {
  margin: 10px 0 0 4px;
  color: #5e6191;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 650;
}
.hero-copy b {
  color: var(--rutina-purple);
}
.hero-copy em {
  color: var(--rutina-pink);
  font-style: normal;
}
.hero-house {
  position: absolute;
  right: 4.5%;
  bottom: -5px;
  width: 520px;
  height: 270px;
  object-fit: contain;
  object-position: bottom;
}
.spark {
  position: absolute;
  font-style: normal;
  font-size: 24px;
}
.s1 {
  left: 6%;
  top: 104px;
  color: #ffc000;
}
.s2 {
  left: 45%;
  top: 116px;
  color: #2acb78;
}
.s3 {
  left: 3%;
  bottom: 55px;
  color: #9d4df5;
}
.s4 {
  right: 7%;
  top: 96px;
  color: #ef42c8;
}
.profile-sheet {
  position: relative;
  margin-top: -2px;
  background: #fff;
  border-radius: 42px 42px 0 0;
  padding: 22px 5.2% 8px;
  min-height: 690px;
  box-shadow: 0 -10px 30px rgba(89, 79, 148, 0.04);
}
.profile-title {
  text-align: center;
}
.profile-title h1 {
  margin: 0;
  font-size: 38px;
  letter-spacing: -1.5px;
}
.profile-title p {
  margin: 5px 0;
  color: #676a9d;
  font-size: 16px;
}
.profile-title span {
  display: block;
  width: 38px;
  height: 5px;
  border-radius: 5px;
  background: linear-gradient(90deg, #842bf4, #b344f5);
  margin: 14px auto 18px;
}
.login-mode .profiles {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
  justify-content: center;
  gap: 20px;
}
.login-mode .profile {
  height: 385px;
  border-radius: 24px;
  padding: 18px 18px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(150deg, #fff 55%, #faf7ff);
  border: 1.5px solid #d8cbff;
  box-shadow: 0 12px 25px rgba(59, 55, 110, 0.12);
  overflow: hidden;
}
.login-mode .profile.blue {
  border-color: #a8ddff;
  background: linear-gradient(150deg, #eff9ff, #fff);
}
.login-mode .profile.orange {
  border-color: #ffd58c;
  background: linear-gradient(150deg, #fff8e9, #fff);
}
.login-mode .profile.green {
  border-color: #afeac7;
  background: linear-gradient(150deg, #effcf4, #fff);
}
.login-mode .profile:hover {
  transform: translateY(-4px);
}
.login-mode .avatar {
  width: 145px;
  height: 145px;
  border-radius: 50%;
  font-size: 72px;
  margin: 0;
  overflow: hidden;
  background: #edd0ff !important;
}
.login-mode .profile.blue .avatar {
  background: #bde7ff !important;
}
.login-mode .profile.orange .avatar {
  background: #ffe1a5 !important;
}
.login-mode .profile.green .avatar {
  background: #b8f2ce !important;
}
.login-mode .profile h3 {
  margin: 4px 0 7px;
  font-size: 28px;
  color: var(--rutina-purple);
  line-height: 1;
}
.login-mode .profile.blue h3 {
  color: var(--rutina-blue);
}
.login-mode .profile.orange h3 {
  color: var(--rutina-orange);
}
.login-mode .profile.green h3 {
  color: var(--rutina-green);
}
.selected {
  display: none;
  position: absolute;
  right: 17px;
  top: 17px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--rutina-purple);
  color: #fff;
  place-items: center;
  font-size: 24px;
}
.login-mode .profile:first-child .selected {
  display: grid;
}
.points-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 30px;
  background: #fff;
  padding: 7px 12px;
  color: #62658f;
  font-size: 13px;
  box-shadow: 0 5px 15px rgba(41, 45, 89, 0.1);
}
.points-badge b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffc318;
  color: #c87800;
  font-size: 20px;
}
.points-badge strong {
  font-size: 18px;
  color: var(--rutina-navy);
}
.goal-copy {
  position: absolute;
  left: 20px;
  right: 85px;
  bottom: 50px;
  text-align: left;
}
.goal-copy small,
.goal-copy strong {
  display: block;
}
.goal-copy small {
  font-size: 11px;
  color: #61658d;
}
.goal-copy strong {
  font-size: 14px;
  margin-top: 3px;
  color: var(--rutina-purple);
}
.blue .goal-copy strong {
  color: var(--rutina-blue);
}
.orange .goal-copy strong {
  color: var(--rutina-orange);
}
.green .goal-copy strong {
  color: var(--rutina-green);
}
.goal-media {
  position: absolute;
  right: 7px;
  bottom: 22px;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  font-size: 52px;
}
.goal-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.goal-progress {
  position: absolute;
  left: 20px;
  bottom: 25px;
  width: 49%;
  height: 10px;
  background: #e6e4ec;
  border-radius: 9px;
  overflow: hidden;
}
.goal-progress i {
  display: block;
  height: 100%;
  border-radius: 9px;
  background: linear-gradient(90deg, #7126ed, #c45dff);
}
.blue .goal-progress i {
  background: linear-gradient(90deg, #078eea, #54bfff);
}
.orange .goal-progress i {
  background: linear-gradient(90deg, #ff8600, #ffb719);
}
.green .goal-progress i {
  background: linear-gradient(90deg, #20b95b, #67d793);
}
.login-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 48px;
}
.login-choice {
  min-height: 120px;
  border: 1px solid #dcdded;
  background: #fff;
  border-radius: 20px;
  padding: 22px 25px;
  display: grid;
  grid-template-columns: 64px 1fr 24px;
  align-items: center;
  text-align: left;
  color: var(--rutina-navy);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 39, 85, 0.06);
}
.login-choice.add-profile {
  border: 1.5px dashed #b970ff;
}
.login-choice > b {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #f1e8ff;
  color: #7928ed;
  font-size: 32px;
}
.login-choice.add-profile > b {
  background: linear-gradient(135deg, #7125ee, #bd57ff);
  color: #fff;
}
.login-choice span {
  display: grid;
  gap: 6px;
}
.login-choice strong {
  font-size: 19px;
  color: #090d3d;
}
.login-choice.add-profile strong {
  color: #6c20dc;
}
.login-choice small {
  font-size: 13px;
  color: #666990;
}
.login-choice i {
  font-style: normal;
  font-size: 42px;
  color: #6f1df1;
}
.login-mode #setupView,
.login-mode #unlockView {
  padding: 0 28px;
}
.login-mode #setupView.active ~ *,
.login-mode #unlockView.active ~ * {
  display: none;
}
@media (max-width: 1050px) and (min-width: 761px) {
  .login-mode .shell {
    padding-left: 0;
  }
  .login-mode .app-sidebar {
    width: 230px;
  }
  .hero-logo {
    width: 330px;
  }
  .hero-house {
    width: 410px;
  }
  .login-mode .profile {
    height: 350px;
  }
  .login-mode .avatar {
    width: 120px;
    height: 120px;
  }
  .goal-media {
    width: 68px;
    height: 68px;
  }
}
@media (max-width: 760px) {
  .login-mode .app-sidebar {
    display: none;
  }
  .login-mode .shell {
    padding: 0;
    min-height: 100vh;
  }
  .login-hero {
    height: auto;
    aspect-ratio: 1672 / 941;
  }
  .hero-copy {
    position: relative;
    left: auto;
    top: 92px;
    text-align: center;
  }
  .hero-logo {
    width: 455px;
    max-width: 72vw;
  }
  .hero-copy p {
    font-size: clamp(20px, 4.6vw, 28px);
    margin-top: 16px;
  }
  .hero-house {
    width: 500px;
    max-width: 76vw;
    height: 205px;
    right: 50%;
    transform: translateX(50%);
    bottom: -8px;
  }
  .spark.s1 {
    left: 14%;
    top: 185px;
  }
  .spark.s2 {
    left: auto;
    right: 15%;
    top: 142px;
  }
  .spark.s3 {
    left: 18%;
    bottom: 140px;
  }
  .spark.s4 {
    right: 14%;
    top: 260px;
  }
  .profile-sheet {
    margin-top: -1px;
    border-radius: 42px 42px 0 0;
    padding: 26px 6.4% 52px;
    min-height: 1000px;
  }
  .profile-title h1 {
    font-size: clamp(34px, 7vw, 48px);
  }
  .profile-title p {
    font-size: 20px;
  }
  .profile-title span {
    margin: 18px auto 30px;
    width: 52px;
  }
  .login-mode .profiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
  }
  .login-mode .profile {
    height: 464px;
    padding: 22px 12px 18px;
    border-radius: 26px;
  }
  .login-mode .avatar {
    width: 190px;
    height: 190px;
    max-width: 80%;
    font-size: 82px;
  }
  .login-mode .profile h3 {
    font-size: 34px;
    margin: 4px 0 8px;
  }
  .points-badge {
    padding: 7px 12px;
    font-size: 16px;
  }
  .points-badge strong {
    font-size: 22px;
  }
  .goal-copy {
    left: 18px;
    right: 70px;
    bottom: 57px;
  }
  .goal-copy small {
    font-size: 13px;
  }
  .goal-copy strong {
    font-size: 17px;
  }
  .goal-media {
    width: 98px;
    height: 98px;
    right: 2px;
    bottom: 21px;
  }
  .goal-progress {
    left: 18px;
    bottom: 30px;
    height: 11px;
    width: 51%;
  }
  .login-choices {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 30px;
  }
  .login-choice {
    min-height: 122px;
  }
  .selected {
    display: none !important;
  }
}
@media (max-width: 480px) {
  .login-hero {
    height: auto;
  }
  .hero-copy {
    top: 62px;
  }
  .hero-copy p {
    font-size: 16px;
  }
  .hero-house {
    height: 145px;
  }
  .profile-sheet {
    padding-left: 5%;
    padding-right: 5%;
    border-radius: 32px 32px 0 0;
  }
  .profile-title h1 {
    font-size: 30px;
  }
  .profile-title p {
    font-size: 16px;
  }
  .profile-title span {
    margin: 12px auto 20px;
  }
  .login-mode .profiles {
    gap: 12px;
  }
  .login-mode .profile {
    height: 340px;
    border-radius: 20px;
    padding: 14px 7px;
  }
  .login-mode .avatar {
    width: 128px;
    height: 128px;
    font-size: 64px;
  }
  .login-mode .profile h3 {
    font-size: 26px;
  }
  .points-badge {
    font-size: 12px;
    padding: 5px 8px;
  }
  .points-badge b {
    width: 25px;
    height: 25px;
  }
  .points-badge strong {
    font-size: 17px;
  }
  .goal-copy {
    left: 12px;
    right: 48px;
    bottom: 43px;
  }
  .goal-copy small {
    font-size: 10px;
  }
  .goal-copy strong {
    font-size: 13px;
  }
  .goal-media {
    width: 65px;
    height: 65px;
    right: 0;
    bottom: 18px;
  }
  .goal-progress {
    left: 12px;
    bottom: 19px;
    height: 8px;
  }
  .login-choice {
    min-height: 96px;
    padding: 14px;
    grid-template-columns: 50px 1fr 16px;
  }
  .login-choice > b {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }
  .login-choice strong {
    font-size: 16px;
  }
  .login-choice small {
    font-size: 11px;
  }
  .login-choice i {
    font-size: 30px;
  }
}

/* Child task dashboard */
body:has(#childView.active) {
  background: #fff;
  color: var(--rutina-navy);
}
body:has(#childView.active) > .shell {
  max-width: none;
  padding: 0;
}
body:has(#childView.active) > .shell > .topbar {
  display: none;
}
#childView.active {
  min-height: 100vh;
  padding-left: 272px;
}
.child-sidebar {
  position: fixed;
  z-index: 5;
  inset: 0 auto 0 0;
  width: 272px;
  border-right: 1px solid #e7e8f2;
  background: #fff;
  padding: 63px 26px 35px;
  display: flex;
  flex-direction: column;
}
.child-sidebar > img {
  width: 180px;
  margin: 0 0 42px 5px;
}
.child-sidebar nav {
  display: grid;
  gap: 13px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #ececf5;
}
.child-sidebar nav button {
  height: 54px;
  border: 0;
  background: transparent;
  color: #5c6293;
  border-radius: 14px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 17px;
  font-size: 25px;
  cursor: pointer;
  text-align: left;
}
.child-sidebar nav span {
  font-size: 16px;
  font-weight: 650;
}
.child-sidebar nav button.active {
  color: #fff;
  background: linear-gradient(110deg, #6f23eb, #a43ef5);
  box-shadow: 0 9px 22px rgba(126, 43, 240, 0.2);
}
.dashboard-side-actions {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid #ececf5;
  display: grid;
  gap: 8px;
}
.dashboard-side-actions button,
.side-tool,
.side-home-tool {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  padding: 0 14px;
  background: #f6f1ff;
  color: #6625cf;
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}
.dashboard-side-actions button:hover,
.side-tool:hover,
.side-home-tool:hover {
  background: #eee4ff;
}
.side-home-tool {
  flex: none;
}
.dashboard-side-actions .danger {
  color: #d94168;
  background: #fff2f5;
}
.mobile-top-spacer {
  width: 52px;
  height: 52px;
}
.child-content {
  padding: 32px 28px 90px 34px;
}
.child-welcome {
  max-width: 1108px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  gap: 30px;
}
.child-avatar {
  width: 142px;
  height: 142px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 65px;
  flex: none;
}
.child-welcome h1 {
  font-size: 32px;
  letter-spacing: -1.1px;
  margin: 0 0 12px;
}
.child-welcome h1 em {
  font-style: normal;
  color: #7729ee;
}
.child-welcome p {
  margin: 0;
  color: #606592;
  font-size: 16px;
  font-weight: 600;
}
.welcome-actions {
  margin-left: auto;
  display: flex;
  gap: 14px;
}
.welcome-actions button,
.child-mobile-top button {
  position: relative;
  width: 52px;
  height: 52px;
  border: 1px solid #ececf5;
  background: #fff;
  border-radius: 14px;
  color: #7224ed;
  font-size: 25px;
  box-shadow: 0 6px 18px rgba(53, 47, 98, 0.08);
}
.welcome-actions i,
.child-mobile-top i {
  position: absolute;
  right: -5px;
  top: -5px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f21e6c;
  color: #fff;
  font: 700 12px system-ui;
}
.child-dashboard {
  max-width: 1108px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(280px, 1fr);
  gap: 20px;
}
.points-goal-card,
.streak-card,
.daily-card,
.goals-card,
.mobile-progress {
  background: #fff;
  border: 1px solid #ededf5;
  box-shadow: 0 10px 28px rgba(49, 42, 99, 0.08);
  border-radius: 20px;
}
.points-goal-card {
  min-height: 230px;
  display: grid;
  grid-template-columns: 44% 56%;
  position: relative;
  overflow: hidden;
}
.points-block {
  padding: 25px 30px;
  position: relative;
  border-right: 1px solid #ededf5;
}
.points-block small,
.next-goal small {
  display: block;
  color: #5e6391;
  font-size: 16px;
  font-weight: 650;
}
.points-block > strong {
  display: block;
  color: #7125eb;
  font-size: 53px;
  line-height: 1;
  margin: 18px 0 6px;
}
.points-block > span {
  color: #5b6091;
  font-size: 17px;
}
.coin-stack {
  position: absolute;
  right: 28px;
  top: 58px;
  color: #ff9f00;
  font-size: 74px;
  line-height: 1;
  text-shadow:
    9px -12px 0 #ffb700,
    18px -22px 0 #ff9900;
}
.coin-stack i {
  position: absolute;
  font-style: normal;
  font-size: 22px;
  color: #c77900;
  left: 21px;
  top: 23px;
  text-shadow: none;
}
.next-goal {
  position: relative;
  padding: 25px 175px 25px 30px;
}
.next-goal > strong {
  display: block;
  font-size: 23px;
  margin: 8px 0 13px;
}
.next-goal > span {
  color: #5e6391;
}
.next-goal > span b {
  font-size: 21px;
  color: #7223ed;
}
.next-goal-media {
  position: absolute;
  right: 18px;
  top: 40px;
  width: 150px;
  height: 125px;
  display: grid;
  place-items: center;
  font-size: 72px;
}
.next-goal-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.goal-line {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
}
.goal-line .progress {
  width: 132px;
  margin: 0;
  background: #e4e3ed;
}
.goal-line .progress span {
  background: linear-gradient(90deg, #7122ef, #d168ff);
}
.goal-line > i {
  font-style: normal;
  background: #8731f4;
  color: #fff;
  border-radius: 99px;
  padding: 6px 14px;
  font-weight: 800;
}
.points-foot {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 51px;
  border-top: 1px solid #eeeef4;
  padding: 14px 30px;
  color: #5c6190;
  font-size: 14px;
}
.points-foot b {
  color: #c77b00;
  background: #ffc824;
  border-radius: 50%;
  padding: 3px;
  margin-right: 12px;
}
.task-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 2px 13px;
}
.task-heading h2 {
  font-size: 29px;
  margin: 0;
}
.task-filters {
  display: flex;
  gap: 10px;
}
.task-filters button {
  border: 1px solid #e4e4ef;
  background: #fff;
  color: #5c6190;
  border-radius: 99px;
  padding: 10px 25px;
  cursor: pointer;
}
.task-filters button.active {
  border: 0;
  color: #fff;
  background: linear-gradient(110deg, #6e20eb, #b14af7);
  box-shadow: 0 7px 16px rgba(120, 39, 239, 0.2);
}
#childView .task-list {
  gap: 0;
  background: #fff;
  border: 1px solid #ededf5;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}
#childView .task {
  min-height: 87px;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid #ececf3;
  padding: 12px 18px;
  grid-template-columns: 62px minmax(0, 1fr) auto 54px;
  gap: 17px;
}
#childView .task:last-child {
  border-bottom: 0;
}
.task-copy h3 {
  font-size: 16px;
  margin: 0 0 5px;
}
.task-copy p {
  font-size: 13px;
  color: #666b99;
}
.task-points {
  background: #faf4ff;
  color: #7924ed;
  border-radius: 99px;
  padding: 8px 12px;
  font-size: 18px;
  font-weight: 800;
}
.task-points b {
  color: #c77b00;
  background: #ffc51d;
  border-radius: 50%;
  padding: 2px 4px;
}
.task-check {
  width: 45px;
  height: 45px !important;
  padding: 0 !important;
  border-radius: 12px !important;
  background: #fff !important;
  border: 2px solid #d9d9e8 !important;
  color: #fff !important;
  font-size: 28px !important;
}
.task.done {
  opacity: 1;
}
.task.done .task-check {
  background: #18bd61 !important;
  border-color: #18bd61 !important;
  box-shadow: 0 6px 14px rgba(24, 189, 97, 0.25);
}
.task.pending .task-check {
  color: #7924ed !important;
  background: #f7edff !important;
  border-color: #ead7ff !important;
}
.extra-task {
  width: 100%;
  height: 55px;
  border: 1.5px dashed #b766ff;
  border-top: 0;
  border-radius: 0 0 18px 18px;
  background: #fff;
  color: #7323eb;
  font-size: 20px;
}
.extra-task span {
  font-size: 14px;
  font-weight: 800;
  margin-left: 12px;
}
.child-aside {
  display: grid;
  align-content: start;
  gap: 20px;
}
.streak-card {
  min-height: 230px;
  padding: 28px 22px;
  display: grid;
  grid-template-columns: 52px 1fr;
}
.fire {
  font-size: 43px;
}
.streak-card h3 {
  color: #f06a00;
  font-size: 25px;
  margin: 5px 0;
}
.streak-card h3 small {
  font-size: 16px;
}
.streak-card p {
  margin: 0;
  color: #5f6490;
  font-size: 13px;
}
.streak-week {
  grid-column: 1/3;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  margin-top: 20px;
}
.streak-week span {
  display: grid;
  text-align: center;
  gap: 8px;
}
.streak-week small {
  font-size: 11px;
}
.streak-week i {
  width: 22px;
  height: 22px;
  border: 1.5px solid #d8d9e8;
  border-radius: 50%;
  font-style: normal;
  margin: auto;
}
.streak-week i.hit {
  background: #7a29ed;
  border-color: #7a29ed;
  color: #fff;
}
.streak-week i.required { border-color: #f0a04b; background: #fff5e9; }
.streak-week i.free { border-style: dashed; color: #b7b4c8; }
.streak-reward-progress { grid-column: 1 / 3; display: flex; align-items: center; gap: 11px; margin-top: 18px; padding: 13px; border-radius: 15px; background: #f5edff; }
.streak-reward-progress > span { font-size: 25px; }
.streak-reward-progress > div { display: grid; gap: 2px; }
.streak-reward-progress strong { color: #342d53; font-size: 14px; }
.streak-reward-progress small { color: #6e6a88; line-height: 1.35; }
.streak-reward-progress small b { color: #712bec; }
.daily-card,
.mobile-progress {
  padding: 18px;
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
}
.progress-star {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #7022eb, #bc58fc);
  font-size: 31px;
}
.daily-card p,
.mobile-progress p {
  margin: 6px 0 0;
  color: #5f6490;
}
.daily-progress {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}
.daily-progress > span {
  height: 9px;
  flex: 1;
  background: #e6e5ee;
  border-radius: 10px;
  overflow: hidden;
}
.daily-progress i {
  display: block;
  height: 100%;
  background: #1ac361;
  border-radius: 10px;
}
.goals-card {
  padding: 20px;
}
.aside-title {
  display: flex;
  justify-content: space-between;
}
.aside-title button {
  border: 0;
  background: none;
  color: #7222eb;
}
.mini-goal {
  display: grid;
  grid-template-columns: 64px 1fr 30px;
  gap: 12px;
  align-items: center;
  margin-top: 22px;
}
.mini-goal > div {
  width: 64px;
  height: 64px;
  border-radius: 13px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #fff3f6;
  font-size: 34px;
}
.mini-goal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mini-goal span {
  display: grid;
  gap: 5px;
}
.mini-goal small {
  color: #7222eb;
}
.mini-goal span > i {
  height: 7px;
  background: #e8e6ef;
  border-radius: 7px;
  overflow: hidden;
}
.mini-goal span > i b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7322ec, #c75cfa);
}
.mini-goal em {
  font-style: normal;
  font-size: 11px;
  color: #5d6190;
}
.child-bottom,
.child-mobile-top,
.mobile-progress {
  display: none;
}
@media (max-width: 900px) {
  #childView.active {
    padding-left: 0;
    padding-bottom: 100px;
  }
  .child-sidebar,
  .welcome-actions {
    display: none;
  }
  .child-content {
    padding: 22px 18px 100px;
  }
  .child-mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
  }
  .child-mobile-top img {
    width: 185px;
  }
  .child-welcome {
    gap: 16px;
    margin-bottom: 26px;
  }
  .child-avatar {
    width: 145px;
    height: 145px;
  }
  .child-welcome h1 {
    font-size: 30px;
  }
  .child-dashboard {
    display: block;
  }
  .child-aside {
    display: none;
  }
  .points-goal-card {
    min-height: 280px;
  }
  .task-heading {
    align-items: flex-end;
  }
  .mobile-progress {
    display: grid;
    margin-top: 20px;
  }
  .child-bottom {
    position: fixed;
    z-index: 8;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 88px;
    background: #fff;
    border: 1px solid #eeeef5;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -8px 26px rgba(48, 42, 94, 0.08);
  }
  .child-bottom button {
    border: 0;
    background: none;
    color: #5e638e;
    display: grid;
    place-items: center;
    gap: 4px;
    font-size: 25px;
  }
  .child-bottom span {
    font-size: 12px;
  }
  .child-bottom button.active {
    color: #7424ed;
  }
  .child-bottom .bottom-add {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #7022ec, #b64df9);
    font-size: 45px;
    transform: translateY(-16px);
    justify-self: center;
  }
}
@media (max-width: 560px) {
  .child-content {
    padding: 18px 18px 92px;
  }
  .child-mobile-top {
    margin-bottom: 20px;
  }
  .child-mobile-top img {
    width: 155px;
  }
  .child-mobile-top button {
    width: 48px;
    height: 48px;
  }
  .child-welcome {
    align-items: center;
    gap: 13px;
  }
  .child-avatar {
    width: 104px;
    height: 104px;
  }
  .child-welcome h1 {
    font-size: 22px;
    line-height: 1.15;
  }
  .child-welcome p {
    font-size: 13px;
    line-height: 1.4;
  }
  .points-goal-card {
    min-height: 235px;
    grid-template-columns: 45% 55%;
  }
  .points-block {
    padding: 20px 14px;
  }
  .points-block small,
  .next-goal small {
    font-size: 13px;
  }
  .points-block > strong {
    font-size: 38px;
    margin-top: 16px;
  }
  .points-block > span {
    font-size: 14px;
  }
  .coin-stack {
    font-size: 47px;
    right: 13px;
    top: 83px;
  }
  .coin-stack i {
    font-size: 14px;
    left: 14px;
    top: 15px;
  }
  .next-goal {
    padding: 20px 8px 20px 14px;
  }
  .next-goal > strong {
    font-size: 18px;
    max-width: 140px;
  }
  .next-goal > span b {
    font-size: 18px;
  }
  .next-goal-media {
    width: 64px;
    height: 68px;
    right: 0;
    top: 79px;
  }
  .goal-line {
    position: relative;
    z-index: 2;
    gap: 7px;
    margin-top: 21px;
  }
  .goal-line .progress {
    width: 82px;
  }
  .goal-line > i {
    font-size: 11px;
    padding: 5px 7px;
  }
  .points-foot {
    height: 48px;
    padding: 14px;
    font-size: 12px;
  }
  .task-heading {
    display: block;
    margin-top: 24px;
  }
  .task-heading h2 {
    font-size: 26px;
    margin-bottom: 14px;
  }
  .task-filters {
    gap: 5px;
  }
  .task-filters button {
    padding: 9px 13px;
    font-size: 12px;
    flex: 1;
  }
  #childView .task {
    min-height: 96px;
    padding: 11px 10px;
    grid-template-columns: 58px minmax(0, 1fr) auto 43px;
    gap: 9px;
  }
  .task-copy h3 {
    font-size: 14px;
  }
  .task-copy p {
    font-size: 11px;
    line-height: 1.3;
  }
  .task-points {
    padding: 7px 8px;
    font-size: 15px;
  }
  .task-check {
    width: 40px;
    height: 40px !important;
  }
  .mobile-progress {
    grid-template-columns: 48px 1fr;
    padding: 15px;
  }
  .daily-progress {
    grid-column: 1/3;
    margin-top: 12px;
  }
  .child-bottom {
    left: 10px;
    right: 10px;
    height: 76px;
  }
  .child-bottom .bottom-add {
    width: 64px;
    height: 64px;
  }
  .child-bottom span {
    font-size: 10px;
  }
}

/* Parent dashboard */
body:has(#parentView.active) {
  background: #fbfbfe;
  color: var(--rutina-navy);
}
body:has(#parentView.active) > .shell {
  max-width: none;
  padding: 0;
}
body:has(#parentView.active) > .shell > .topbar {
  display: none;
}
#parentView.active {
  min-height: 100vh;
  padding-left: 248px;
}
.parent-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  padding: 60px 18px 28px;
  background: #fff;
  border-right: 1px solid #e8e8f2;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.parent-sidebar > img {
  width: 170px;
  margin: 0 13px 34px;
}
.parent-sidebar nav {
  display: grid;
  gap: 4px;
}
.parent-sidebar nav button {
  height: 48px;
  border: 0;
  background: none;
  border-radius: 12px;
  color: #5c6190;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 15px;
  font-size: 22px;
  text-align: left;
}
.parent-sidebar nav span {
  font-size: 14px;
  font-weight: 650;
}
.parent-sidebar nav .active {
  color: #fff;
  background: linear-gradient(105deg, #7023ed, #a740f4);
}
.parent-sidebar .side-message {
  display: grid;
  gap: 6px;
  padding: 18px;
  margin-top: auto;
}
.parent-sidebar .side-message b {
  margin: 0;
}
.parent-sidebar .side-message small {
  color: #626691;
}
.parent-content {
  padding: 42px 28px 55px;
  max-width: 1280px;
  margin: auto;
}
.parent-welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}
.parent-welcome h1 {
  font-size: 31px;
  margin: 0 0 8px;
  letter-spacing: -1px;
}
.parent-welcome em {
  font-style: normal;
  color: #7625ec;
}
.parent-welcome p,
.parent-title-mobile p {
  margin: 0;
  color: #626692;
}
.parent-bell,
.parent-mobile-top button {
  position: relative;
  width: 50px;
  height: 50px;
  border: 1px solid #ececf3;
  background: #fff;
  border-radius: 13px;
  color: #7425ed;
  font-size: 23px;
}
.parent-bell i,
.parent-mobile-top i {
  position: absolute;
  right: -5px;
  top: -5px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f12168;
  color: #fff;
  font: 700 11px system-ui;
}
.parent-bell.quiet i {
  display: none;
}
.parent-children {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.parent-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}
.parent-quick-actions button {
  min-width: 0;
  min-height: 72px;
  padding: 12px 16px;
  border: 1px solid #e7daf7;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff, #fbf6ff);
  color: var(--rutina-navy);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  box-shadow: 0 7px 20px rgba(76, 42, 126, 0.05);
}
.parent-quick-actions button > b {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  flex: none;
  background: linear-gradient(135deg, #7123ec, #aa43f5);
  color: #fff;
  font-size: 25px;
}
.parent-quick-actions span {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.parent-quick-actions strong {
  font-size: 14px;
}
.parent-quick-actions small {
  color: #696d94;
  font-size: 11px;
}
.parent-quick-actions button:hover {
  border-color: #9d52ee;
  transform: translateY(-1px);
}
.parent-child {
  min-height: 112px;
  border: 1px solid #e8d9f8;
  background: linear-gradient(135deg, #fff, #fcf8ff);
  border-radius: 15px;
  padding: 13px;
  display: grid;
  grid-template-columns: 66px 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  text-align: left;
  color: var(--rutina-navy);
  position: relative;
}
.parent-child.selected {
  border-color: #8c32ef;
  box-shadow: 0 6px 16px rgba(117, 36, 236, 0.08);
}
.parent-child > span {
  grid-row: 1/3;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-size: 33px;
}
.parent-child > b,
.parent-child > strong {
  margin-left: 10px;
}
.parent-child > b {
  color: #7125e9;
}
.parent-child > strong {
  font-size: 17px;
}
.parent-child strong i {
  color: #ffb300;
  font-style: normal;
}
.parent-child > small {
  position: absolute;
  right: 12px;
  bottom: 9px;
  color: #7023ec;
}
.parent-child.add-child {
  border: 1.5px dashed #c9b8dc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.parent-child.add-child span {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #7123ec, #ab45f5);
  color: #fff;
  font-size: 31px;
}
.parent-child.add-child b {
  margin: 6px 0 0;
}
.parent-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border: 1px solid #ececf4;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(46, 39, 92, 0.06);
  margin-bottom: 18px;
}
.parent-stat {
  padding: 20px 18px;
  border-right: 1px solid #ececf4;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
}
.parent-stat:last-child {
  border: 0;
}
.parent-stat > span {
  font-size: 23px;
}
.parent-stat small {
  color: #555a88;
}
.parent-stat strong {
  grid-column: 1/3;
  font-size: 29px;
  margin-top: 8px;
}
.parent-stat p {
  grid-column: 1/3;
  margin: 5px 0 0;
  color: #60658f;
  font-size: 11px;
}
.parent-stat.orange strong {
  color: #ff8500;
}
.parent-stat.green strong {
  color: #12b966;
}
.parent-stat.blue strong {
  color: #087deb;
}
.parent-stat.pink strong {
  color: #ed2d86;
}
.parent-main-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 18px;
  margin-bottom: 18px;
}
.parent-panel {
  background: #fff;
  border: 1px solid #ececf4;
  border-radius: 17px;
  box-shadow: 0 7px 22px rgba(50, 42, 99, 0.055);
  padding: 18px;
}
.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.panel-title h2 {
  font-size: 16px;
  margin: 0;
}
.panel-title button {
  border: 0;
  background: none;
  color: #7023ec;
  font-size: 11px;
}
.approvals-panel .approval {
  grid-template-columns: 45px minmax(0, 1fr) auto auto;
  padding: 10px 0;
}
.approval > div:nth-child(2) {
  display: grid;
}
.approval > div:nth-child(2) > small {
  color: #666b97;
  font-size: 10px;
}
.approval > div:nth-child(2) > strong {
  font-size: 13px;
}
.approval > div:nth-child(2) > p {
  font-size: 10px;
  margin: 2px 0;
}
.approval-points {
  color: #7825ee;
  font-size: 14px;
}
.approval-points.minus,
.recent-row > b.minus {
  color: #ee2d73;
}
.approval-actions button {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 22px;
}
.approve {
  background: #eafbf2;
  color: #12b96b;
}
.reject {
  background: #fff0f4;
  color: #ec2f70;
}
.bars {
  height: 190px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 15px;
  padding: 12px 12px 0;
  border-bottom: 1px solid #e8e8f1;
}
.bars span {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.bars i {
  width: 30px;
  min-height: 8px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(#9e4bf7, #7122eb);
}
.bars small {
  font-size: 10px;
  color: #5e6390;
}
.parent-bottom-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 0.75fr;
  gap: 18px;
}
.parent-goal {
  display: grid;
  grid-template-columns: 62px 1fr 30px;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
}
.parent-goal > div {
  width: 62px;
  height: 55px;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #fff3f5;
  font-size: 32px;
}
.parent-goal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.parent-goal span {
  display: grid;
  gap: 4px;
}
.parent-goal small {
  color: #7224eb;
  font-size: 10px;
}
.parent-goal i {
  height: 6px;
  border-radius: 6px;
  background: #e8e5ef;
  overflow: hidden;
}
.parent-goal i b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7222ec, #bf54fa);
}
.parent-goal em {
  font-style: normal;
  font-size: 10px;
}
.recent-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 8px 0;
}
.recent-row > span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.recent-row p {
  display: grid;
  margin: 0;
}
.recent-row small {
  color: #666b97;
  font-size: 10px;
}
.recent-row strong {
  font-size: 12px;
}
.recent-row > b {
  color: #7625ec;
  font-size: 12px;
}
.streak-title {
  display: flex;
  gap: 12px;
  font-size: 35px;
}
.streak-title span {
  display: grid;
}
.streak-title span strong {
  font-size: 13px;
}
.streak-title span b {
  color: #f07b00;
  font-size: 19px;
}
.streak-parent .streak-week {
  margin: 18px 0;
}
.family-message,
.parent-tip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f5edff;
  border-radius: 13px;
  padding: 13px;
}
.family-message span,
.parent-tip span {
  display: grid;
}
.family-message strong {
  font-size: 12px;
  color: #7424eb;
}
.family-message small {
  font-size: 9px;
  color: #636790;
}
.parent-tip {
  margin-top: 18px;
}
.parent-tip > b {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7222ed, #b248f8);
  color: #fff;
  font-size: 25px;
}
.parent-tip strong {
  color: #7223ec;
}
.parent-tip small {
  color: #626691;
  margin-top: 3px;
}
.parent-tip button {
  margin-left: auto;
  border: 1px solid #ad75ee;
  background: #fff;
  color: #7024e9;
  border-radius: 11px;
  padding: 10px 16px;
}
.parent-management {
  margin-top: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.parent-management .manage-card {
  margin-top: 0;
}
.parent-title-mobile,
.parent-mobile-top,
.parent-bottom-nav {
  display: none;
}
@media (max-width: 900px) {
  #parentView.active {
    padding: 0 0 95px;
  }
  .parent-sidebar,
  .parent-welcome,
  .activity-panel,
  .streak-parent {
    display: none;
  }
  .parent-content {
    padding: 18px 18px 105px;
  }
  .parent-mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .parent-mobile-top img {
    width: 170px;
  }
  .parent-title-mobile {
    display: block;
    margin: 24px 0 18px;
  }
  .parent-title-mobile h1 {
    font-size: 28px;
    margin: 0 0 6px;
  }
  .parent-title-mobile h1 b {
    font-size: 14px;
    background: #7926ed;
    color: #fff;
    border-radius: 6px;
    padding: 4px;
  }
  .parent-children {
    display: flex;
    overflow-x: auto;
    gap: 9px;
  }
  .parent-child {
    min-width: 138px;
    min-height: 75px;
    grid-template-columns: 48px 1fr;
    padding: 8px;
  }
  .parent-child > span {
    width: 48px;
    height: 48px;
  }
  .parent-child > small {
    display: none;
  }
  .parent-child > b,
  .parent-child > strong {
    font-size: 12px;
  }
  .parent-child.add-child {
    min-width: 88px;
  }
  .parent-child.add-child span {
    width: 38px;
    height: 38px;
  }
  .parent-child.add-child b {
    font-size: 9px;
  }
  .parent-stats {
    grid-template-columns: repeat(3, 1fr);
  }
  .parent-stat {
    padding: 13px 10px;
  }
  .parent-stat:nth-child(4) {
    display: none;
  }
  .parent-stat:nth-child(3) {
    border: 0;
  }
  .parent-stat small {
    font-size: 9px;
  }
  .parent-stat strong {
    font-size: 24px;
  }
  .parent-main-grid {
    grid-template-columns: 1fr;
  }
  .parent-bottom-grid {
    grid-template-columns: 1fr 1fr;
  }
  .parent-tip {
    margin-bottom: 18px;
  }
  .parent-management {
    grid-template-columns: 1fr;
  }
  .parent-quick-actions {
    grid-template-columns: 1fr 1fr;
  }
  .parent-bottom-nav {
    position: fixed;
    z-index: 8;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 78px;
    border-radius: 22px 22px 0 0;
    background: #fff;
    box-shadow: 0 -8px 25px rgba(46, 39, 92, 0.09);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
  }
  .parent-bottom-nav button {
    border: 0;
    background: none;
    color: #626790;
    display: grid;
    place-items: center;
    gap: 3px;
    font-size: 22px;
  }
  .parent-bottom-nav span {
    font-size: 9px;
  }
  .parent-bottom-nav .active {
    color: #7624ed;
  }
  .parent-bottom-nav .parent-add {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7022ec, #b64df9);
    color: #fff;
    font-size: 38px;
    transform: translateY(-13px);
    justify-self: center;
  }
}
@media (max-width: 520px) {
  .parent-quick-actions {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .parent-quick-actions button {
    min-height: 62px;
  }
}
@media (max-width: 560px) {
  .parent-content {
    padding: 14px 12px 94px;
  }
  .parent-mobile-top img {
    width: 145px;
  }
  .parent-title-mobile {
    margin: 19px 2px 15px;
  }
  .parent-title-mobile h1 {
    font-size: 25px;
  }
  .parent-stats {
    overflow: hidden;
  }
  .parent-stat p {
    font-size: 8px;
  }
  .approvals-panel .approval {
    grid-template-columns: 40px minmax(0, 1fr) auto auto;
    gap: 7px;
  }
  .approval-media {
    width: 40px;
    height: 40px;
  }
  .approval-actions {
    grid-column: auto;
  }
  .approval-actions button {
    width: 35px;
    height: 35px;
  }
  .approval-points {
    font-size: 12px;
  }
  .parent-bottom-grid {
    grid-template-columns: 1fr;
  }
  .parent-tip {
    padding: 12px;
  }
  .parent-tip button {
    font-size: 0;
    padding: 9px;
  }
  .parent-tip button:after {
    content: "💡";
    font-size: 17px;
  }
  .parent-tip small {
    font-size: 9px;
  }
  .parent-management .manage-card {
    padding: 16px;
  }
}

/* Family account login */
body:has(#accountView.active) {
  background: #f7f5ff;
  color: var(--rutina-navy);
}
body:has(#accountView.active) .shell {
  max-width: none;
  padding: 0;
}
body:has(#accountView.active) .topbar {
  display: none;
}
#accountView.active {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 55% 45%;
  padding: 0;
}
.account-visual {
  height: 100vh;
  overflow: hidden;
  position: relative;
}
.account-visual img {
  height: 100%;
  width: 181.82%;
  max-width: none;
  object-fit: cover;
  object-position: left top;
  display: block;
}
.account-card {
  width: min(500px, calc(100% - 50px));
  align-self: center;
  justify-self: center;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 24px;
  padding: 48px 42px 36px;
  box-shadow: 0 18px 55px rgba(67, 49, 130, 0.11);
  text-align: center;
}
.account-card > img {
  display: none;
  width: 190px;
  margin: 0 auto 24px;
}
.account-card h1 {
  font-size: 29px;
  margin: 0 0 8px;
}
.account-card > p {
  color: #666a96;
  margin: 0 0 34px;
}
.account-card form {
  text-align: left;
}
.account-card form > label {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  font-weight: 700;
  font-size: 13px;
}
.account-card form > label > div {
  height: 51px;
  border: 1px solid #dfe0eb;
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 0 13px;
  gap: 10px;
  background: #fff;
}
.account-card input {
  border: 0;
  outline: 0;
  width: 100%;
  height: 100%;
  color: var(--rutina-navy);
}
.account-card input::placeholder {
  color: #aaacbf;
}
.account-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}
.account-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #62668f;
}
.account-options input {
  accent-color: #7b28ed;
  width: 16px;
  height: 16px;
}
.account-options button,
.account-link {
  border: 0;
  background: none;
  color: #7123eb;
  cursor: pointer;
}
.account-submit {
  width: 100%;
  height: 51px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(105deg, #7021eb, #9435f5);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
}
.account-divider {
  height: 30px;
  border-bottom: 1px solid #ededf3;
  margin: 0 0 14px;
}
.account-divider span {
  position: relative;
  top: 19px;
  background: #fff;
  padding: 0 12px;
  color: #676b94;
  font-size: 12px;
}
.account-link {
  display: block;
  width: 100%;
  padding: 9px;
}
.account-link b {
  color: #7624ed;
}
.pin-style {
  text-align: center;
  color: var(--rutina-navy);
}
.pin-style > img {
  width: 155px;
}
.pin-style > p {
  font-size: 13px;
  line-height: 1.5;
}
#unlockView.active .auth-wrap {
  min-height: 100vh;
  grid-template-columns: 1fr;
  max-width: 490px;
  text-align: center;
}
#unlockView.active .auth-copy {
  background: linear-gradient(140deg, #f2e9ff, #fff);
  border-radius: 24px 24px 0 0;
  padding: 35px 30px 10px;
}
#unlockView.active .auth-copy h1 {
  font: 800 31px system-ui;
}
#unlockView.active .auth-card {
  margin-top: -25px;
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 18px 55px rgba(67, 49, 130, 0.11);
}
#unlockView.active .primary {
  background: linear-gradient(105deg, #7021eb, #9c39f5);
}
@media (max-width: 800px) {
  #accountView.active {
    grid-template-columns: 1fr;
    padding: 20px;
    align-items: center;
    background: linear-gradient(150deg, #f5efff, #fff);
  }
  .account-visual {
    display: none;
  }
  .account-card {
    width: min(500px, 100%);
    padding: 34px 24px;
  }
  .account-card > img {
    display: block;
  }
  .account-card h1 {
    font-size: 26px;
  }
  .account-card > p {
    margin-bottom: 25px;
  }
}

/* Always-available authenticated session menu */
.session-menu {
  position: fixed;
  z-index: 30;
  right: 22px;
  top: 18px;
}
.session-menu.hidden {
  display: none;
}
.session-menu-toggle {
  height: 44px;
  border: 0;
  border-radius: 14px;
  padding: 0 16px;
  background: #fff;
  color: var(--rutina-navy);
  box-shadow: 0 8px 25px rgba(39, 35, 87, 0.14);
  font-weight: 800;
  cursor: pointer;
}
.session-menu-popover {
  display: none;
  position: absolute;
  right: 0;
  top: 52px;
  width: 190px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e7e5ef;
  border-radius: 15px;
  box-shadow: 0 14px 35px rgba(39, 35, 87, 0.18);
}
.session-menu.open .session-menu-popover {
  display: grid;
  gap: 5px;
}
.session-menu-popover button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 12px;
  text-align: left;
  color: var(--rutina-navy);
  font-weight: 700;
  cursor: pointer;
}
.session-menu-popover button:hover {
  background: #f5f0ff;
}
.session-menu-popover .danger {
  color: #a53f50;
}
.child-no-pin {
  color: #666a96;
  font-size: 13px;
}
.child-no-pin + button {
  margin-top: 4px;
}
#childForm > label:has(input[name="pin"]) {
  display: none;
}
@media (max-width: 760px) {
  .session-menu {
    right: 12px;
    top: 10px;
  }
  .session-menu-toggle span {
    display: none;
  }
  .session-menu-toggle {
    width: 44px;
    padding: 0;
  }
  .session-menu-popover {
    top: 50px;
  }
  .parent-mobile-top,
  .child-mobile-top {
    padding-right: 58px;
  }
}
.welcome-actions button,
.child-mobile-top button {
  cursor: pointer;
}
.parent-mobile-top,
.child-mobile-top {
  padding-right: 0;
}

.session-menu-popover {
  top: 52px;
}
.parent-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.parent-profile,
.parent-menu-button {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 13px;
  cursor: pointer;
  font-size: 23px;
}
.parent-profile {
  border: 1px solid #ececf3;
  background: #fff;
  color: #7425ed;
}
.parent-profile i {
  position: absolute;
  right: -5px;
  top: -5px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f12168;
  color: #fff;
  font: 700 11px system-ui;
}
.parent-menu-button {
  border: 0;
  background: linear-gradient(135deg, #7022ec, #a642f4);
  color: #fff;
  box-shadow: 0 8px 20px rgba(116, 37, 237, 0.25);
}

/* Keep child summary cards readable on tablets and narrower desktop layouts. */
@media (min-width: 901px) and (max-width: 1200px) {
  .parent-children {
    display: flex;
    overflow-x: auto;
    gap: 14px;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
  }
  .parent-child {
    flex: 0 0 238px;
    min-width: 238px;
    min-height: 112px;
  }
  .parent-child.add-child {
    flex-basis: 150px;
    min-width: 150px;
  }
}
@media (max-width: 900px) {
  .parent-child {
    flex: 0 0 218px;
    min-width: 218px;
    min-height: 88px;
    grid-template-columns: 58px minmax(90px, 1fr) auto;
    grid-template-rows: auto auto;
    padding: 11px;
  }
  .parent-child > span {
    width: 56px;
    height: 56px;
    grid-row: 1/3;
  }
  .parent-child > b,
  .parent-child > strong {
    margin-left: 9px;
    font-size: 14px;
    white-space: nowrap;
  }
  .parent-child > small {
    display: block;
    right: 11px;
    bottom: 7px;
    font-size: 11px;
  }
  .parent-child.add-child {
    flex: 0 0 112px;
    min-width: 112px;
  }
}

/* The generic profile checkmark also uses .selected; reset those dimensions here. */
.parent-child.selected {
  width: auto;
  height: auto;
  right: auto;
  top: auto;
  justify-items: stretch;
}

.selected-child-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -6px 0 18px;
  padding: 12px 16px;
  border: 1px solid #e7ddf6;
  border-radius: 14px;
  background: #fff;
}
.selected-child-bar span {
  display: grid;
  gap: 3px;
}
.selected-child-bar b {
  color: #7023ec;
  font-size: 14px;
}
.selected-child-bar small {
  color: #656991;
  font-size: 11px;
}
.selected-child-bar button {
  border: 1px solid #cda9f6;
  background: #f8f2ff;
  color: #7023ec;
  border-radius: 10px;
  padding: 9px 13px;
  font-weight: 750;
  cursor: pointer;
}
.parent-child {
  cursor: pointer;
}
.parent-child.selected:after {
  content: "✓";
  position: absolute;
  right: 10px;
  top: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #7928ed;
  color: #fff;
  font-size: 12px;
}
@media (max-width: 720px) {
  .selected-child-bar {
    align-items: flex-start;
    flex-direction: column;
  }
  .selected-child-bar button {
    width: 100%;
  }
}

/* Useful profile navigation on the family homepage */
@media (min-width: 761px) {
  .login-mode .app-sidebar {
    display: flex;
    width: 286px;
    padding: 40px 22px 26px;
    box-shadow: 18px 0 50px rgba(39, 27, 91, 0.06);
  }
  .login-mode .shell {
    padding-left: 286px;
  }
}
.login-mode .device-time {
  display: none;
}
.login-mode .side-brand {
  padding: 4px 20px 28px;
}
.login-mode .side-brand img {
  width: 164px;
}
.side-label {
  margin: 2px 14px 10px;
  color: #9296b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.side-label-parent {
  margin-top: 24px;
}
.side-profiles {
  display: grid;
  gap: 7px;
}
.side-profile,
.side-dashboard,
.side-logout {
  width: 100%;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.side-profile {
  min-height: 66px;
  display: grid;
  grid-template-columns: 46px 1fr 16px;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 16px;
  background: transparent;
  color: var(--rutina-navy);
  text-align: left;
  transition: .18s ease;
}
.side-profile:hover {
  background: #f6f0ff;
  transform: translateX(3px);
}
.side-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 4px 13px rgba(68, 44, 130, .14);
  font-size: 25px;
}
.side-avatar img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  border-radius: 50%;
}
.side-avatar img[src*="uploads/"] {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.side-profile > span:nth-child(2),
.side-dashboard > span:nth-child(2) {
  display: grid;
  gap: 3px;
}
.side-profile strong,
.side-dashboard strong {
  font-size: 14px;
  font-weight: 800;
}
.side-profile small,
.side-dashboard small {
  color: #888cac;
  font-size: 11px;
  font-weight: 600;
}
.side-profile > b,
.side-dashboard > b {
  color: #aaa7c4;
  font-size: 22px;
}
.side-dashboard {
  min-height: 66px;
  display: grid;
  grid-template-columns: 46px 1fr 16px;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 16px;
  color: var(--rutina-navy);
  text-align: left;
  background: transparent;
  transition: .18s ease;
}
.side-dashboard:hover {
  background: #f6f0ff;
  transform: translateX(3px);
}
.side-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #7428e8;
  background: #f1e8ff;
  box-shadow: 0 4px 13px rgba(68, 44, 130, .12);
  font-size: 20px;
}
.side-footer {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid #ececf5;
  display: grid;
  gap: 8px;
}
.side-tool {
  flex: none;
}
.side-logout {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 15px;
  border-radius: 13px;
  color: #d94168;
  background: #fff2f5;
  font-weight: 750;
  text-align: left;
}
.side-footer > small {
  display: block;
  margin-top: 6px;
  color: #a0a3bc;
  font-size: 10px;
  text-align: center;
}

@media (max-width: 900px) {
  .child-sidebar,
  .parent-sidebar {
    display: flex;
    width: min(82vw, 286px);
    z-index: 1002;
    transform: translateX(-105%);
    transition: transform .22s ease;
    box-shadow: 18px 0 45px rgba(30, 22, 70, .16);
    padding-top: max(34px, env(safe-area-inset-top));
    overflow-y: auto;
  }
  body.dashboard-nav-open .child-sidebar,
  body.dashboard-nav-open .parent-sidebar {
    transform: translateX(0);
  }
  body.dashboard-nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1001;
    background: rgba(25, 19, 55, .38);
  }
  body.dashboard-nav-open {
    overflow: hidden;
  }
}
@media (max-width: 1050px) and (min-width: 761px) {
  .login-mode .app-sidebar {
    width: 238px;
    padding-inline: 15px;
  }
  .login-mode .shell {
    padding-left: 238px;
  }
  .login-mode .side-brand img {
    width: 145px;
  }
}

/* Unified parent PIN card in the current Rutina login style. */
#unlockView.active{min-height:100vh;display:grid;place-items:center;padding:32px}#unlockView.active .auth-wrap{min-height:0;width:min(520px,100%);display:block;margin:0;text-align:center;border:1px solid #e8ddfa;border-radius:30px;background:#fff;overflow:hidden;box-shadow:0 24px 70px rgba(67,49,130,.14)}#unlockView.active .auth-copy{background:linear-gradient(145deg,#f0e4ff 0%,#f8f2ff 55%,#fff 100%);border-radius:0;padding:42px 36px 32px}#unlockView.active .auth-copy .eyebrow{margin:0 0 10px;color:#23845c;font-size:12px;font-weight:900;letter-spacing:3px;text-transform:uppercase}#unlockView.active .auth-copy h1{font:800 34px/1.1 system-ui;margin:0;color:var(--rutina-navy);letter-spacing:-1px}#unlockView.active .auth-copy>p:last-child{max-width:none;margin:14px 0 0;color:#696c91;font-size:16px}#unlockView.active .auth-card{margin:0;border:0;border-radius:0;padding:34px 40px 38px;background:#fff;box-shadow:none;text-align:left}#unlockView.active .auth-card label{margin:0 0 20px;color:var(--rutina-navy);font-size:13px}#unlockView.active .auth-card input{height:56px;border:1.5px solid #ded8ea;border-radius:14px;padding:0 18px;font-size:24px;font-weight:800;letter-spacing:10px;text-align:center}#unlockView.active .auth-card input:focus{border-color:#8b35ef;box-shadow:0 0 0 4px rgba(124,45,242,.11)}#unlockView.active .primary{height:54px;border-radius:14px;background:linear-gradient(105deg,#7021eb,#a83df5);box-shadow:0 10px 24px rgba(124,45,242,.22)}#unlockView.active .text-btn{color:#676a8e;font-weight:700}#unlockView.active .error{margin:0 0 12px;text-align:center}
@media(max-width:760px){#unlockView.active{padding:18px}#unlockView.active .auth-wrap{border-radius:24px}#unlockView.active .auth-copy{padding:32px 22px 25px}#unlockView.active .auth-copy h1{font-size:29px}#unlockView.active .auth-card{padding:27px 22px 28px}}
#unlockView.active .auth-card input{display:block;width:min(280px,100%);margin-left:auto;margin-right:auto}

/* PWA installation and notification controls */
.account-link.pwa-install{margin-top:10px;border:1px solid #e6dcf6;border-radius:13px;background:#f8f4ff;color:#6f25d9;padding:13px 16px;justify-content:center;gap:8px}
.account-link.pwa-install:hover{background:#f1e8ff}
.account-closed-note{margin:18px 0 4px!important;padding:13px 15px;border-radius:14px;background:#f5f1fb;color:#68657a!important;font-size:.86rem;line-height:1.45;text-align:center}
.terms-check{display:flex!important;gap:10px;align-items:flex-start;font-size:.86rem;line-height:1.4}.terms-check input{width:auto!important;margin-top:3px}
.parent-management-dialog{width:min(760px,calc(100vw - 28px));max-height:88vh;overflow:auto}.parent-management-dialog>img{width:110px}.parent-management-dialog h3{margin:24px 0 10px}.management-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 0;border-bottom:1px solid #ece9f3}.management-row span{display:grid;gap:4px}.management-row small{color:#77758a}.danger-link{border:0;background:#fff0f2;color:#b4233c;padding:8px 11px;border-radius:10px;font-weight:700}.parent-invite-form{margin-top:18px;padding:18px;border-radius:16px;background:#f8f6fb}.parent-invite-form label{display:grid;gap:6px;margin:10px 0}.parent-invite-form input{width:100%;padding:12px;border:1px solid #dcd7e8;border-radius:10px}
.pwa-dialog-icon{display:block!important;width:82px!important;height:82px!important;margin:0 auto 18px!important;border-radius:22px!important;box-shadow:0 10px 26px rgba(111,34,231,.22)}
#installInstructions p{margin:0 0 24px;color:#686989;line-height:1.65;text-align:left;background:#f8f4ff;border-radius:15px;padding:16px}

/* Compact ouderdashboard en werkende informatievensters */
#parentView .panel-title h2,
#parentView .section-title h2 {
  font-size: clamp(26px, 2.4vw, 32px);
  line-height: 1.12;
}
#parentView .recent-row strong { font-size: 15px; }
#parentView .recent-row small { font-size: 12px; }
#parentView .recent-row > b { font-size: 14px; }
#parentView .recent-row { padding: 7px 0; }
.icon-actions button { font-family: inherit; font-size: 22px; font-weight: 600; }
.icon-actions .edit-action { color: #6f25d9; background: #f3ecff; }
.icon-actions .delete-action { color: #d94168; background: #fff0f4; }
.dashboard-info-dialog { width: min(680px, calc(100vw - 28px)); max-height: 86vh; overflow: auto; padding: 30px; }
.dashboard-info-dialog > h2 { margin: 3px 0 7px; color: #222047; }
.dashboard-info-dialog > p:not(.eyebrow) { margin: 0 0 22px; color: #72718c; }
.activity-history-list { display: grid; gap: 4px; }
.activity-history-row { display: grid; grid-template-columns: 46px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid #eee9f5; }
.activity-history-row > span { width: 46px; height: 46px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; }
.activity-history-row > span img { width: 100%; height: 100%; object-fit: cover; }
.activity-history-row p { display: grid; gap: 2px; margin: 0; }
.activity-history-row small { color: #777793; font-size: 12px; }
.activity-history-row strong { color: #292747; font-size: 15px; }
.activity-history-row > b { color: #712bec; font-size: 14px; }
.activity-history-row > b.minus { color: #d94168; }
.parent-tips-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.parent-tips-grid article { display: flex; gap: 12px; padding: 15px; border-radius: 17px; background: #faf7ff; }
.parent-tips-grid article > b { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 11px; background: #eee4ff; color: #712bec; }
.parent-tips-grid span { display: grid; gap: 4px; }
.parent-tips-grid strong { color: #292747; font-size: 15px; }
.parent-tips-grid small { color: #72718c; font-size: 13px; line-height: 1.4; }
@media (max-width: 620px) {
  #parentView .panel-title h2,
  #parentView .section-title h2 { font-size: 24px; }
  .dashboard-info-dialog { padding: 24px 18px; }
  .parent-tips-grid { grid-template-columns: 1fr; }
  .activity-history-row { grid-template-columns: 40px minmax(0,1fr) auto; gap: 9px; }
  .activity-history-row > span { width: 40px; height: 40px; }
}
.session-menu-popover{width:230px}

/* Spaardoelafbeeldingen: vaste kaders zonder vervorming, ongeacht bronverhouding. */
.reward-visual img.media-img,
.goal-media img.media-img,
.next-goal-media img.media-img,
.mini-goal img.media-img,
.parent-goal img.media-img {
  width: calc(100% - 16px);
  height: calc(100% - 16px);
  max-width: 100%;
  max-height: 100%;
  padding: 0;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
}
.reward-visual,
.goal-media,
.next-goal-media,
.mini-goal > div,
.parent-goal > div {
  overflow: hidden;
}

/* Moderne taak- en spaardoel-editor */
#taskDialog,
#rewardDialog {
  max-width: none;
  max-height: none;
}
#taskDialog .modern-editor,
#rewardDialog .modern-editor {
  width: min(940px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 0;
  border: 1px solid rgba(118, 37, 237, .10);
  border-radius: 28px;
  background: #fbfaff;
  box-shadow: 0 28px 90px rgba(48, 34, 94, .24);
}
.modern-editor .dialog-close {
  z-index: 3;
  top: 20px;
  right: 22px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  color: #656383;
  font-size: 25px;
  line-height: 1;
  box-shadow: 0 5px 18px rgba(55,45,90,.09);
}
.editor-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 25px 72px 23px 28px;
  background: linear-gradient(120deg, #f1e8ff 0%, #fbf8ff 64%, #eef9f4 100%);
  border-bottom: 1px solid #ebe4f5;
}
.editor-header-icon {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(145deg, #7424eb, #a840f3);
  color: white;
  font-size: 25px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(118,37,237,.22);
}
.modern-editor .editor-header .eyebrow {
  margin: 0 0 3px;
  color: #7927df;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}
.modern-editor .editor-header h2 {
  font: 600 27px/1.1 var(--font-rutina);
  color: #292641;
  letter-spacing: -.6px;
}
.modern-editor .editor-header p:last-child {
  margin: 5px 0 0;
  color: #74718c;
  font-size: 13px;
}
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(340px, 1.08fr);
  gap: 18px;
  padding: 22px 24px;
}
.editor-visual-panel,
.editor-fields-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid #ebe7f2;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(48,42,76,.045);
}
.editor-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.editor-section-title > span {
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #efe6ff;
  color: #7625ed;
  font-size: 12px;
  font-weight: 900;
}
.editor-section-title > div { display: grid; gap: 2px; }
.editor-section-title strong { color: #302d48; font-size: 14px; }
.editor-section-title small { color: #85829a; font-size: 11px; }
.modern-editor label { color: #48445f; }
.modern-editor input,
.modern-editor select,
.modern-editor textarea {
  width: 100%;
  border: 1px solid #dfdbea;
  border-radius: 13px;
  background: #fcfbff;
  padding: 12px 13px;
  color: #302d48;
  outline: none;
}
.modern-editor textarea {
  min-height: 112px;
  resize: vertical;
  font: inherit;
}
.modern-editor input:focus,
.modern-editor select:focus,
.modern-editor textarea:focus {
  border-color: #8a36ee;
  box-shadow: 0 0 0 3px rgba(118,37,237,.10);
  background: #fff;
}
.equal-fields > label { flex: 1; max-width: none !important; }
.compact-image-picker,
.reward-image-picker {
  grid-template-columns: 78px 1fr;
  margin: 12px 0 17px;
  padding: 13px;
  border-radius: 16px;
  background: #f8f5fc;
}
.compact-image-picker .round-preview,
.reward-image-picker .round-preview {
  width: 78px;
  height: 78px;
  border-width: 3px;
}
.image-picker-actions { display: grid; gap: 3px; }
.modern-editor .upload-btn {
  background: #332f4b;
  border-radius: 11px;
  font-size: 12px;
}
.modern-editor .remove-image {
  width: auto;
  color: #807b94;
  text-align: center;
  font-size: 11px;
}
.modern-editor .task-icon-section {
  margin: 0;
  border: 0;
  background: #f7f3fc;
}
.modern-editor .task-icon-picker {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: 260px;
}
.modern-editor .task-icon-heading .text-btn {
  width: auto;
  padding: 8px 10px;
  border-radius: 9px;
  background: #fff;
  color: #7625ed;
  font-weight: 800;
}
.reward-audience-card {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #eee9f4;
}
.modern-editor .reward-child-picker {
  margin: 8px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}
#rewardChildChoices {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin: 12px 0 0;
}
#rewardChildChoices .reward-child-choice {
  width: 58px;
  display: grid;
  justify-items: center;
  gap: 5px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.reward-child-choice input {
  position: absolute;
  width: 1px !important;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.reward-child-avatar {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #d9d5e0;
  border-radius: 50%;
  background: #eeeef1;
  filter: grayscale(1);
  opacity: .52;
  transition: .2s ease;
}
.reward-child-avatar .media-img,
.reward-child-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reward-child-avatar .preset-avatar,
.reward-child-avatar .media-img.preset-avatar {
  width: 90%;
  height: 90%;
  object-fit: contain;
}
.reward-child-choice.is-active .reward-child-avatar {
  border-color: #8b35ef;
  background: #f1e8ff;
  filter: grayscale(0);
  opacity: 1;
  box-shadow: 0 0 0 3px rgba(118,37,237,.11);
  transform: translateY(-1px);
}
.reward-child-name {
  width: 64px;
  overflow: hidden;
  color: #8c8899;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reward-child-choice.is-active .reward-child-name { color: #54229c; }
#rewardSplitHint {
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #f5f1fa;
  color: #716b82;
  font-size: 10px;
}
.editor-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 24px;
  border-top: 1px solid #e8e3ef;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
}
.editor-footer button { min-width: 138px; }
.editor-footer-spacer { flex: 1; }
.editor-footer .child-delete-button {
  border: 1px solid #f1bdc8;
  background: #fff0f2;
  color: #b4233c;
}
.editor-footer .primary {
  border-radius: 13px;
  padding: 13px 19px;
  background: linear-gradient(105deg,#7021eb,#a83df5);
  box-shadow: 0 9px 21px rgba(124,45,242,.20);
}
@media (max-width: 760px) {
  #taskDialog .modern-editor,
  #rewardDialog .modern-editor {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 23px;
  }
  .editor-header { padding: 20px 56px 18px 18px; gap: 12px; }
  .editor-header-icon { width: 42px; height: 42px; flex-basis: 42px; border-radius: 13px; font-size: 21px; }
  .modern-editor .editor-header h2 { font-size: 22px; }
  .modern-editor .editor-header p:last-child { display: none; }
  .editor-grid { grid-template-columns: 1fr; gap: 12px; padding: 13px; }
  .editor-visual-panel,
  .editor-fields-panel { padding: 16px; border-radius: 17px; }
  .modern-editor .task-icon-picker { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .editor-footer { padding: 12px 13px; }
  .editor-footer button { flex: 1; min-width: 0; }
}
@media (max-width: 420px) {
  .form-row.equal-fields { display: grid; grid-template-columns: 1fr 1fr; }
  #rewardChildChoices { gap: 9px; }
  #rewardChildChoices .reward-child-choice { width: 52px; }
  .reward-child-avatar { width: 42px; height: 42px; }
}

/* Vernieuwde spaardoelenpagina voor kinderen */
#rewardsPanel {
  padding-top: 24px;
}
#childView[data-active-tab="rewards"] .points-goal-card,
#childView[data-active-tab="rewards"] .mobile-progress {
  display: none;
}
.child-goals-header {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 150px;
  margin-bottom: 14px;
  padding: 26px 28px;
  border: 1px solid #e9ddfa;
  border-radius: 24px;
  background:
    radial-gradient(circle at 86% 12%, rgba(255,255,255,.78) 0 7%, transparent 7.5%),
    linear-gradient(125deg, #f0e3ff 0%, #f8f3ff 52%, #e9f8f1 100%);
  box-shadow: 0 14px 38px rgba(79,52,132,.09);
}
.child-goals-header::after {
  content: "☆";
  position: absolute;
  right: 180px;
  bottom: -34px;
  color: rgba(124,45,242,.10);
  font-size: 130px;
  line-height: 1;
  transform: rotate(-10deg);
}
.child-goals-header > div:first-child { position: relative; z-index: 1; }
.child-goals-header p {
  margin: 0 0 7px;
  color: #7a29dc;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.7px;
}
.child-goals-header h2 {
  margin: 0 0 7px;
  color: #171748;
  font-size: clamp(23px, 2.2vw, 31px);
  line-height: 1.12;
  letter-spacing: -.7px;
}
.child-goals-header > div:first-child > span {
  color: #706d8c;
  font-size: 13px;
  line-height: 1.45;
}
.child-goals-balance {
  position: relative;
  z-index: 1;
  flex: 0 0 142px;
  min-height: 100px;
  display: grid;
  align-content: center;
  justify-items: center;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 19px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 10px 28px rgba(65,44,108,.10);
  backdrop-filter: blur(8px);
}
.child-goals-balance small { color: #77738f; font-size: 10px; font-weight: 800; }
.child-goals-balance strong { margin: 2px 0 -2px; color: #7224e6; font-size: 30px; line-height: 1; }
.child-goals-balance span { color: #9a6a00; font-size: 11px; font-weight: 900; }
.child-goals-summary {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 2px 14px;
  color: #77738c;
  font-size: 11px;
  font-weight: 750;
}
.child-goals-summary span { display: flex; align-items: center; gap: 6px; }
.child-goals-summary span:first-child { margin-right: auto; color: #353151; font-size: 12px; }
.child-goals-summary b { color: #7625ed; font-size: 17px; }
.child-goals-summary i { width: 8px; height: 8px; border-radius: 50%; background: #8a38ef; }
.child-goals-summary span:last-child i { background: #23a679; }
#rewardsPanel .reward-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.goal-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e9e5f0;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(45,40,77,.07);
  transition: transform .2s ease, box-shadow .2s ease;
}
.goal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(67,48,108,.12);
}
.goal-card-media {
  position: relative;
  height: 155px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #f4effb, #fbf9ff);
}
.shared-goal .goal-card-media { background: linear-gradient(145deg, #e8f7f0, #f4fbf8); }
.goal-card-media > img.media-img {
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  padding: 0;
  border-radius: 13px;
  object-fit: contain;
  object-position: center;
}
.goal-card-media > .media-emoji { font-size: 58px; }
.goal-type-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 9px;
  border: 1px solid rgba(118,37,237,.13);
  border-radius: 99px;
  background: rgba(255,255,255,.90);
  color: #6f28d2;
  font-size: 9px;
  font-weight: 900;
  box-shadow: 0 4px 13px rgba(50,35,92,.08);
}
.goal-favorite-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 99px;
  background: #712bec;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 5px 15px rgba(113,43,236,.24);
}
.goal-order-controls {
  display: grid;
  grid-template-columns: 1fr 34px auto 34px;
  align-items: center;
  gap: 6px;
  margin: -2px 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee9f4;
}
.goal-order-controls button {
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: #f1eaff;
  color: #6721cc;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.goal-order-controls button:first-child { padding: 7px 10px; text-align: left; }
.goal-order-controls button:disabled { opacity: .48; cursor: default; }
.goal-order-controls span {
  color: #712bec;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.goal-completed { opacity: .78; }
.goal-completed .goal-card-media { filter: saturate(.65); }
.goal-completed-label {
  display: inline-flex;
  margin: -2px 0 14px;
  padding: 7px 11px;
  border-radius: 99px;
  background: #e9f7ef;
  color: #187448;
  font-size: 12px;
  font-weight: 700;
}
.shared-goal .goal-type-pill { border-color: rgba(31,151,108,.14); color: #197b59; }
.goal-card-body { padding: 17px; }
.goal-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.goal-card-title > div { min-width: 0; }
.goal-card-title h3 {
  overflow: hidden;
  margin: 0 0 5px;
  color: #24213f;
  font-size: 17px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.goal-card-title p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #7c788d;
  font-size: 11px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.goal-card-title > span {
  flex: 0 0 auto;
  min-width: 68px;
  padding: 8px 9px;
  border-radius: 12px;
  background: #f3edfc;
  color: #7125de;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}
.shared-goal .goal-card-title > span { background: #eaf7f1; color: #16805b; }
.goal-card-title > span small { display: block; margin-top: 1px; color: inherit; font-size: 8px; font-weight: 800; }
.goal-participants {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f2faf6;
}
.goal-participants > div { display: flex; padding-left: 5px; }
.goal-participants > div > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-left: -5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e8e9ed;
}
.goal-participants img,
.goal-participants .media-img { width: 100%; height: 100%; object-fit: cover; }
.goal-participants .preset-avatar { width: 90%; height: 90%; object-fit: contain; }
.goal-participants small { color: #4f7d6c; font-size: 9px; font-weight: 750; }
.goal-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 15px 1px 7px;
  color: #4d4864;
  font-size: 10px;
}
.goal-progress-copy strong { font-weight: 850; }
.goal-progress-copy span { color: #7625ed; font-weight: 900; }
.shared-goal .goal-progress-copy span { color: #16805b; }
.goal-card-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: #ece9f2;
}
.goal-card-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7625ed, #bd4ff5);
}
.shared-goal .goal-card-progress i { background: linear-gradient(90deg, #1e9b6f, #52c69c); }
.goal-card-foot {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.goal-card-foot > small { color: #8d899a; font-size: 8px; line-height: 1.3; }
.goal-card .reward-btn {
  min-width: 105px;
  border: 0;
  border-radius: 11px;
  padding: 10px 12px;
  background: linear-gradient(105deg,#7021eb,#a83df5);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(124,45,242,.18);
}
.shared-goal .reward-btn { background: linear-gradient(105deg,#17845e,#39b889); box-shadow: 0 7px 16px rgba(30,155,111,.16); }
.goal-card .reward-btn[disabled] {
  background: #eeebf2;
  color: #9793a1;
  box-shadow: none;
  cursor: default;
}
.goal-ready { border-color: rgba(118,37,237,.27); }
.shared-goal.goal-ready { border-color: rgba(30,155,111,.28); }
.goals-empty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  padding: 48px 20px;
  border: 1px dashed #dcd4e8;
  border-radius: 22px;
  background: #faf8fd;
  text-align: center;
}
.goals-empty b { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 17px; background: #eee5fb; color: #7625ed; font-size: 28px; }
.goals-empty h3 { margin: 13px 0 4px; color: #302d48; }
.goals-empty p { margin: 0; color: #858096; font-size: 12px; }
@media (max-width: 1100px) {
  #rewardsPanel .reward-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  #rewardsPanel { padding-top: 6px; }
  #rewardsPanel .reward-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .child-goals-header { min-height: 0; padding: 20px; border-radius: 20px; }
  .child-goals-header::after { right: 94px; font-size: 100px; }
  .child-goals-header h2 { font-size: 21px; max-width: 210px; }
  .child-goals-header > div:first-child > span { display: none; }
  .child-goals-balance { flex-basis: 105px; min-height: 84px; }
  .child-goals-balance strong { font-size: 25px; }
  .child-goals-summary { gap: 9px; }
  .child-goals-summary span { font-size: 9px; }
  #rewardsPanel .reward-grid { grid-template-columns: 1fr; }
  .goal-card { border-radius: 19px; }
  .goal-card-media { height: 170px; }
  .goal-card-body { padding: 16px; }
}
@media (max-width: 390px) {
  .child-goals-header { gap: 10px; padding: 17px 14px; }
  .child-goals-header h2 { max-width: 185px; font-size: 19px; }
  .child-goals-balance { flex-basis: 88px; }
  .child-goals-summary span:nth-child(n+2) { display: none; }
}

/* Vernieuwde takenpagina voor kinderen */
.task-heading {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 24px 0 14px;
  padding: 22px 24px;
  border: 1px solid #e8ddf8;
  border-radius: 22px;
  background: linear-gradient(125deg,#f1e6ff 0%,#faf7ff 58%,#edf8f3 100%);
  box-shadow: 0 12px 32px rgba(70,49,116,.07);
}
.child-task-heading-copy p {
  margin: 0 0 5px;
  color: #7927df;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 1.6px;
}
.task-heading .child-task-heading-copy h2 {
  margin: 0 0 4px;
  color: #191747;
  font-size: 27px;
  letter-spacing: -.6px;
}
.child-task-heading-copy > span { color: #77738c; font-size: 12px; }
.child-task-progress-pill {
  min-width: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 15px;
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 16px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 8px 22px rgba(53,42,91,.08);
}
.child-task-progress-pill > strong { color: #7625ed; font-size: 27px; line-height: 1; }
.child-task-progress-pill > span { display: grid; color: #77738c; font-size: 10px; line-height: 1.1; }
.child-task-progress-pill b { color: #3b3753; }
.child-task-progress-pill small { color: #229268; font-size: 9px; font-weight: 850; }
.task-heading .task-filters {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 7px;
  padding: 5px;
  border-radius: 14px;
  background: rgba(255,255,255,.65);
}
.task-heading .task-filters button {
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  background: transparent;
  color: #716d89;
  font-size: 11px;
  font-weight: 800;
}
.task-heading .task-filters button.active {
  background: #fff;
  color: #7625ed;
  box-shadow: 0 5px 15px rgba(67,50,111,.10);
}
#childView .task-list {
  display: grid;
  gap: 10px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}
#childView .task.child-task-card {
  min-height: 98px;
  border: 1px solid #e9e6f0;
  border-radius: 18px;
  padding: 14px 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(46,40,76,.055);
}
#childView .task.child-task-card:last-child { border-bottom: 1px solid #e9e6f0; }
#childView .child-task-card .task-emoji {
  width: 58px;
  height: 58px;
  border: 0;
  background: #f4effa;
}
.child-task-card .task-copy h3 { color: #2d2945; font-size: 15px; }
.child-task-card .task-copy p { margin: 0; color: #77738d; font-size: 11px; }
.task-status-line { display: flex; align-items: center; gap: 7px; margin-top: 7px; }
.task-status-line span {
  padding: 4px 7px;
  border-radius: 7px;
  background: #f4f1f8;
  color: #77728a;
  font-size: 8px;
  font-weight: 800;
}
.task-status-line span:last-child { background: #f1e8ff; color: #7625ed; }
.child-task-card.done .task-status-line span:last-child { background: #e7f8ee; color: #13814e; }
.child-task-card.rejected .task-status-line span:last-child { background: #fff0ed; color: #c25449; }
.child-task-card .task-points { font-size: 15px; }

/* Vernieuwde portemonneepagina voor kinderen */
#historyPanel { padding-top: 24px; }
#childView[data-active-tab="history"] .points-goal-card,
#childView[data-active-tab="history"] .mobile-progress { display: none; }
.child-wallet-header {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 162px;
  padding: 27px 28px;
  border: 1px solid #e4daf6;
  border-radius: 24px;
  background: linear-gradient(125deg,#efe2ff 0%,#f9f4ff 52%,#fff3d5 100%);
  box-shadow: 0 14px 38px rgba(73,50,126,.09);
}
.child-wallet-header::after {
  content: "★";
  position: absolute;
  right: 185px;
  bottom: -46px;
  color: rgba(255,184,0,.14);
  font-size: 145px;
  line-height: 1;
  transform: rotate(-12deg);
}
.wallet-hero-copy { position: relative; z-index: 1; }
.wallet-hero-copy p { margin: 0 0 7px; color: #7927df; font-size: 10px; font-weight: 900; letter-spacing: 1.7px; }
.wallet-hero-copy h2 { margin: 0 0 7px; color: #171747; font-size: clamp(24px,2.2vw,31px); letter-spacing: -.7px; }
.wallet-hero-copy > span { color: #706d89; font-size: 12px; }
.wallet-balance-card {
  position: relative;
  z-index: 1;
  flex: 0 0 150px;
  min-height: 108px;
  display: grid;
  align-content: center;
  justify-items: center;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 20px;
  background: rgba(255,255,255,.80);
  box-shadow: 0 10px 28px rgba(67,46,112,.10);
  backdrop-filter: blur(8px);
}
.wallet-balance-card small { color: #77738c; font-size: 10px; font-weight: 800; }
.wallet-balance-card strong { margin: 2px 0 -2px; color: #7124e5; font-size: 32px; line-height: 1; }
.wallet-balance-card span { color: #9a6a00; font-size: 11px; font-weight: 900; }
.wallet-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
  margin: 13px 0 23px;
}
.wallet-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #ebe7f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(47,40,77,.045);
}
.wallet-stat > b {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #e7f8ee;
  color: #168653;
  font-size: 18px;
}
.wallet-stat.spent > b { background: #fff0ed; color: #c4584e; }
.wallet-stat.transactions > b { background: #f0e8fc; color: #7625ed; }
.wallet-stat > span { min-width: 0; display: grid; }
.wallet-stat small { color: #888496; font-size: 9px; font-weight: 750; }
.wallet-stat strong { overflow: hidden; color: #302c49; font-size: 17px; text-overflow: ellipsis; }
.wallet-history-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 2px 12px; }
.wallet-history-heading h3 { margin: 0 0 3px; color: #25223f; font-size: 19px; }
.wallet-history-heading p { margin: 0; color: #858194; font-size: 10px; }
.wallet-history-heading > span { padding: 6px 9px; border-radius: 9px; background: #f1eafb; color: #7625ed; font-size: 8px; font-weight: 850; }
#historyPanel .history-list { display: grid; gap: 9px; }
.history.wallet-transaction {
  display: grid;
  grid-template-columns: 44px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #ebe8f0;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(47,40,76,.04);
}
.transaction-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #e8f8ef;
  color: #168653;
  font-size: 18px;
}
.wallet-transaction.minus .transaction-icon { background: #fff1ed; color: #c2594f; }
.transaction-copy { min-width: 0; display: grid; gap: 3px; }
.transaction-copy > strong { overflow: hidden; color: #343048 !important; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.transaction-copy small { color: #918d9d; font-size: 8px; }
.transaction-amount { color: #168653 !important; font-size: 15px; text-align: right; }
.wallet-transaction.minus .transaction-amount { color: #c2594f !important; }
.transaction-amount small { display: block; color: inherit; font-size: 8px; }
.wallet-empty { display: grid; justify-items: center; padding: 42px 18px; border: 1px dashed #dcd5e6; border-radius: 19px; background: #faf8fd; text-align: center; }
.wallet-empty b { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: #f0e7fd; color: #7625ed; font-size: 24px; }
.wallet-empty h3 { margin: 12px 0 4px; color: #302d47; }
.wallet-empty p { margin: 0; color: #878294; font-size: 11px; }
@media (max-width: 620px) {
  .task-heading { grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding: 18px 16px; border-radius: 19px; }
  .task-heading .child-task-heading-copy h2 { margin-bottom: 2px; font-size: 21px; }
  .child-task-heading-copy > span { display: none; }
  .child-task-progress-pill { min-width: 84px; padding: 9px 10px; }
  .child-task-progress-pill > strong { font-size: 23px; }
  .task-heading .task-filters { gap: 3px; }
  .task-heading .task-filters button { padding: 8px 4px; font-size: 9px; }
  #childView .task.child-task-card { min-height: 100px; padding: 11px 9px; grid-template-columns: 54px minmax(0,1fr) auto 40px; gap: 7px; }
  #childView .child-task-card .task-emoji { width: 52px; height: 52px; }
  .task-status-line { gap: 3px; }
  .task-status-line span { padding: 3px 5px; font-size: 7px; }
  .child-task-card .task-points { padding: 6px; font-size: 13px; }
  #historyPanel { padding-top: 6px; }
  .child-wallet-header { min-height: 0; gap: 10px; padding: 19px 15px; border-radius: 20px; }
  .child-wallet-header::after { right: 80px; font-size: 105px; }
  .wallet-hero-copy h2 { max-width: 205px; font-size: 20px; }
  .wallet-hero-copy > span { display: none; }
  .wallet-balance-card { flex-basis: 98px; min-height: 86px; }
  .wallet-balance-card strong { font-size: 25px; }
  .wallet-stats { gap: 6px; }
  .wallet-stat { display: grid; justify-items: center; gap: 5px; padding: 10px 5px; text-align: center; }
  .wallet-stat > b { width: 30px; height: 30px; flex-basis: 30px; font-size: 15px; }
  .wallet-stat strong { font-size: 14px; }
  .wallet-history-heading h3 { font-size: 17px; }
}

/* Foto uitsnijden en automatisch comprimeren */
#photoCropDialog {
  max-width: none;
  max-height: none;
}
.crop-dialog-card {
  width: min(500px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
  overflow: auto;
  padding: 26px;
  border: 1px solid #e4daf3;
  border-radius: 26px;
  background: #fcfaff;
  box-shadow: 0 28px 90px rgba(45,31,91,.28);
}
.crop-dialog-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-right: 36px;
}
.crop-dialog-head > span {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg,#7424eb,#a840f3);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 9px 22px rgba(118,37,237,.21);
}
.crop-dialog-head p { margin: 0 0 2px; color: #7927df; font-size: 9px; font-weight: 900; letter-spacing: 1.5px; }
.crop-dialog-head h2 { margin: 0 0 3px; color: #2a2741; font: 600 23px/1.1 var(--font-rutina); letter-spacing: -.4px; }
.crop-dialog-head small { color: #7e7990; font-size: 10px; line-height: 1.35; }
.crop-stage {
  position: relative;
  width: min(320px, 76vw);
  aspect-ratio: 1;
  margin: 22px auto 15px;
  padding: 8px;
  border-radius: 50%;
  background: linear-gradient(145deg,#8a34ef,#f0b82c,#38b487);
  box-shadow: 0 14px 36px rgba(73,49,120,.19);
}
#cropCanvas {
  display: block;
  width: 100%;
  height: 100%;
  border: 5px solid #fff;
  border-radius: 50%;
  background: #eeeaf4;
  cursor: grab;
  touch-action: none;
}
#cropCanvas:active { cursor: grabbing; }
.crop-stage > i {
  position: absolute;
  inset: 16%;
  border: 1px dashed rgba(255,255,255,.72);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 999px rgba(25,18,48,.08);
}
.crop-zoom-label {
  display: grid !important;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  gap: 9px !important;
  margin: 0 auto 10px !important;
  max-width: 330px;
  color: #6f6982;
  font-size: 18px !important;
  text-align: center;
}
.crop-zoom-label input {
  width: 100%;
  padding: 0;
  accent-color: #7c2df2;
}
.crop-size-note {
  margin: 9px auto 18px !important;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #f1ecf8;
  color: #77718a !important;
  font-size: 9px;
  line-height: 1.4;
  text-align: center;
}
.crop-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 9px; }
.crop-actions button { min-height: 46px; border-radius: 13px; }
.crop-actions .primary {
  border: 0;
  background: linear-gradient(105deg,#7021eb,#a83df5);
  color: #fff;
  font-weight: 850;
  box-shadow: 0 9px 21px rgba(124,45,242,.20);
}
@media (max-width: 520px) {
  .crop-dialog-card { padding: 20px 16px 16px; border-radius: 22px; }
  .crop-dialog-head h2 { font-size: 20px; }
  .crop-dialog-head small { display: none; }
  .crop-stage { width: min(285px,76vw); margin-top: 17px; }
  .crop-actions { grid-template-columns: 1fr; }
  .crop-actions .primary { grid-row: 1; }
}

/* Ronde spaardoelbeelden sluiten aan bij avatars en taakiconen */
.goal-card-media > img.media-img {
  width: 112px;
  height: 112px;
  padding: 0;
  border: 5px solid rgba(255,255,255,.92);
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 10px 25px rgba(62,42,104,.15);
}
.shared-goal .goal-card-media > img.media-img {
  border-color: rgba(255,255,255,.94);
  box-shadow: 0 10px 25px rgba(25,125,88,.14);
}
.goal-card-media > .media-emoji {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border: 5px solid rgba(255,255,255,.92);
  border-radius: 50%;
  background: rgba(255,255,255,.66);
  box-shadow: 0 10px 25px rgba(62,42,104,.12);
}

/* Kindgegevens-editor in dezelfde actuele Rutina-stijl */
#childDialog {
  max-width: none;
  max-height: none;
}
#childDialog .child-editor {
  width: min(940px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 0;
  border: 1px solid rgba(118, 37, 237, .10);
  border-radius: 28px;
  background: #fbfaff;
  box-shadow: 0 28px 90px rgba(48, 34, 94, .24);
}
.child-editor-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
}
.child-avatar-panel .avatar-choice-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
}
.child-avatar-panel .avatar-choice {
  border-radius: 15px;
  background: #faf8ff;
}
.child-avatar-panel .avatar-choice.selected::after {
  display: none;
}
.child-avatar-panel .avatar-choice.selected {
  border-color: #8432ed;
  background: #f0e7ff;
  box-shadow: 0 0 0 3px rgba(118, 37, 237, .10);
  transform: translateY(-1px);
}
.child-image-picker {
  grid-template-columns: 78px 1fr;
  margin: 10px 0 0;
  padding: 13px;
  border-radius: 16px;
  background: #f8f5fc;
}
.child-image-picker .round-preview {
  width: 78px;
  height: 78px;
  border-width: 3px;
}
.child-fields-panel {
  display: flex;
  flex-direction: column;
}
.child-fields-panel > label:not(.child-pin-field) {
  margin-top: 5px;
}
.child-pin-field {
  display: none !important;
}
.child-fields-panel .child-no-pin {
  margin: 14px 0 0;
  padding: 11px 13px;
  border-radius: 12px;
  background: #f4effb;
  color: #67617b;
  font-size: 12px;
}
.child-data-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: auto;
  padding: 15px;
  border: 1px solid #e8dff5;
  border-radius: 15px;
  background: linear-gradient(135deg, #f5effd, #f4faf7);
}
.child-data-note > span {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #fff;
  color: #7625ed;
  font-size: 18px;
}
.child-data-note p {
  display: grid;
  gap: 3px;
  margin: 0;
}
.child-data-note strong { color: #39344e; font-size: 13px; }
.child-data-note small { color: #777187; font-size: 11px; line-height: 1.45; }

@media (max-width: 760px) {
  #childDialog .child-editor {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 23px;
  }
  .child-editor-grid { grid-template-columns: 1fr; }
  .child-avatar-panel .avatar-choice-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }
  .child-data-note { margin-top: 18px; }
}
@media (max-width: 620px) {
  .goal-card-media > img.media-img,
  .goal-card-media > .media-emoji { width: 118px; height: 118px; }
}

/* Invitation / family activation — current Rutina visual language */
body:has(#invitationView.active) {
  background:
    radial-gradient(circle at 8% 8%, rgba(122, 42, 237, .12), transparent 31%),
    radial-gradient(circle at 96% 90%, rgba(91, 182, 202, .16), transparent 30%),
    #f8f6ff;
  color: var(--rutina-navy, #080d46);
}
body:has(#invitationView.active) .shell { max-width: none; padding: 0; }
body:has(#invitationView.active) .topbar { display: none; }
#invitationView.active {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(24px, 5vw, 70px);
  place-items: center;
}
#invitationView .auth-wrap {
  width: min(1120px, 100%);
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 500px);
  gap: clamp(50px, 8vw, 110px);
  margin: 0;
}
#invitationView .auth-copy { padding: 20px 0; }
#invitationView .auth-copy > img {
  width: min(310px, 72%);
  height: auto;
  margin: 0 0 48px;
  display: block;
}
#invitationView .auth-copy .eyebrow {
  margin: 0 0 14px;
  color: #7625ed;
  font-size: 12px;
  letter-spacing: .18em;
}
#invitationView .auth-copy h1 {
  margin: 0;
  color: var(--rutina-navy, #080d46);
  font-family: "Sofia Pro Soft", "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif;
  font-size: clamp(48px, 6vw, 76px);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.045em;
}
#invitationView .auth-copy h1 em {
  color: #7625ed;
  font-style: normal;
  font-weight: 800;
}
#invitationView .auth-copy > p:last-of-type {
  max-width: 500px;
  margin: 24px 0 0;
  color: #696c91;
  font-size: 18px;
  line-height: 1.55;
}
.invitation-benefits {
  display: grid;
  gap: 13px;
  margin: 30px 0 0;
  padding: 0;
  color: #3d416d;
  font-size: 14px;
  font-weight: 750;
  list-style: none;
}
.invitation-benefits span {
  display: inline-grid;
  width: 25px;
  height: 25px;
  margin-right: 9px;
  place-items: center;
  border-radius: 50%;
  background: #e8dcff;
  color: #7625ed;
}
#invitationView .auth-card {
  width: 100%;
  margin: 0;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid #ebe5f6;
  border-radius: 30px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 28px 80px rgba(58, 40, 117, .14);
}
#invitationView .auth-card h2 {
  margin: 0 0 24px;
  color: var(--rutina-navy, #080d46);
  font-family: "Sofia Pro Soft", "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 800;
  letter-spacing: -.025em;
}
#invitationView .auth-card label {
  gap: 8px;
  margin: 16px 0;
  color: #292e5b;
  font-size: 13px;
  font-weight: 800;
}
#invitationView .auth-card input:not([type="checkbox"]) {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1.5px solid #ded9e9;
  border-radius: 14px;
  background: #fff;
  color: #161a4f;
  font-size: 16px;
  font-weight: 650;
}
#invitationView .auth-card input[readonly] { background: #f6f4fa; color: #656781; }
#invitationView .auth-card input:not([type="checkbox"]):focus {
  border-color: #8331ee;
  box-shadow: 0 0 0 4px rgba(124, 45, 242, .11);
}
#invitationView .terms-check {
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 11px;
  margin: 20px 0 !important;
  color: #555a7a;
  font-size: 13px;
  line-height: 1.45;
}
#invitationView .terms-check input {
  width: 19px !important;
  height: 19px;
  margin: 0;
  accent-color: #7625ed;
}
#invitationView .terms-check a { color: #7021eb; text-decoration-thickness: 1px; }
#invitationView .primary {
  min-height: 56px;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(105deg, #7021eb, #9d38f4);
  box-shadow: 0 12px 26px rgba(124, 45, 242, .24);
  color: #fff;
  font-size: 16px;
  font-weight: 850;
}
#invitationView .text-btn { min-height: 46px; color: #686b8d; font-weight: 700; }
#invitationView .error { text-align: center; }

@media (max-width: 820px) {
  #invitationView.active { padding: 18px; align-items: start; }
  #invitationView .auth-wrap {
    display: block;
    width: min(560px, 100%);
    padding: max(18px, env(safe-area-inset-top)) 0 max(24px, env(safe-area-inset-bottom));
  }
  #invitationView .auth-copy { padding: 0 7px 25px; text-align: center; }
  #invitationView .auth-copy > img { width: 190px; margin: 0 auto 24px; }
  #invitationView .auth-copy .eyebrow { margin-bottom: 9px; font-size: 10px; }
  #invitationView .auth-copy h1 { font-size: clamp(36px, 11vw, 50px); line-height: 1.02; }
  #invitationView .auth-copy h1 br { display: none; }
  #invitationView .auth-copy > p:last-of-type { margin: 13px auto 0; font-size: 15px; }
  .invitation-benefits { display: none; }
  #invitationView .auth-card { padding: 26px 22px; border-radius: 24px; }
  #invitationView .auth-card h2 { margin-bottom: 20px; font-size: 27px; }
  #invitationView .auth-card label { margin: 14px 0; }
}


/* Taakplanning: vaste datum, eerder uitvoeren en toekomstoverzicht */
.early-task-setting { margin-top: 4px; padding: 15px 16px; border: 1px solid #e7def4; border-radius: 17px; background: #faf8fd; }
.toggle-field { display: flex !important; align-items: center; gap: 12px; margin: 0 !important; cursor: pointer; }
.toggle-field input { width: 21px; height: 21px; flex: 0 0 auto; accent-color: #712bec; }
.toggle-field > span { display: grid; gap: 2px; }
.toggle-field strong { color: #292747; font-size: 16px; }
.toggle-field small { color: #777793; line-height: 1.35; }
#earlyDaysField { margin: 14px 0 0 33px; }
.future-tasks-section { margin-top: 30px; padding: 24px; border: 1px solid #e9e2f4; border-radius: 24px; background: linear-gradient(145deg,#fff 0%,#faf7ff 100%); }
.future-tasks-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.future-tasks-heading p { margin: 0 0 4px; color: #712bec; font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.future-tasks-heading h3 { margin: 0; color: #292747; font-size: 25px; }
.future-tasks-heading span:not(.future-count) { color: #777793; font-size: 15px; }
.future-count { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px; border-radius: 14px; background: #eee5ff; color: #712bec; font-weight: 700; }
.future-task-list { display: grid; gap: 11px; }
.future-task-card { display: grid; grid-template-columns: 50px minmax(0,1fr) auto 44px; align-items: center; gap: 13px; padding: 14px; border: 1px solid #ece6f5; border-radius: 18px; background: #fff; }
.future-task-card.available { border-color: #d9c5fb; box-shadow: 0 8px 24px rgba(113,43,236,.07); }
.future-task-card.locked { background: #fbfafd; }
.future-task-media { display: grid; place-items: center; width: 50px; height: 50px; overflow: hidden; border-radius: 50%; background: #f0e8ff; font-size: 25px; }
.future-task-media img { width: 80%; height: 80%; object-fit: cover; border-radius: 50%; }
.future-task-copy { min-width: 0; }
.future-task-copy h4 { margin: 0 0 3px; color: #292747; font-size: 19px; }
.future-task-copy p { margin: 0; color: #5f5e7e; font-size: 15px; text-transform: capitalize; }
.future-task-copy small { display: block; margin-top: 4px; color: #8a899e; }
.future-check:disabled { opacity: .64; cursor: not-allowed; font-size: 14px; }
.future-toggle { display: block; width: 100%; margin-top: 14px; padding: 12px; border: 0; border-radius: 14px; background: #eee5ff; color: #712bec; }
.future-empty { padding: 18px; border-radius: 15px; background: #fff; color: #777793; text-align: center; }
.streak-rewards-manager { grid-column: 1 / -1; }
.streak-rewards-manager .section-title { margin-bottom: 4px; }
.manage-intro { margin: 0 0 18px; color: #777793; }
.streak-milestone-form { display: grid; grid-template-columns: minmax(150px,1fr) minmax(150px,1fr) auto; gap: 12px; align-items: end; padding: 15px; margin-bottom: 16px; border-radius: 18px; background: #faf7ff; }
.streak-milestone-form label { margin: 0; }
.streak-milestone-form .primary { min-height: 52px; }
.streak-manage-row { display: grid; grid-template-columns: 42px 1fr 38px; align-items: center; gap: 11px; padding: 12px 4px; border-bottom: 1px solid #eee8f6; }
.streak-manage-row > span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: #fff2e3; }
.streak-manage-row > div { display: grid; gap: 2px; }
.streak-manage-row small { color: #777793; }
.streak-manage-row > button { width: 36px; height: 36px; border: 0; border-radius: 11px; background: #f4eefb; color: #7a7189; }
@media (max-width: 620px) {
  .future-tasks-section { margin-top: 22px; padding: 18px 14px; border-radius: 20px; }
  .future-tasks-heading h3 { font-size: 22px; }
  .future-task-card { grid-template-columns: 44px minmax(0,1fr) 40px; gap: 10px; padding: 12px 10px; }
  .future-task-media { width: 44px; height: 44px; }
  .future-task-card .task-points { grid-column: 2; justify-self: start; }
  .future-task-card .future-check { grid-column: 3; grid-row: 1 / span 2; }
  #earlyDaysField { margin-left: 0; }
  .streak-milestone-form { grid-template-columns: 1fr 1fr; }
  .streak-milestone-form .primary { grid-column: 1 / -1; }
}
@media (max-width: 390px) {
  #invitationView.active { padding: 10px; }
  #invitationView .auth-wrap { padding-top: max(12px, env(safe-area-inset-top)); }
  #invitationView .auth-copy > img { width: 158px; margin-bottom: 18px; }
  #invitationView .auth-copy h1 { font-size: 34px; }
  #invitationView .auth-card { padding: 22px 17px; border-radius: 21px; }
  #invitationView .auth-card input:not([type="checkbox"]) { min-height: 52px; }
}

/* Rutina merktypografie — Sofia Pro Soft.
   Afgeronde fallback totdat de gelicentieerde WOFF2-bestanden beschikbaar zijn. */
:root {
  --font-rutina: "Sofia Pro Soft", "Arial Rounded MT Bold", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  font-family: var(--font-rutina);
}
body, button, input, select, textarea { font-family: var(--font-rutina); }

#childView .child-welcome h1,
#parentView .parent-welcome h1,
#parentView .parent-title-mobile h1 {
  font-size: clamp(32px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.025em;
}
#profileView .profile-title h1 {
  font-size: clamp(48px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -.035em;
}
#childView .task-heading h2,
#childView .tab-panel h2,
#parentView .panel-title h2,
#parentView .section-title h2 {
  font-size: clamp(34px, 3.2vw, 40px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.025em;
}
.wallet-history-heading h3,
.goals-empty h3,
.wallet-empty h3,
.modal h2,
.management-card h2 {
  font-size: clamp(26px, 2.5vw, 30px);
  font-weight: 500;
  line-height: 1.2;
}
.task h3,
.goal-card-title h3,
.profile h3,
.manage-copy strong,
.approval strong,
.recent-row strong,
.points-goal-card h3 {
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  line-height: 1.2;
}
p, li, label, input, select, textarea {
  font-size: clamp(16px, 1.3vw, 18px);
  font-weight: 400;
}
small, .eyebrow, .side-label, .task-status-line, .meta {
  font-size: 14px;
  font-weight: 400;
}
button, .button, [role="button"] {
  font-size: clamp(16px, 1.3vw, 18px);
  font-weight: 600;
}
.points-block strong,
.points-badge strong,
.task-points,
.approval-points,
.transaction-amount,
.goal-card-title > span,
.recent-row > b,
.stat strong {
  font-family: var(--font-rutina);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.brand img, .side-brand img, .topbar img, .hero-logo { object-fit: contain; }

@media (max-width: 820px) {
  #childView .child-welcome h1,
  #parentView .parent-welcome h1,
  #parentView .parent-title-mobile h1 { font-size: clamp(24px, 5.5vw, 28px); }
  #profileView .profile-title h1 { font-size: clamp(36px, 9vw, 48px); }
  #childView .task-heading h2,
  #childView .tab-panel h2,
  #parentView .panel-title h2,
  #parentView .section-title h2 { font-size: clamp(28px, 7vw, 34px); }
  .task h3, .goal-card-title h3, .profile h3 { font-size: 20px; }
}

/* Definitieve compacte schaal voor de ouderdashboard-koppen. */
#parentView .panel-title h2,
#parentView .section-title h2 {
  font-size: clamp(26px, 2.4vw, 32px);
  line-height: 1.12;
}
@media (max-width: 620px) {
  #parentView .panel-title h2,
  #parentView .section-title h2 { font-size: 24px; }
}

/* Paarse Rutina-afwerking voor beheer, streaks en informatievensters. */
#parentView .icon-actions button {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
  text-align: center;
  font-size: 22px;
}
#parentView .icon-actions .delete-action { font-size: 25px; }
#parentView .icon-actions .edit-action:hover {
  color: #5f1dc6;
  background: #e9dcff;
}
#parentView .icon-actions .delete-action:hover {
  color: #bd2d53;
  background: #ffe1e9;
}
#parentView .circle-add,
#parentView .circle-add:hover {
  color: #712bec;
  background: #f1e8ff;
}
#parentView .streak-rewards-manager {
  border-color: #e7ddf6;
  background: linear-gradient(145deg, #fff 0%, #fcf9ff 100%);
}
#parentView .streak-rewards-manager .section-title h2,
#parentView .streak-rewards-manager .eyebrow {
  color: #712bec;
}
#parentView .streak-milestone-form {
  padding: 18px;
  border: 1px solid #e7ddf6;
  background: #faf7ff;
}
#parentView .streak-milestone-form label {
  display: grid;
  gap: 8px;
  color: #3d3858;
  font-size: 14px;
  font-weight: 700;
}
#parentView .streak-milestone-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 15px;
  border: 1.5px solid #ddd6e9;
  border-radius: 14px;
  outline: 0;
  background: #fff;
  color: #292747;
  font-size: 16px;
  font-weight: 650;
  box-shadow: none;
}
#parentView .streak-milestone-form input:focus {
  border-color: #8331ee;
  box-shadow: 0 0 0 4px rgba(124, 45, 242, .11);
}
#parentView .streak-milestone-form .primary,
#parentView .streak-milestone-form .primary:hover {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(105deg, #7021eb, #a83df5);
  color: #fff;
  box-shadow: 0 10px 24px rgba(124, 45, 242, .2);
  transform: none;
}
#parentView .streak-manage-row > button,
#parentView .streak-manage-row > button:hover {
  display: grid;
  place-items: center;
  padding: 0;
  background: #fff0f4;
  color: #d94168;
  line-height: 1;
}
.dashboard-info-dialog .eyebrow { color: #712bec; }
.dashboard-info-dialog > h2,
.parent-tips-dialog > h2 { color: #292747 !important; }
.dashboard-info-dialog .dialog-close,
.dashboard-info-dialog .dialog-close:hover {
  display: grid;
  place-items: center;
  padding: 0;
  background: #f1e8ff;
  color: #712bec;
  line-height: 1;
  font-size: 24px;
}
