:root {
  --bg: #d8efff;
  --bg-soft: #edf7ff;
  --panel: rgba(10, 34, 74, 0.92);
  --panel-strong: #12386f;
  --line: rgba(162, 192, 255, 0.16);
  --text: #f4f7ff;
  --muted: #b6c8ef;
  --accent: #2196f3;
  --accent-strong: #0d7dd8;
  --success: #56d6a2;
  --warning: #ffcc66;
  --danger: #ff7d7d;
  --shadow: 0 18px 45px rgba(73, 121, 168, 0.16);
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, rgba(33, 150, 243, 0.18), transparent 24%),
    radial-gradient(circle at right top, rgba(104, 197, 255, 0.24), transparent 32%),
    linear-gradient(180deg, #f2fbff 0%, #d8efff 52%, #c7e8ff 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

.app-shell {
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.app-shell--planner {
  width: min(1180px, calc(100% - 28px));
}

.planner-body,
.auth-body {
  min-height: 100vh;
}

.planner-topbar {
  margin-bottom: 22px;
  padding: 18px 20px;
}

.planner-header-details[hidden] {
  display: none !important;
}

.planner-topbar__row,
.planner-topbar__meta,
.planner-brand,
.planner-status,
.planner-topbar__actions {
  display: flex;
  align-items: center;
}

.planner-topbar__row {
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.planner-topbar__meta,
.planner-brand,
.planner-status,
.planner-topbar__actions {
  gap: 14px;
}

.planner-brand {
  flex: 0 1 auto;
  min-width: 0;
}

.planner-status {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.planner-topbar__meta {
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.planner-topbar__actions {
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
}

.planner-account-actions {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
}

.planner-account-button,
.planner-logout {
  margin-top: 0;
}

.planner-brand__copy h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.menu-panel {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* On wide (desktop) screens the menu is a permanent inline nav, not a
   toggleable drawer, so it should stay visible even before the app's
   JavaScript has run - regardless of the "hidden" attribute the drawer
   starts with for phones (see the mobile breakpoint below). */
.menu-panel[hidden] {
  display: grid !important;
}

.planner-header-toggle-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.planner-header-toggle {
  min-height: 42px;
}

.planner-menu-heading {
  margin-bottom: -4px;
}

.planner-mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.planner-mobile-menu-toggle,
.planner-mobile-menu-close,
.planner-mobile-menu-backdrop {
  display: none;
}

.planner-mobile-menu-toggle {
  min-height: 52px;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.planner-mobile-menu-toggle__icon {
  display: inline-grid;
  gap: 5px;
}

.planner-mobile-menu-toggle__icon span {
  display: block;
  width: 22px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.planner-mobile-menu-close {
  min-height: 48px;
  min-width: 110px;
}

.planner-mobile-menu-backdrop[hidden] {
  display: none !important;
}

.planner-welcome {
  min-width: 0;
}

.planner-welcome h2 {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  color: #d9ecff;
}

.planner-welcome--inline {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-right: 0;
}

.planner-welcome--inline h2 {
  white-space: nowrap;
}

.planner-welcome--stacked {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2px;
}

.planner-welcome--stacked h2 {
  white-space: nowrap;
}

.view-nav--drawer {
  position: static;
  top: auto;
  margin-bottom: 0;
}

.planner-profile-form {
  margin-top: 0;
}

.planner-profile-form label {
  display: block;
  max-width: 360px;
}

.planner-profile-form input {
  margin-top: 8px;
}

.planner-logout {
  white-space: nowrap;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.planner-account-button {
  min-height: 64px;
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 18px;
  text-align: left;
  background: rgba(33, 150, 243, 0.12);
  border-color: rgba(33, 150, 243, 0.34);
}

.planner-account-avatar {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #72c5ff, #2196f3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.planner-account-avatar::before,
.planner-account-avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
}

.planner-account-avatar::before {
  top: 7px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.planner-account-avatar::after {
  bottom: 6px;
  width: 17px;
  height: 9px;
  border-radius: 999px 999px 7px 7px;
}

.planner-account-copy {
  display: grid;
  gap: 2px;
}

.planner-account-copy strong,
.planner-account-copy small {
  display: block;
}

.planner-account-copy strong {
  color: #ffffff;
  font-size: 0.98rem;
  line-height: 1.1;
}

.planner-account-copy small {
  color: #b9d8ff;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.planner-topbar__meta {
  min-width: 0;
}

.planner-topbar__actions {
  display: flex;
  gap: 14px;
}

.completed-report-list {
  display: grid;
  gap: 12px;
}

.completed-report-item {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
}

.completed-report-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.auth-shell {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 40px 0;
}

.auth-card {
  display: grid;
  gap: 18px;
  justify-items: start;
}

.hero.auth-card {
  display: block;
}

.auth-login-layout {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(280px, 1.2fr);
  gap: 36px;
  align-items: start;
  width: 100%;
}

.auth-page-copy {
  display: grid;
  gap: 18px;
  align-content: start;
}

.auth-main-panel {
  display: grid;
  gap: 18px;
}

@media (max-width: 760px) {
  .auth-login-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.auth-body input {
  background: #ffffff;
  color: #163454;
  border-color: rgba(10, 34, 74, 0.14);
}

.auth-copy h1 {
  margin: 0;
}

.auth-form {
  width: 100%;
}

.auth-input-grid {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.auth-input-grid label:first-child {
  grid-column: 1 / -1;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.auth-message {
  margin-top: 12px;
  min-height: 24px;
  color: var(--muted);
}

.auth-mode-switch {
  display: flex;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(8, 22, 52, 0.55);
  border: 1px solid var(--line);
  width: fit-content;
}

.auth-mode-button {
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
}

.auth-mode-button.is-active {
  background: var(--accent);
  color: #f4f7ff;
}

.license-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(33, 150, 243, 0.08);
}

.license-panel[hidden] {
  display: none !important;
}

.license-panel-copy {
  margin: 0;
}

.license-buy-copy {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.license-buy-copy a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.license-buy-copy a:hover,
.license-buy-copy a:focus-visible {
  text-decoration: underline;
}

.license-key-label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.planner-status-message {
  min-height: 24px;
  margin: 0 0 14px;
  color: #d9ecff;
  font-weight: 600;
}

.planner-status-message.is-success {
  color: #8df0c0;
}

.planner-status-message.is-error {
  color: #ffb2b2;
}

.status-update-panel {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

.status-update-panel__label {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.status-chip-group--form .status-chip {
  min-width: 140px;
  justify-content: center;
  text-align: center;
}

.auth-panel-copy h2 {
  margin: 0;
}

.update-password-form {
  width: 100%;
}

.view-nav {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
  padding: 10px;
  border: 1px solid rgba(10, 34, 74, 0.12);
  border-radius: 20px;
  background: rgba(244, 247, 255, 0.76);
  backdrop-filter: blur(12px);
}

.view-tab {
  border: 0;
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(10, 34, 74, 0.08);
  color: #12386f;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.view-tab:hover,
.view-tab:focus-visible {
  background: rgba(33, 150, 243, 0.22);
  color: #0a224a;
  transform: translateY(-1px);
}

.view-tab.is-active {
  background: linear-gradient(135deg, #42a5f5, #1e88e5);
  color: #0a224a;
  box-shadow: 0 10px 20px rgba(33, 150, 243, 0.24);
}

[data-view-panel][hidden] {
  display: none !important;
}

.hero,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 28px;
  margin-bottom: 22px;
}

.eyebrow,
.section-label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--accent);
}

.hero h1,
.section-heading h2 {
  margin: 0;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}

.hero-text,
label,
.goal-meta,
.empty-state {
  color: var(--muted);
}

.profile-form {
  margin-top: 20px;
}

.reward-input-grid {
  margin-top: 14px;
}

.reward-input-grid--triple {
  align-items: stretch;
}

.reward-banner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.reward-banner {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(33, 150, 243, 0.28);
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.14), rgba(255, 255, 255, 0.04));
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
  min-height: 112px;
}

.reward-banner strong {
  display: block;
  color: #ffd6a8;
}

.reward-banner p {
  margin: 8px 0 0;
  color: var(--text);
}

.reward-banner--ready {
  border-color: rgba(86, 214, 162, 0.38);
  background: linear-gradient(135deg, rgba(86, 214, 162, 0.2), rgba(255, 255, 255, 0.05));
  box-shadow: 0 14px 32px rgba(25, 139, 102, 0.14);
}

.reward-banner--ready strong,
.reward-banner--success strong {
  color: #dffff1;
}

.reward-banner--success {
  border-color: rgba(86, 214, 162, 0.6);
  background: linear-gradient(135deg, rgba(86, 214, 162, 0.34), rgba(34, 94, 71, 0.35));
  box-shadow: 0 16px 36px rgba(20, 120, 87, 0.24);
}

.reward-banner--pop {
  animation: reward-pop 260ms ease;
}

@keyframes reward-pop {
  0% {
    transform: scale(0.98);
  }
  60% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

.hero-date {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  min-height: 0;
  color: #ffffff;
  font-size: 0.98rem;
  text-align: right;
  white-space: nowrap;
  margin-top: 0;
}

.account-today-label {
  margin: -4px 0 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.account-quick-actions {
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.account-quick-actions .ghost-btn {
  flex: 0 1 auto;
  width: auto;
}

#customRepeatWrap {
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(33, 150, 243, 0.22);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(33, 150, 243, 0.08), rgba(255, 255, 255, 0.02));
}

#customRepeatWrap[hidden] {
  display: none;
}

.repeat-weekdays-wrap {
  margin-top: 10px;
  padding: 10px 12px 12px;
  border: 1px solid rgba(33, 150, 243, 0.18);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.repeat-weekdays-wrap[hidden] {
  display: none;
}

.repeat-weekdays-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.96rem;
}

.repeat-weekdays-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.repeat-weekday-btn {
  border: 1px solid rgba(143, 208, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
  color: #d8ecff;
  border-radius: 999px;
  padding: 10px 6px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.repeat-weekday-btn:hover,
.repeat-weekday-btn:focus-visible {
  border-color: rgba(33, 150, 243, 0.65);
  background: rgba(33, 150, 243, 0.16);
}

.repeat-weekday-btn.is-active {
  background: linear-gradient(135deg, #2196f3, #0d7dd8);
  border-color: rgba(143, 208, 255, 0.88);
  color: #ffffff;
}

.custom-repeat-pop {
  animation: custom-repeat-pop 220ms ease;
}

@keyframes custom-repeat-pop {
  0% {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}

.card {
  padding: 24px;
}

.form-card,
.all-goals-card,
.report-card,
.stats-card,
.checklist-page-card,
.all-goals-card,
.today-card {
  grid-column: span 12;
}

.form-card,
.stats-card,
.checklist-page-card {
  width: 100%;
  justify-self: stretch;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.access-actions,
.access-meta,
.access-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.action-switch {
  margin-bottom: 18px;
}

.access-panel {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
}

.access-panel--simple {
  display: grid;
  gap: 8px;
}

.access-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
}

.access-panel h3 {
  margin: 0;
  font-size: 1.25rem;
}

.access-text,
.access-hint {
  color: var(--muted);
}

.access-text {
  margin: 10px 0 14px;
}

.access-hint {
  margin: 14px 0 0;
  font-size: 0.94rem;
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.88rem;
}

.mode-badge--local {
  border-color: rgba(255, 204, 102, 0.28);
  background: rgba(255, 204, 102, 0.12);
}

.goal-form,
.two-up,
.three-up {
  display: grid;
  gap: 14px;
}

.subgoal-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.subgoal-heading {
  margin-bottom: 14px;
}

.two-up {
  grid-template-columns: repeat(2, 1fr);
}

.reminder-inline-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) auto minmax(240px, 1.1fr);
  gap: 16px;
  align-items: end;
}

.reminder-inline-row > label {
  min-width: 0;
}

.inline-check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 0 4px 12px 0;
  white-space: nowrap;
}

.inline-check input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--accent);
}

.reminder-inline-row > #reminderSettingsWrap[hidden] {
  display: none;
}

.reminder-inline-row > #repeatEndWrap[hidden] {
  display: none;
}

.three-up {
  grid-template-columns: repeat(3, 1fr);
}
.four-up {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}

label {
  display: grid;
  gap: 8px;
}

input,
textarea,
select {
  width: 100%;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

option {
  color: #163454;
  background: #f4f7ff;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(104, 197, 255, 0.25);
  border-color: var(--accent);
}

.field-highlight {
  animation: field-highlight-pulse 1.8s ease;
  border-color: rgba(33, 150, 243, 0.95);
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.18);
}

@keyframes field-highlight-pulse {
  0% {
    border-color: rgba(33, 150, 243, 0.98);
    box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.34);
  }
  45% {
    border-color: rgba(255, 196, 104, 0.98);
    box-shadow: 0 0 0 8px rgba(33, 150, 243, 0.08);
  }
  100% {
    border-color: rgba(33, 150, 243, 0.95);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.18);
  }
}

.primary-btn,
.ghost-btn,
.status-select {
  border-radius: 999px;
}

.status-select {
  appearance: auto;
  -webkit-appearance: auto;
  -moz-appearance: auto;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
  font-weight: 700;
}

.status-select--completed {
  background-color: rgba(46, 166, 92, 0.28);
  background-image: linear-gradient(135deg, rgba(67, 201, 126, 0.34), rgba(46, 166, 92, 0.42));
  border-color: rgba(95, 225, 148, 0.52);
  color: #eafff1;
}

.status-select--not-started {
  background-color: rgba(183, 41, 41, 0.22);
  background-image: linear-gradient(135deg, rgba(255, 107, 107, 0.26), rgba(183, 41, 41, 0.36));
  border-color: rgba(255, 122, 122, 0.48);
  color: #ffe9e9;
}

.status-select--in-progress {
  background-color: rgba(201, 147, 34, 0.24);
  background-image: linear-gradient(135deg, rgba(255, 214, 102, 0.3), rgba(201, 147, 34, 0.38));
  border-color: rgba(255, 210, 94, 0.5);
  color: #fff7dc;
}

.primary-btn,
.ghost-btn,
.remove-btn {
  cursor: pointer;
}

.stat-button {
  text-align: left;
  border: 1px solid var(--line);
  width: 100%;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.stat-button--warning,
.stat-button--success,
.stat-button--progress,
.stat-button--danger {
  position: relative;
  overflow: hidden;
}

.stat-box.stat-button--warning {
  border-color: rgba(255, 196, 92, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 214, 102, 0.34), rgba(181, 118, 18, 0.32)),
    var(--panel-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 148, 0.18), 0 12px 28px rgba(255, 186, 64, 0.18);
  animation: statPulseWarning 3.8s ease-in-out infinite;
}

.stat-box.stat-button--success {
  border-color: rgba(95, 225, 148, 0.72);
  background:
    linear-gradient(180deg, rgba(86, 214, 162, 0.32), rgba(27, 116, 77, 0.3)),
    var(--panel-strong);
  box-shadow: inset 0 0 0 1px rgba(170, 246, 204, 0.16), 0 12px 28px rgba(40, 179, 111, 0.16);
  animation: statPulseSuccess 3.8s ease-in-out infinite;
}

.stat-box.stat-button--progress {
  border-color: rgba(255, 210, 94, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 214, 102, 0.3), rgba(173, 116, 24, 0.28)),
    var(--panel-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 233, 171, 0.16), 0 12px 28px rgba(238, 180, 53, 0.16);
  animation: statPulseProgress 3.8s ease-in-out infinite;
}

.stat-box.stat-button--danger {
  border-color: rgba(255, 122, 122, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 107, 107, 0.3), rgba(148, 38, 38, 0.3)),
    var(--panel-strong);
  box-shadow: inset 0 0 0 1px rgba(255, 188, 188, 0.15), 0 12px 28px rgba(215, 72, 72, 0.16);
  animation: statPulseDanger 3.8s ease-in-out infinite;
}

.stat-box.stat-button--warning span,
.stat-box.stat-button--warning strong,
.stat-box.stat-button--success span,
.stat-box.stat-button--success strong,
.stat-box.stat-button--progress span,
.stat-box.stat-button--progress strong,
.stat-box.stat-button--danger span,
.stat-box.stat-button--danger strong {
  color: #ffffff;
}

.stat-box.stat-button--warning:hover,
.stat-box.stat-button--warning:focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 214, 102, 0.42), rgba(181, 118, 18, 0.36)),
    var(--panel-strong);
  border-color: rgba(255, 196, 92, 0.82);
}

.stat-box.stat-button--success:hover,
.stat-box.stat-button--success:focus-visible {
  background:
    linear-gradient(180deg, rgba(86, 214, 162, 0.42), rgba(27, 116, 77, 0.36)),
    var(--panel-strong);
  border-color: rgba(95, 225, 148, 0.82);
}

.stat-box.stat-button--progress:hover,
.stat-box.stat-button--progress:focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 214, 102, 0.4), rgba(173, 116, 24, 0.34)),
    var(--panel-strong);
  border-color: rgba(255, 210, 94, 0.82);
}

