/* StarJar — additions on top of the prototype base (auth, admin, nav links, dialogs). */

/* topbar sign-out */
.logout-form { margin: 0; }
.logout-btn {
  background: rgba(255, 255, 255, .18); color: #fff; border: none; border-radius: 10px;
  padding: 7px 12px; font-weight: 800; cursor: pointer; font: inherit; font-weight: 800;
}
.logout-btn:active { transform: scale(.96); }

/* bottom nav as links */
#nav .nav-btn { text-decoration: none; }

/* generic full-width screen header used on app pages */
.row-actions.wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.task-row.done { opacity: .62; }
.task-row.done .tbtn { filter: grayscale(.5); }
.task-row.done .cnt { color: var(--credit); }
.tbtn:disabled { opacity: .45; cursor: not-allowed; }
.kid-panel { display: flex; flex-direction: column; gap: 14px; }
.score-form { display: inline; margin: 0; }
.check-goal {
  display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px;
  background: #f1edfb; padding: 11px 12px; border-radius: 12px;
}
.check-goal input { width: 18px; height: 18px; }
a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }

/* ---- auth ---- */
body.auth { display: flex; flex-direction: column; min-height: 100vh; }
body.auth #app { flex: 1; display: flex; align-items: center; justify-content: center; padding-bottom: 24px; }
.auth-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow);
  padding: 24px; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px;
}
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-logo { font-size: 44px; text-align: center; }
.auth-card h1 { margin: 0; text-align: center; font-size: 24px; }
.auth-card p.sub { margin: -8px 0 4px; text-align: center; color: var(--dim); font-weight: 700; font-size: 13px; }

/* ---- admin ---- */
body.admin #app { max-width: 640px; }
.admin-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 16px; margin-bottom: 14px;
}
.user-row { display: flex; align-items: center; gap: 8px; padding: 10px 2px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.user-row:first-of-type { border-top: none; }
.user-email { flex: 1; font-weight: 700; word-break: break-all; min-width: 140px; }
.badge { font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; text-transform: capitalize; }
.badge.admin { background: #efe9ff; color: var(--primary); }
.badge.parent { background: var(--credit-bg); color: var(--credit); }
.badge.off { background: var(--debit-bg); color: var(--debit); }
.inline-form { display: inline; margin: 0; }

/* ---- native dialogs (replace the prototype's JS modal) ---- */
dialog.dlg {
  border: none; padding: 0; width: 100%; max-width: var(--maxw); margin: auto auto 0;
  background: transparent;
}
dialog.dlg::backdrop { background: rgba(40, 30, 70, .45); }
.dlg-card {
  background: #fff; border-radius: 22px 22px 0 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom, 0));
  max-height: 88vh; overflow-y: auto; animation: slideup .22s cubic-bezier(.2, .8, .2, 1);
}
.dlg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dlg-title { margin: 0; font-size: 18px; }
.dlg-x { border: none; background: #f4f1fc; border-radius: 50%; width: 32px; height: 32px; cursor: pointer; font-weight: 800; color: var(--dim); }
.dlg-body { display: flex; flex-direction: column; gap: 10px; }
.dlg-foot { display: flex; gap: 10px; margin-top: 14px; }
.dlg-foot .btn { flex: 1; }
@media (min-width: 560px) {
  dialog.dlg { margin: auto; }
  .dlg-card { border-radius: 22px; }
}