.stat-box.stat-button--danger:hover,
.stat-box.stat-button--danger:focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 107, 107, 0.4), rgba(148, 38, 38, 0.34)),
    var(--panel-strong);
  border-color: rgba(255, 122, 122, 0.82);
}

.stat-button:hover,
.stat-button:focus-visible {
  background: linear-gradient(180deg, rgba(33, 150, 243, 0.2), rgba(255, 255, 255, 0.42));
  border-color: rgba(33, 150, 243, 0.45);
  box-shadow: 0 0 0 1px rgba(33, 150, 243, 0.18);
  transform: translateY(-1px);
}

.stat-button:focus-visible {
  outline: 2px solid rgba(104, 197, 255, 0.3);
  outline-offset: 2px;
}

@keyframes statPulseWarning {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.08), 0 0 0 rgba(255, 209, 102, 0);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 209, 102, 0.14), 0 0 18px rgba(255, 209, 102, 0.09);
  }
}

@keyframes statPulseSuccess {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(86, 214, 162, 0.08), 0 0 0 rgba(86, 214, 162, 0);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(86, 214, 162, 0.14), 0 0 18px rgba(86, 214, 162, 0.08);
  }
}

@keyframes statPulseProgress {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(255, 214, 102, 0.08), 0 0 0 rgba(255, 214, 102, 0);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 214, 102, 0.14), 0 0 18px rgba(255, 214, 102, 0.08);
  }
}

@keyframes statPulseDanger {
  0%, 100% {
    box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.08), 0 0 0 rgba(255, 107, 107, 0);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.14), 0 0 18px rgba(255, 107, 107, 0.08);
  }
}

.primary-btn {
  border: 0;
  padding: 14px 18px;
  font-weight: 700;
  color: #ffffff;
  background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
}

.primary-btn:hover,
.primary-btn:focus-visible {
  background: linear-gradient(135deg, #64b5f6 0%, #2196f3 100%);
  box-shadow: 0 0 0 1px rgba(33, 150, 243, 0.24), 0 10px 24px rgba(17, 96, 166, 0.2);
  transform: translateY(-1px);
}

.ghost-btn {
  margin-top: 18px;
  border: 1px solid var(--line);
  padding: 12px 16px;
  color: var(--text);
  background: transparent;
}

.compact-btn {
  margin-top: 30px;
  white-space: nowrap;
}

.inline-btn {
  margin-top: 0;
}

.ghost-btn:hover,
.ghost-btn:focus-visible {
  background: rgba(33, 150, 243, 0.12);
  border-color: rgba(33, 150, 243, 0.38);
  box-shadow: 0 0 0 1px rgba(33, 150, 243, 0.14);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-box,
.progress-panel,
.goal-item,
.report-box,
.chart-panel,
.goal-performance {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: var(--radius-md);
}

.stat-box {
  padding: 14px 16px;
  min-height: 104px;
}

.stat-box span,
.progress-copy span,
.pill {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stat-box strong,
.progress-copy strong {
  display: block;
  margin-top: 8px;
  font-size: 1.5rem;
  color: var(--text);
}

.progress-panel {
  padding: 18px;
}

.progress-stack {
  display: grid;
  gap: 14px;
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.progress-bar {
  width: 100%;
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--success), var(--accent));
  transition: width 240ms ease;
}

.period-picker {
  min-width: 150px;
}

.period-count-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.period-count-wrap input {
  width: 96px;
}

.period-count-label {
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.report-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.report-box,
.chart-panel,
.goal-performance,
.summary-report {
  padding: 16px;
}

.report-label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.report-box strong {
  display: block;
  margin-top: 8px;
  font-size: 1.7rem;
}

.report-text {
  color: var(--muted);
  margin: 8px 0 0;
}

.chart-panel {
  margin-bottom: 16px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.daily-status-wrap {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 22px;
  align-items: center;
}

.donut-card {
  display: flex;
  justify-content: center;
}

.donut-chart {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) 0deg, rgba(255, 255, 255, 0.1) 0deg);
}

.donut-hole {
  width: 122px;
  height: 122px;
  border-radius: 50%;
  background: var(--panel);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
}

.donut-hole strong {
  display: block;
  font-size: 1.7rem;
}

.donut-hole span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.daily-legend {
  display: grid;
  gap: 10px;
}

.legend-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.legend-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-value {
  color: var(--muted);
}

.trend-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 180px;
}

.chart-col {
  display: grid;
  gap: 8px;
  align-items: end;
  justify-items: center;
}

.chart-bar-wrap {
  width: 100%;
  height: 130px;
  display: flex;
  align-items: end;
}

.chart-bar {
  width: 100%;
  border-radius: 12px 12px 4px 4px;
  min-height: 8px;
}

.chart-bar.good {
  background: linear-gradient(180deg, #9cf0c7 0%, #2bb673 100%);
}

.chart-bar.mid {
  background: linear-gradient(180deg, #ffd08f 0%, #f28a24 100%);
}

.chart-bar.low {
  background: linear-gradient(180deg, #ff9d9d 0%, #d94a4a 100%);
}

.chart-value,
.chart-name,
.chart-date,
.performance-meta,
.repeat-pill {
  color: var(--muted);
  font-size: 0.82rem;
}

.chart-value {
  text-align: center;
}

.chart-date {
  text-align: center;
  font-size: 0.74rem;
  color: #d9ecff;
  white-space: nowrap;
}

.chart-empty {
  display: grid;
  place-items: end center;
  height: 130px;
  width: 100%;
  border-radius: 12px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  padding-bottom: 10px;
}

.performance-list {
  display: grid;
  gap: 12px;
}

.summary-report {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: var(--radius-md);
}

.summary-report-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.summary-narrative {
  margin-top: 0;
}

.performance-item {
  display: grid;
  gap: 8px;
}

.performance-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.performance-title {
  margin: 0;
}

.performance-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.performance-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--warning), var(--success));
}

.goal-list {
  display: grid;
  gap: 14px;
}

.subgoal-list,
.subgoal-table {
  display: grid;
  gap: 10px;
}

.subgoal-list,
.goal-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.goal-table {
  min-width: 860px;
}

.subgoal-card,
.subgoal-row {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
}

.subgoal-table-head,
.subgoal-table-row {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 1fr;
  gap: 12px;
  align-items: center;
}

.subgoal-row > div:last-child {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.subgoal-check-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(126, 210, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.subgoal-check-btn:hover,
.subgoal-check-btn:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(126, 210, 255, 0.8);
  box-shadow: 0 0 0 1px rgba(126, 210, 255, 0.22);
}

.subgoal-check-btn--done {
  background: linear-gradient(135deg, rgba(73, 223, 157, 0.34), rgba(33, 128, 103, 0.88));
  border-color: rgba(92, 238, 173, 0.8);
  color: #ffffff;
}

.subgoal-table-head {
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.goal-item {
  padding: 16px;
}

.goal-table-row {
  display: grid;
  grid-template-columns: 1.55fr 0.9fr 0.85fr 0.7fr 0.95fr 1.1fr 1.35fr 1.35fr;
  gap: 12px;
  align-items: center;
}

.goal-table {
  display: grid;
  gap: 10px;
}

.goal-table-wrap[hidden] {
  display: none;
}

.goal-table-row {
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: var(--radius-md);
  position: relative;
}

.goal-list-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: var(--radius-md);
  position: relative;
  padding-left: 86px;
}

.goal-list-card__order {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(75, 197, 255, 0.96), rgba(0, 139, 208, 0.94));
  box-shadow: 0 10px 24px rgba(39, 169, 241, 0.22);
}

.goal-list-card__header,
.goal-list-card__meta,
.goal-list-card__actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.goal-list-card__title {
  margin: 0;
  font-size: 1.08rem;
}

.goal-list-card__date,
.goal-list-card__meta-item {
  color: var(--muted);
}

.goal-list-card__reorder {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.goal-move-btn {
  border: 1px solid rgba(113, 228, 255, 0.48);
  background: linear-gradient(135deg, rgba(47, 196, 255, 0.96), rgba(0, 126, 214, 0.94));
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.goal-move-btn:hover,
.goal-move-btn:focus-visible {
  background: linear-gradient(135deg, rgba(92, 221, 255, 0.98), rgba(26, 150, 232, 0.98));
  border-color: rgba(160, 239, 255, 0.82);
  box-shadow: 0 0 0 1px rgba(151, 234, 255, 0.26);
  transform: translateY(-1px);
}

.goal-move-btn[data-move-direction="up"] {
  border-color: rgba(122, 246, 194, 0.52);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.96), rgba(11, 163, 117, 0.94));
}

.goal-move-btn[data-move-direction="up"]:hover,
.goal-move-btn[data-move-direction="up"]:focus-visible {
  background: linear-gradient(135deg, rgba(104, 235, 183, 0.98), rgba(22, 181, 129, 0.98));
  border-color: rgba(175, 255, 224, 0.84);
  box-shadow: 0 0 0 1px rgba(146, 244, 203, 0.26);
}

.goal-move-btn[data-move-direction="down"] {
  border-color: rgba(255, 158, 158, 0.52);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.96), rgba(220, 38, 38, 0.94));
}

.goal-move-btn[data-move-direction="down"]:hover,
.goal-move-btn[data-move-direction="down"]:focus-visible {
  background: linear-gradient(135deg, rgba(252, 145, 145, 0.98), rgba(239, 68, 68, 0.98));
  border-color: rgba(255, 199, 199, 0.84);
  box-shadow: 0 0 0 1px rgba(255, 170, 170, 0.24);
}

.goal-list-card__date,
.goal-list-card__notes {
  margin: 6px 0 0;
}

.goal-list-card__notes {
  color: var(--text);
}

.goal-list-card__subgoals {
  display: grid;
  gap: 8px;
}

.goal-list-card__subgoals-title {
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.goal-list-card__subgoals-list {
  display: grid;
  gap: 8px;
}

.goal-list-card__subgoal-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.goal-list-card__subgoal-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.goal-list-card__subgoal-title {
  font-weight: 700;
  color: var(--text);
}

.goal-list-card__subgoal-meta,
.goal-list-card__subgoals-empty {
  color: var(--muted);
  margin: 0;
}

.goal-table-title {
  font-weight: 700;
}

.goal-table-notes {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.goal-table-cell {
  min-width: 0;
}

.goal-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.goal-title {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.goal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.92rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.goal-notes {
  margin: 14px 0 0;
  color: var(--text);
}

.goal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.update-feedback {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #d9ecff;
  font-weight: 700;
}

.update-feedback.is-success {
  color: #8df0c0;
}

.update-feedback.is-error {
  color: #ffb2b2;
}

.status-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.status-chip {
  border: 1px solid rgba(111, 220, 255, 0.24);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(27, 62, 122, 0.72));
  color: #d9ecff;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  z-index: 4;
  pointer-events: auto;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.status-chip:hover,
.status-chip:focus-visible {
  background: linear-gradient(135deg, rgba(54, 205, 255, 0.22), rgba(11, 149, 228, 0.18));
  border-color: rgba(119, 226, 255, 0.48);
  box-shadow: 0 0 0 1px rgba(123, 227, 255, 0.16);
  transform: translateY(-1px);
}

.status-chip.is-active {
  background: linear-gradient(135deg, #42a5f5 0%, #1e88e5 100%);
  border-color: rgba(104, 197, 255, 0.48);
  color: #ffffff;
}

.status-select {
  border: 1px solid var(--line);
  padding: 10px 12px;
}

.remove-btn {
  border: 0;
  background: linear-gradient(135deg, rgba(255, 124, 124, 0.22), rgba(177, 54, 90, 0.3));
  color: #ffe0e0;
  padding: 10px 14px;
  border-radius: 999px;
  position: relative;
  z-index: 4;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.remove-btn:hover,
.remove-btn:focus-visible {
  box-shadow: 0 0 0 1px rgba(255, 125, 125, 0.2);
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  text-align: center;
}

.goal-item.today {
  box-shadow: inset 0 0 0 1px rgba(255, 204, 102, 0.5);
}

.goal-item.completed {
  box-shadow: inset 0 0 0 1px rgba(86, 214, 162, 0.55);
}

@media (max-width: 860px) {
  .checklist-subgoal-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .checklist-subgoal-actions {
    justify-content: flex-start;
  }

  .checklist-goal-group__side {
    justify-items: start;
  }
}

@media (max-width: 620px) {
  .app-shell--planner {
    width: min(100% - 16px, 100%);
    padding-top: 14px;
  }

  .planner-topbar {
    padding: 14px;
    border-radius: 22px;
  }

  .planner-topbar__row,
  .planner-brand,
  .planner-status,
  .planner-topbar__meta {
    flex-direction: column;
    align-items: stretch;
  }

  .planner-topbar__actions {
    width: 100%;
  }

  .planner-status {
    gap: 10px;
  }

  .planner-welcome--inline {
    justify-content: flex-start;
  }

  .planner-header-toggle-row {
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
  }

  .planner-header-toggle {
    flex: 1 1 auto;
    min-height: 46px;
    font-size: 0.94rem;
  }

  .planner-mobile-menu-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    min-width: 68px;
    min-height: 56px;
    padding: 0 18px;
    border-radius: 18px;
    background: rgba(10, 34, 74, 0.96);
    border: 1px solid rgba(126, 203, 255, 0.55);
    color: #f4f7ff;
    box-shadow: 0 14px 28px rgba(8, 22, 52, 0.22);
    position: relative;
    z-index: 71;
    gap: 12px;
  }

  body.planner-menu-open .planner-mobile-menu-toggle {
    visibility: hidden;
  }

  .planner-mobile-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 69;
    border: 0;
    background: rgba(8, 19, 44, 0.54);
    backdrop-filter: blur(10px);
    cursor: pointer;
  }

  .menu-panel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    bottom: 0;
    z-index: 70;
    width: min(78vw, 300px);
    max-width: 300px;
    max-height: 100vh;
    margin-top: 0;
    padding: 26px 24px 28px;
    border-top: 0;
    border-radius: 0;
    background: #04213f;
    box-shadow: 12px 0 32px rgba(0, 0, 0, 0.35);
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* On phones the menu is a drawer that should stay closed until the
     hamburger button is tapped - this is what makes the "hidden" attribute
     the drawer starts with in the HTML actually take effect here. */
  .menu-panel[hidden] {
    display: none !important;
  }

  .planner-mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
  }

  .menu-panel .section-label {
    color: #7ecbff;
    letter-spacing: 0.2em;
    font-size: 0.76rem;
  }

  .planner-mobile-menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-width: 40px;
    min-height: 40px;
    border-radius: 10px;
    background: transparent;
    border: 0;
    color: #f4f7ff;
    font-size: 0;
    line-height: 1;
  }

  .planner-mobile-menu-close::before {
    content: "\00d7";
    font-size: 1.8rem;
  }

  .view-nav.view-nav--drawer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
  }

  .view-nav.view-nav--drawer .view-tab {
    min-height: auto;
    border-radius: 0;
    padding: 14px 0;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    box-shadow: none;
  }

  .view-nav.view-nav--drawer .view-tab:last-child {
    border-bottom: none;
  }

  .view-nav.view-nav--drawer .view-tab.is-active,
  .view-nav.view-nav--drawer .view-tab:hover,
  .view-nav.view-nav--drawer .view-tab:focus-visible {
    color: #2196f3;
    background: transparent;
    box-shadow: none;
  }

  .planner-mobile-menu-toggle > span:last-child {
    font-size: 1rem;
    font-weight: 500;
  }

  .planner-mobile-menu-toggle__icon span {
    background: #f4f7ff;
  }

  .planner-home-button,
  .planner-account-button,
  .planner-logout {
    width: 100%;
  }

  .hero-date {
    text-align: left;
  }

  .auth-actions {
    flex-direction: column;
  }

  .auth-actions > * {
    width: 100%;
  }

  .auth-input-grid {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: min(100% - 14px, 100%);
    padding-top: 18px;
  }

  .view-nav {
    top: 8px;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .view-tab {
    padding: 11px 6px;
    font-size: 0.8rem;
  }

  .hero,
  .card {
    padding: 16px;
  }

  .hero,
  .goal-head,
  .progress-copy,
  .daily-status-wrap,
  .two-up,
  .reminder-inline-row,
  .three-up,
  .four-up,
  .summary-report-grid,
  .stats-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
    grid-template-columns: 1fr;
  }

  .compact-btn {
    margin-top: 0;
  }

  .goal-table-head,
  .goal-table-row,
  .subgoal-table-head,
  .subgoal-table-row {
    grid-template-columns: 1fr;
  }

  .goal-list-card__header,
  .goal-list-card__meta,
  .goal-list-card__actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .goal-table-head,
  .goal-table {
    min-width: 0;
  }

  .planner-calendar-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .planner-calendar-toolbar__left,
  .planner-calendar-toolbar__right,
  .planner-calendar-month {
    justify-content: stretch;
  }

  .planner-calendar-picker,
  .planner-calendar-picker select,
  .planner-calendar-picker input {
    min-width: 100%;
  }

  .planner-calendar-board {
    overflow-x: visible;
  }

  .planner-calendar-grid {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .planner-calendar-cell {
    min-height: 0;
    border-right: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 12px;
  }

  .planner-calendar-toolbar {
    gap: 12px;
  }

  .planner-calendar-toolbar__left {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .planner-calendar-toolbar__right {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .planner-calendar-range-header {
    gap: 6px;
    align-items: start;
  }

  .planner-calendar-cell__header {
    align-items: center;
  }

  .planner-calendar-cell__weekday {
    font-size: 0.74rem;
  }

  .planner-calendar-cell__date {
    font-size: 1.12rem;
  }

  .planner-calendar-cell__events {
    gap: 10px;
  }

  .calendar-event {
    padding: 10px 12px;
    border-radius: 14px;
  }

  .repeat-weekdays-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.app-header {
  text-align: center;
  margin-bottom: 10px;
}

.app-logo {
  max-width: 160px;
  height: auto;
}

.calendar-page-card {
  overflow: hidden;
}

.planner-calendar-shell {
  display: grid;
  gap: 18px;
}

.planner-calendar-toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  padding: 10px 0 6px;
  flex-wrap: nowrap;
}

.planner-calendar-toolbar__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.planner-calendar-toolbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  margin-left: auto;
}

.planner-calendar-month {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.planner-calendar-picker {
  min-width: 210px;
}

.planner-calendar-picker select {
  min-width: 210px;
}

.planner-calendar-picker input {
  min-width: 140px;
}

.planner-calendar-picker--search {
  min-width: 260px;
}

.planner-calendar-picker--search input {
  min-width: 260px;
}

.planner-calendar-board {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at top, rgba(33, 150, 243, 0.1), transparent 32%),
    rgba(8, 22, 52, 0.35);
  padding: 14px;
}

.planner-calendar-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
}

.planner-calendar-cell {
  min-height: 150px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  display: grid;
  align-content: start;
  gap: 8px;
  background: rgba(13, 38, 77, 0.8);
  box-shadow: none;
}

.planner-calendar-cell.is-other-month {
  background: rgba(13, 38, 77, 0.32);
  color: rgba(244, 247, 255, 0.4);
  box-shadow: none;
}

.planner-calendar-cell.is-today {
  border-color: rgba(33, 150, 243, 0.55);
  background: rgba(33, 150, 243, 0.14);
  box-shadow: inset 0 0 0 1px rgba(33, 150, 243, 0.4), 0 12px 28px rgba(8, 22, 52, 0.3);
}

.planner-calendar-cell.is-expanded {
  box-shadow: inset 0 0 0 1px rgba(33, 150, 243, 0.32), 0 16px 32px rgba(8, 22, 52, 0.35);
}

.planner-calendar-cell__header {
  display: flex;
  justify-content: flex-start;
  align-items: start;
  gap: 10px;
}

.planner-calendar-cell__weekday {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.planner-calendar-cell__date {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}

.planner-calendar-cell__full-date {
  display: none;
}

.planner-calendar-cell__events {
  display: grid;
  gap: 8px;
}

.planner-calendar-cell__count {
  font-size: 0.86rem;
  color: var(--muted);
}

.planner-calendar-weekday-head {
  padding: 2px 6px 10px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.planner-calendar-grid.planner-calendar-grid--text {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.planner-calendar-grid.planner-calendar-grid--text .planner-calendar-weekday-head,
.planner-calendar-grid.planner-calendar-grid--text .planner-calendar-cell__weekday,
.planner-calendar-grid.planner-calendar-grid--text .planner-calendar-cell__date {
  display: none;
}

.planner-calendar-grid.planner-calendar-grid--text .planner-calendar-cell {
  min-height: 0;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(13, 38, 77, 0.8);
}

.planner-calendar-grid.planner-calendar-grid--text .planner-calendar-cell__header {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.planner-calendar-grid.planner-calendar-grid--text .planner-calendar-cell__full-date {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: #f4f7ff;
}

.planner-calendar-grid.planner-calendar-grid--text .planner-calendar-cell__count {
  font-size: 0.8rem;
}

.planner-calendar-grid.planner-calendar-grid--text .planner-calendar-cell__events {
  gap: 8px;
}

.planner-calendar-grid.planner-calendar-grid--text .calendar-event {
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border: 0;
  gap: 4px;
}

.planner-calendar-grid.planner-calendar-grid--text .calendar-event:hover,
.planner-calendar-grid.planner-calendar-grid--text .calendar-event:focus-visible {
  transform: none;
  box-shadow: none;
  filter: none;
}

.planner-calendar-grid.planner-calendar-grid--text .calendar-event__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f4f7ff;
}

.planner-calendar-grid.planner-calendar-grid--text .calendar-event__time,
.planner-calendar-grid.planner-calendar-grid--text .calendar-event__status {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
}

.planner-calendar-grid.planner-calendar-grid--text .calendar-event--planned .calendar-event__title {
  color: #d7c8ff;
}

.planner-calendar-grid.planner-calendar-grid--text .calendar-event--progress .calendar-event__title {
  color: #ffd48b;
}

.planner-calendar-grid.planner-calendar-grid--text .calendar-event--completed .calendar-event__title {
  color: #7fe0c9;
}

.calendar-event {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.25;
  width: 100%;
  border: 0;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.calendar-event:hover,
.calendar-event:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(8, 22, 52, 0.35);
  filter: brightness(1.08);
}

.calendar-event--planned {
  background-color: rgba(33, 150, 243, 0.22);
  background-image: linear-gradient(135deg, rgba(100, 181, 246, 0.3), rgba(33, 150, 243, 0.36));
  border-left: 4px solid #64b5f6;
  color: #eaf6ff;
}

.calendar-event--progress {
  background-color: rgba(201, 147, 34, 0.24);
  background-image: linear-gradient(135deg, rgba(255, 214, 102, 0.3), rgba(201, 147, 34, 0.38));
  border-left: 4px solid #ffcc66;
  color: #fff7dc;
}

.calendar-event--completed {
  background-color: rgba(46, 166, 92, 0.28);
  background-image: linear-gradient(135deg, rgba(67, 201, 126, 0.34), rgba(46, 166, 92, 0.42));
  border-left: 4px solid #56d6a2;
  color: #eafff1;
}

.calendar-event__time {
  font-size: 0.7rem;
  opacity: 0.82;
  color: inherit;
}

.calendar-event__title {
  font-weight: 700;
}

.calendar-event__status {
  display: none;
}

.planner-calendar-empty,
.planner-calendar-more {
  color: var(--muted);
  font-size: 0.84rem;
}

.planner-calendar-more--button,
.planner-calendar-less {
  border: 0;
  background: transparent;
  color: #8fd0ff;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.planner-calendar-less {
  color: #d7ecff;
}

@media (max-width: 620px) {
  .calendar-page-card {
    overflow: visible;
  }

  .planner-calendar-shell {
    gap: 14px;
  }

  .planner-calendar-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .planner-calendar-toolbar__left {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .planner-calendar-toolbar__right {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    margin-left: 0;
  }

  .planner-calendar-picker,
  .planner-calendar-picker select,
  .planner-calendar-picker input,
  .planner-calendar-picker--search,
  .planner-calendar-picker--search input {
    min-width: 100%;
    width: 100%;
  }

  .planner-calendar-range-header {
    gap: 6px;
    align-items: start;
  }

  .planner-calendar-board {
    overflow-x: hidden;
    padding-bottom: 0;
  }

  .planner-calendar-grid {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .planner-calendar-weekday-head {
    display: none;
  }

  .planner-calendar-cell {
    min-height: 0;
    padding: 8px;
    border-radius: 16px;
    gap: 6px;
  }

  .planner-calendar-cell__header {
    gap: 6px;
  }

  .planner-calendar-cell__date {
    font-size: 1.05rem;
  }

  .planner-calendar-cell__count {
    font-size: 0.68rem;
  }

  .calendar-event {
    padding: 5px 7px;
    font-size: 0.68rem;
    border-radius: 14px;
  }

  .calendar-event__time {
    display: none;
  }

  .calendar-event__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .planner-calendar-grid.planner-calendar-grid--text {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .planner-calendar-grid.planner-calendar-grid--text .planner-calendar-cell {
    min-height: 0;
    padding: 14px;
    border-radius: 18px;
    gap: 8px;
    background: rgba(13, 38, 77, 0.86);
  }

  .planner-calendar-grid.planner-calendar-grid--text .planner-calendar-cell__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .planner-calendar-grid.planner-calendar-grid--text .planner-calendar-cell__weekday,
  .planner-calendar-grid.planner-calendar-grid--text .planner-calendar-cell__date {
    display: none;
  }

  .planner-calendar-grid.planner-calendar-grid--text .planner-calendar-cell__full-date {
    display: block;
    font-size: 0.96rem;
    font-weight: 700;
    color: #f4f7ff;
  }

  .planner-calendar-grid.planner-calendar-grid--text .planner-calendar-cell__count {
    font-size: 0.8rem;
  }

  .planner-calendar-grid.planner-calendar-grid--text .planner-calendar-cell__events {
    gap: 6px;
  }

  .planner-calendar-grid.planner-calendar-grid--text .calendar-event {
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
    gap: 3px;
  }

  .planner-calendar-grid.planner-calendar-grid--text .calendar-event:hover,
  .planner-calendar-grid.planner-calendar-grid--text .calendar-event:focus-visible {
    transform: none;
    box-shadow: none;
    filter: none;
  }

  .planner-calendar-grid.planner-calendar-grid--text .calendar-event__title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #f4f7ff;
  }

  .planner-calendar-grid.planner-calendar-grid--text .calendar-event__time,
  .planner-calendar-grid.planner-calendar-grid--text .calendar-event__status {
    display: block;
    font-size: 0.74rem;
    color: var(--muted);
  }

  .planner-calendar-grid.planner-calendar-grid--text .calendar-event--planned .calendar-event__title {
    color: #d7c8ff;
  }

  .planner-calendar-grid.planner-calendar-grid--text .calendar-event--progress .calendar-event__title {
    color: #ffd48b;
  }

  .planner-calendar-grid.planner-calendar-grid--text .calendar-event--completed .calendar-event__title {
    color: #7fe0c9;
  }

  .planner-calendar-grid.planner-calendar-grid--text .planner-calendar-more--button,
  .planner-calendar-grid.planner-calendar-grid--text .planner-calendar-less {
    margin-top: 4px;
  }

  .planner-calendar-cell__weekday {
    font-size: 0.72rem;
  }

  .planner-calendar-cell__date {
    font-size: 0.98rem;
  }

  .calendar-event {
    padding: 8px 9px;
    font-size: 0.8rem;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.legacy-subgoal-panel {
  display: none !important;
}

.checklist-page-card {
  display: grid;
  gap: 18px;
}

.checklist-goal-picker {
  min-width: min(100%, 380px);
}

.checklist-summary-card {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
}

.checklist-summary-card h3 {
  margin: 0;
}

.checklist-summary-meta {
  margin: 8px 0 0;
  color: var(--muted);
}
.checklist-create-panel {
  display: grid;
  gap: 8px;
  padding: 18px 18px 14px;
  border: 1px solid rgba(112, 170, 255, 0.18);
  border-radius: 24px;
  background: rgba(18, 53, 108, 0.5);
}

.checklist-page-card #checklistSubGoalList {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0;
}

.checklist-page-card .checklist-goal-group {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.checklist-create-form {
  display: grid;
  gap: 10px;
}

#checklistCreateBody[hidden] {
  display: none !important;
}

.checklist-create-panel .subgoal-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.checklist-create-panel .subgoal-heading > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.checklist-create-panel .subgoal-heading .section-label,
.checklist-create-panel .subgoal-heading h3 {
  margin: 0;
}

.checklist-date-controls {
  display: grid;
  grid-template-columns: minmax(220px, 260px) 1fr;
  align-items: end;
  gap: 12px;
}

.checklist-date-controls .period-picker {
  min-width: 0;
}

.checklist-print-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.checklist-date-controls .compact-btn {
  margin-top: 0;
  min-height: 48px;
  padding-inline: 18px;
}


.checklist-summary-progress {
  align-self: center;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.checklist-subgoal-table {
  display: grid;
  gap: 12px;
}

.checklist-subgoal-head {
  display: none;
}

.checklist-subgoal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: var(--panel-strong);
}

.checklist-subgoal-row--not-started {
  background: linear-gradient(135deg, rgba(224, 61, 79, 0.96), rgba(187, 34, 52, 0.92));
}

.checklist-subgoal-row--in-progress {
  background: linear-gradient(135deg, rgba(249, 171, 70, 0.94), rgba(225, 124, 34, 0.88));
}

.checklist-subgoal-row--completed {
  background: linear-gradient(135deg, rgba(40, 166, 96, 0.96), rgba(25, 138, 79, 0.92));
}

.checklist-subgoal-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.checklist-subgoal-title {
  font-weight: 800;
  color: #ffffff;
  line-height: 1.08;
  font-size: 0.98rem;
}

.checklist-subgoal-row--completed .checklist-subgoal-title {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.checklist-subgoal-meta {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.81rem;
  line-height: 1.1;
}

.checklist-subgoal-note,
.checklist-subgoal-status-text {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
  line-height: 1.05;
}

.checklist-subgoal-note::after {
  content: ' �';
  margin-left: 4px;
}

.checklist-subgoal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.checklist-subgoal-actions .ghost-btn,
.checklist-subgoal-actions .remove-btn {
  min-width: 0;
  padding: 8px 12px;
  font-size: 0.92rem;
}

.checklist-subgoal-select {
  display: none;
}

.checklist-subgoal-square {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.42);
  background: rgba(17, 33, 64, 0.18);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.checklist-subgoal-square.is-done {
  background: linear-gradient(135deg, rgba(73, 223, 157, 0.34), rgba(33, 128, 103, 0.88));
  border-color: rgba(92, 238, 173, 0.8);
}

.checklist-subgoal-square:hover,
.checklist-subgoal-square:focus-visible {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.22);
  transform: translateY(-1px);
}

.checklist-open-btn {
  border: 1px solid rgba(126, 210, 255, 0.4);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.checklist-open-btn:hover,
.checklist-open-btn:focus-visible {
  border-color: rgba(126, 210, 255, 0.8);
  box-shadow: 0 0 0 1px rgba(126, 210, 255, 0.18);
}
.postpone-btn {
  border: 1px solid rgba(255, 206, 112, 0.46);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.92));
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, filter 180ms ease;
}

.postpone-btn:hover,
.postpone-btn:focus-visible {
  border-color: rgba(255, 230, 171, 0.82);
  box-shadow: 0 0 0 1px rgba(255, 214, 140, 0.18);
  filter: brightness(1.06);
  transform: translateY(-1px);
}


@media (max-width: 860px) {
  .checklist-subgoal-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .checklist-subgoal-actions {
    justify-content: flex-start;
  }

  .checklist-goal-group__side {
    justify-items: start;
  }
}

.checklist-goal-group {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel-strong);
}

.checklist-goal-group__header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.checklist-goal-group__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.checklist-goal-group__meta {
  margin: 3px 0 0;
  color: var(--muted);
  line-height: 1.1;
  font-size: 0.92rem;
}

.checklist-goal-group__summary {
  font-weight: 800;
  color: #ffffff;
  font-size: 0.98rem;
}

.checklist-goal-group__side {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.checklist-goal-group__body {
  display: grid;
  gap: 8px;
}.checklist-goal-group__body[hidden] {
  display: none !important;
}


.checklist-collapse-btn {
  margin-top: 0;
  padding: 6px 12px;
  min-width: 132px;
  font-size: 0.88rem;
}

.checklist-collapse-btn.is-open {
  background: rgba(33, 150, 243, 0.18);
}

.checklist-subgoal-create {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(126, 210, 255, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(11, 34, 74, 0.34);
}

.checklist-subgoal-create__fields {
  display: grid;
  gap: 10px;
  align-items: end;
}

.checklist-subgoal-create__fields--main {
  grid-template-columns: 1.05fr 0.95fr 1.1fr 1fr;
}

.checklist-subgoal-create__fields--support {
  grid-template-columns: minmax(180px, 0.8fr) minmax(280px, 1.2fr) auto;
  gap: 10px;
  align-items: end;
}

.checklist-subgoal-create__fields > label {
  min-width: 0;
}

.checklist-reminder-row {
  display: grid;
  grid-template-columns: auto minmax(250px, 1fr);
  gap: 10px;
  align-items: end;
}

.checklist-create-form .inline-check {
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid rgba(112, 170, 255, 0.18);
  border-radius: 18px;
  background: rgba(11, 34, 74, 0.34);
  justify-self: start;
}

.checklist-subgoal-create__actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  align-self: end;
}

.checklist-subgoal-create__actions .primary-btn {
  min-width: 160px;
  padding: 10px 16px;
}

.checklist-create-form .primary-btn.inline-btn,
.checklist-create-form .ghost-btn.inline-btn {
  min-height: 52px;
}

.checklist-time-field input,
.checklist-reminder-row select,
.checklist-subgoal-create__actions .primary-btn,
.checklist-subgoal-create__actions .ghost-btn {
  width: 100%;
}

.checklist-delete-btn {
  padding: 8px 14px;
  min-width: 92px;
}

@media (max-width: 1100px) {
  .checklist-date-controls {
    grid-template-columns: 1fr;
  }

  .checklist-print-actions {
    justify-content: flex-start;
  }

  .checklist-subgoal-create__fields--main {
    grid-template-columns: 1fr 1fr;
  }

  .checklist-subgoal-create__fields--support {
    grid-template-columns: 1fr;
  }

  .checklist-reminder-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .checklist-print-actions,
  .checklist-subgoal-create__fields--main,
  .checklist-subgoal-create__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .checklist-create-panel {
    padding: 14px;
  }
}
.goal-form-actions {
  display: grid;
  gap: 12px;
}





.checklist-delete-btn {
  padding: 8px 14px;
  min-width: 92px;
}








.goal-search-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 16, 36, 0.68);
}

.goal-search-modal[hidden] {
  display: none !important;
}

.goal-search-modal__dialog {
  width: min(100%, 620px);
  max-height: min(80vh, 720px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
}

.goal-search-modal__field,
.goal-search-modal__field input {
  width: 100%;
}

.goal-search-modal__list {
  display: grid;
  gap: 10px;
}

.goal-search-modal__option {
  width: 100%;
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid rgba(111, 220, 255, 0.24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(27, 62, 122, 0.72));
  color: #d9ecff;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.goal-search-modal__option:hover,
.goal-search-modal__option:focus-visible {
  background: linear-gradient(135deg, rgba(54, 205, 255, 0.22), rgba(11, 149, 228, 0.18));
  border-color: rgba(119, 226, 255, 0.48);
  box-shadow: 0 0 0 1px rgba(123, 227, 255, 0.16);
  transform: translateY(-1px);
}

.goal-search-modal__option-title {
  font-weight: 800;
  color: #ffffff;
}

.goal-search-modal__option-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.goal-search-modal__actions {
  display: flex;
  justify-content: flex-end;
}

.reward-bank-page {
  gap: 1.25rem;
}

.reward-bank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.reward-bank-list {
  display: grid;
  gap: 1rem;
}

.reward-goal-card {
  padding-left: 1.5rem;
}

.reward-goal-card__top {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 1.25rem;
}

.reward-goal-card__main {
  flex: 1 1 auto;
  min-width: 0;
}

.reward-goal-card__highlight {
  flex: 0 0 240px;
  margin-left: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1px solid rgba(86, 214, 162, 0.38);
  background: linear-gradient(135deg, rgba(86, 214, 162, 0.24), rgba(33, 150, 243, 0.14));
  box-shadow: 0 16px 30px rgba(12, 45, 92, 0.22);
}

.reward-goal-card__highlight-label {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d7fff1;
}

.reward-goal-card__highlight-value {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1;
  color: #ffffff;
}

@media (max-width: 760px) {
  .reward-bank-grid {
    grid-template-columns: 1fr;
  }

  .reward-goal-card__top {
    flex-direction: column;
  }

  .reward-goal-card__highlight {
    flex: 1 1 auto;
    width: 100%;
    align-items: flex-start;
  }
}



.checklist-goal-group__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}

.checklist-copy-all-btn,
.checklist-check-all-btn,
.checklist-uncheck-all-btn,
.checklist-collapse-btn {
  min-width: 9.75rem;
  justify-content: center;
  text-align: center;
  border-width: 1px;
}

.checklist-copy-all-btn {
  background: #2f80ed;
  border-color: #2f80ed;
  color: #ffffff;
}

.checklist-copy-all-btn:hover,
.checklist-copy-all-btn:focus-visible {
  background: #256ed0;
  border-color: #256ed0;
  box-shadow: 0 0 0 1px rgba(47, 128, 237, 0.18);
}

.checklist-check-all-btn {
  background: #1ea672;
  border-color: #1ea672;
  color: #ffffff;
}

.checklist-check-all-btn:hover,
.checklist-check-all-btn:focus-visible {
  background: #19885e;
  border-color: #19885e;
  box-shadow: 0 0 0 1px rgba(30, 166, 114, 0.18);
}

.checklist-uncheck-all-btn {
  background: #d94b5a;
  border-color: #d94b5a;
  color: #ffffff;
}

.checklist-uncheck-all-btn:hover,
.checklist-uncheck-all-btn:focus-visible {
  background: #bd3948;
  border-color: #bd3948;
  box-shadow: 0 0 0 1px rgba(217, 75, 90, 0.18);
}

.checklist-collapse-btn {
  background: #b48b35;
  border-color: #b48b35;
  color: #ffffff;
}

.checklist-collapse-btn:hover,
.checklist-collapse-btn:focus-visible {
  background: #997428;
  border-color: #997428;
  box-shadow: 0 0 0 1px rgba(180, 139, 53, 0.18);
}

.checklist-collapse-btn.is-open {
  background: #997428;
}

@media print {
  body.print-goals-active,
  body.print-checklist-active {
    background: #ffffff !important;
    color: #000000 !important;
  }

  body.print-goals-active .planner-topbar,
  body.print-goals-active [data-view-panel]:not([data-view-panel="goals"]),
  body.print-goals-active .section-heading .report-controls,
  body.print-goals-active #resetButton,
  body.print-goals-active .reward-banner-grid,
  body.print-goals-active .stats-grid,
  body.print-checklist-active .planner-topbar,
  body.print-checklist-active [data-view-panel]:not([data-view-panel="checklist"]),
  body.print-checklist-active .checklist-create-panel,
  body.print-checklist-active .checklist-date-controls {
    display: none !important;
  }

  body.print-goals-active .app-shell,
  body.print-goals-active .layout,
  body.print-goals-active .card,
  body.print-goals-active .all-goals-card,
  body.print-goals-active .goal-table-wrap,
  body.print-goals-active .goal-table,
  body.print-checklist-active .app-shell,
  body.print-checklist-active .layout,
  body.print-checklist-active .card,
  body.print-checklist-active .checklist-page-card,
  body.print-checklist-active .subgoal-list,
  body.print-checklist-active .checklist-goal-group,
  body.print-checklist-active .checklist-subgoal-row {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    border-color: #000000 !important;
  }

  body.print-goals-active .goal-table > *,
  body.print-checklist-active .checklist-goal-group__header,
  body.print-checklist-active .checklist-goal-group__body,
  body.print-checklist-active .checklist-subgoal-row,
  body.print-checklist-active .checklist-subgoal-head {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
  }

  body.print-checklist-active .checklist-goal-group__body {
    display: block !important;
  }
  body.print-goals-active .section-label,
  body.print-checklist-active .section-label,
  body.print-goals-active h1,
  body.print-goals-active h2,
  body.print-goals-active h3,
  body.print-checklist-active h1,
  body.print-checklist-active h2,
  body.print-checklist-active h3,
  body.print-goals-active p,
  body.print-checklist-active p,
  body.print-goals-active span,
  body.print-checklist-active span,
  body.print-goals-active strong,
  body.print-checklist-active strong,
  body.print-goals-active button,
  body.print-checklist-active button {
    color: #000000 !important;
  }

  body.print-checklist-active .checklist-subgoal-square,
  body.print-checklist-active .checklist-copy-btn,
  body.print-checklist-active .checklist-edit-btn,
  body.print-checklist-active .checklist-delete-btn,
  body.print-checklist-active .checklist-move-up-btn,
  body.print-checklist-active .checklist-move-down-btn,
  body.print-checklist-active .checklist-copy-all-btn,
  body.print-checklist-active .checklist-check-all-btn,
  body.print-checklist-active .checklist-uncheck-all-btn,
  body.print-checklist-active .checklist-collapse-btn,
  body.print-goals-active .primary-btn,
  body.print-goals-active .ghost-btn,
  body.print-goals-active .remove-btn,
  body.print-checklist-active .primary-btn,
  body.print-checklist-active .ghost-btn,
  body.print-checklist-active .remove-btn {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
    box-shadow: none !important;
  }
}


@media (max-width: 480px) {
  .app-shell,
  .app-shell--planner {
    width: min(100% - 10px, 100%);
    padding-top: 12px;
    padding-bottom: 20px;
  }

  .hero,
  .card,
  .planner-topbar,
  .goal-list-card,
  .checklist-goal-group,
  .reward-goal-card {
    padding: 14px;
  }

  .planner-brand__copy h1,
  .section-heading h2,
  .auth-copy h1 {
    font-size: 1.6rem;
  }

  .menu-panel {
    width: min(80vw, 300px);
    padding: 22px 20px 24px;
  }

  .planner-mobile-menu-toggle,
  .planner-header-toggle,
  .planner-mobile-menu-close {
    min-height: 48px;
  }

  .view-nav.view-nav--drawer .view-tab {
    min-height: auto;
    padding: 12px 0;
    font-size: 0.98rem;
  }

  .planner-topbar__actions,
  .planner-account-actions,
  .goal-form-actions,
  .checklist-subgoal-create__actions,
  .report-controls,
  .action-mode-buttons,
  .goal-list-card__reorder,
  .goal-list-card__actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .report-controls > *,
  .goal-form-actions > *,
  .checklist-subgoal-create__actions > *,
  .action-mode-buttons > *,
  .goal-list-card__reorder > *,
  .goal-list-card__actions > * {
    width: 100%;
  }

  .checklist-goal-group__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    justify-content: flex-start;
  }

  .checklist-goal-group__actions > * {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    padding: 8px 10px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .period-picker,
  .period-picker input,
  .period-picker select,
  .reward-input-grid,
  .reward-input-grid--triple,
  .goal-form label,
  .checklist-create-form label,
  .auth-input-grid label {
    min-width: 0;
    width: 100%;
  }

  .period-count-wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .period-count-wrap input {
    width: 100%;
  }

  .stats-grid,
  .reward-banner-grid,
  .summary-report-grid,
  .daily-status-wrap {
    grid-template-columns: 1fr;
  }

  .donut-chart {
    width: 150px;
    height: 150px;
  }

  .donut-hole {
    width: 96px;
    height: 96px;
  }

  .goal-list-card {
    padding-left: 14px;
  }

  .goal-list-card__order {
    position: static;
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
  }

  .goal-list-card__header,
  .goal-list-card__meta,
  .goal-list-card__actions,
  .performance-head,
  .chart-header,
  .planner-calendar-range-header {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .planner-calendar-toolbar__left {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .planner-calendar-board {
    overflow-x: hidden;
  }

  .planner-calendar-grid {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .planner-calendar-weekday-head {
    display: none;
  }

  .planner-calendar-cell {
    min-height: 0;
    padding: 10px 12px;
  }

  .calendar-event {
    font-size: 0.76rem;
    padding: 7px 8px;
  }

  .checklist-subgoal-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .checklist-subgoal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
  }

  .checklist-subgoal-actions .ghost-btn,
  .checklist-subgoal-actions .remove-btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 10px;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .checklist-subgoal-square,
  .subgoal-check-btn {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 14px;
  }

  .checklist-copy-all-btn,
  .checklist-check-all-btn,
  .checklist-uncheck-all-btn,
  .checklist-collapse-btn {
    min-width: 0;
  }

  .goal-table-wrap,
  .subgoal-list,
  .planner-calendar-board {
    border-radius: 18px;
  }

  .auth-card {
    padding: 18px 14px;
  }

  .app-logo {
    max-width: 124px;
  }
}

body.planner-menu-open {
  overflow: hidden;
}

#checklistNewSubGoalWrap[hidden],
#checklistExistingSubGoalWrap[hidden] {
  display: none !important;
}


@media print {
  body.print-checklist-active .checklist-goal-group:not(.print-target-goal) {
    display: none !important;
  }
}


