:root {
  color-scheme: dark;
  --page: #081312;
  --page-2: #10201d;
  --paper: #fbfcfa;
  --paper-soft: #f1f5f1;
  --mint: #e8f3ed;
  --ink: #17211d;
  --muted: #68736d;
  --line: rgba(23, 33, 29, 0.12);
  --teal: #0f6f5f;
  --teal-dark: #0a443d;
  --orange: #d96e3f;
  --green: #3aa978;
  --shadow: 0 34px 100px rgba(0, 0, 0, 0.34);
  --card-shadow: 0 24px 74px rgba(5, 28, 25, 0.17);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Avenir Next",
    Inter,
    Helvetica,
    Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% -8%, rgba(217, 110, 63, 0.2), transparent 30%),
    radial-gradient(circle at 82% 4%, rgba(58, 169, 120, 0.18), transparent 32%),
    linear-gradient(135deg, #071211 0%, var(--page) 48%, #10201d 100%);
  font-variant-numeric: tabular-nums;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 0%, #000, transparent 80%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(255, 116, 51, 0.32);
  outline-offset: 2px;
}

button:disabled {
  cursor: default;
}

select:disabled,
input:disabled {
  cursor: default;
  opacity: 0.72;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-shell {
  width: min(100% - 44px, 1040px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 26px 0 54px;
}

.auth-error {
  width: min(100%, 460px);
  min-height: 260px;
  margin: min(22dvh, 150px) auto 0;
  padding: 34px 28px;
  display: grid;
  place-content: center;
  gap: 14px;
  border: 1px solid rgba(20, 36, 32, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(7, 47, 42, 0.18);
  text-align: center;
  color: var(--ink);
}

.auth-error h1 {
  margin: 0;
  font-size: 32px;
}

.auth-error p {
  max-width: 380px;
  margin: 0;
  color: var(--muted);
  font-weight: 680;
}

.auth-error > span {
  color: #6f7a74;
  font-size: 12px;
  font-weight: 680;
}

.auth-bot-link {
  display: inline-grid;
  place-items: center;
  justify-self: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  box-shadow: 0 16px 34px rgba(217, 110, 63, 0.28);
  font-size: 14px;
  font-weight: 820;
  text-decoration: none;
}

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
  color: #fff;
}

.brand,
.family-switch,
.icon-button,
.profile-button,
.text-action,
.primary-button,
.text-button,
.ghost-add,
.nav-item {
  border: 0;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.brand {
  display: inline-grid;
  align-items: center;
  min-height: 44px;
  color: #fff;
  font-size: 32px;
  font-weight: 780;
  line-height: 1;
  letter-spacing: -0.02em;
}

.family-switch {
  justify-self: start;
  min-width: 0;
  max-width: 320px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.92);
  background: transparent;
  font-size: 15px;
  font-weight: 640;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-switch:not(:disabled) {
  cursor: pointer;
}

.family-switch::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button,
.profile-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.profile-button {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.profile-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-button span {
  color: #fff;
  font-size: 13px;
  font-weight: 720;
}

.today-card {
  position: relative;
  min-height: 168px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(217, 110, 63, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(9, 28, 27, 0.98), rgba(12, 65, 56, 0.92)),
    linear-gradient(90deg, rgba(58, 169, 120, 0.18), rgba(217, 110, 63, 0.1));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.26);
}

.today-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(3, 28, 31, 0.28) 100%);
  pointer-events: none;
}

.today-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  min-height: inherit;
  max-width: 980px;
  padding: 26px 30px 22px;
  color: #fff;
}

h1,
h2,
p {
  margin-top: 0;
}

.today-eyebrow,
.panel-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 11px;
  line-height: 1;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.today-content h1 {
  margin-bottom: 10px;
  font-size: clamp(32px, 4.2vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 760;
}

.today-content p {
  max-width: 640px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1.35;
}

.today-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: min(100%, 520px);
}

.today-metrics article {
  min-width: 0;
}

.today-metrics strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 34px;
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-weight: 720;
  white-space: nowrap;
}

.today-metrics span,
.today-footer {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 560;
}

.today-footer {
  display: flex;
  gap: 42px;
  margin-top: 20px;
}

.next-step-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  color: #fff;
  background: rgba(7, 22, 20, 0.72);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.next-step-card > div {
  min-width: 0;
}

.next-step-card span,
.next-step-card strong,
.next-step-card p {
  display: block;
  min-width: 0;
}

.next-step-card span {
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.next-step-card strong {
  color: #fff;
  font-size: 19px;
  line-height: 1.12;
  font-weight: 740;
  letter-spacing: -0.02em;
}

.next-step-card p {
  max-width: 62ch;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 560;
}

.next-step-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.compact-primary {
  min-height: 42px;
  border-radius: 14px;
  padding: 0 18px;
  font-size: 14px;
}

.next-step-secondary {
  min-height: 42px;
  border-radius: 14px;
  padding: 0 14px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.1);
}

.attention-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(217, 110, 63, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 248, 243, 0.98), rgba(248, 252, 249, 0.98)),
    radial-gradient(circle at 100% 0%, rgba(217, 110, 63, 0.16), transparent 34%);
  box-shadow: 0 16px 40px rgba(64, 42, 31, 0.1);
}

.attention-card[hidden] {
  display: none;
}

.attention-head,
.attention-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.attention-head > div,
.attention-item > div {
  min-width: 0;
}

.attention-head span {
  display: block;
  color: #a2522f;
  font-size: 11px;
  font-weight: 860;
  text-transform: uppercase;
}

.attention-head strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
  font-weight: 860;
}

.attention-list {
  display: grid;
  gap: 8px;
}

.attention-item {
  min-height: 58px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(217, 110, 63, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  color: inherit;
  text-align: left;
}

button.attention-item.is-actionable {
  cursor: pointer;
}

button.attention-item.is-actionable:hover {
  border-color: rgba(217, 110, 63, 0.32);
  background: rgba(255, 255, 255, 0.92);
}

.attention-item strong,
.attention-item span,
.attention-item em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-item strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
}

.attention-item span {
  margin-top: 4px;
  color: #5f6d66;
  font-size: 12px;
  font-weight: 620;
}

.attention-item em {
  max-width: 190px;
  color: #a2522f;
  font-size: 11px;
  font-style: normal;
  font-weight: 780;
}

.bot-card,
.panel,
.family-setup-card {
  border: 1px solid rgba(17, 41, 35, 0.1);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--card-shadow);
}

.bot-card {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  padding: 18px 20px;
}

.billing-panel {
  display: grid;
  gap: 18px;
}

.bot-card[hidden],
.invite-card[hidden],
.family-setup-card[hidden] {
  display: none;
}

.family-setup-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
  gap: 28px;
  margin-top: 22px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(251, 252, 250, 0.98), rgba(234, 244, 237, 0.96)),
    radial-gradient(circle at 90% 0%, rgba(217, 110, 63, 0.18), transparent 30%);
}

.family-setup-card > div > span {
  display: block;
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 840;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.family-setup-card h2 {
  max-width: 520px;
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.family-setup-card p {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 620;
}

.family-setup-form {
  align-self: center;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
}

.family-setup-form label {
  display: grid;
  gap: 8px;
}

.family-setup-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.family-setup-form input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
  font-size: 15px;
  font-weight: 740;
}

.card-heading,
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.card-heading h2,
.panel-heading h2 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 700;
}

.card-heading p,
.task-row span,
.compact-item span,
.ai-decision span,
.sync-status span,
.balance-line span,
.budget-meter span,
.meal-today span,
.week-stats span,
.app-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
  font-weight: 560;
}

#botStatus {
  display: inline-grid;
  min-height: 32px;
  place-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--teal);
  background: var(--mint);
  font-size: 12px;
  font-weight: 640;
  white-space: nowrap;
}

#botStatus[data-status="connected"] {
  color: #08614f;
  background: #dff5ec;
}

#botStatus[data-status="pending"],
#botStatus[data-status="loading"] {
  color: #8a4a2f;
  background: #fff0e8;
}

#botStatus[data-status="expired"] {
  color: #8d3a2f;
  background: #ffe9e4;
}

#botStatus[data-status="fallback"],
#botStatus[data-status="shared"] {
  color: #44534e;
  background: #eef3f0;
}

#billingPlanStatus {
  display: inline-grid;
  min-height: 32px;
  place-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: #44534e;
  background: #eef3f0;
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

#billingPlanStatus[data-status="active"] {
  color: #08614f;
  background: #dff5ec;
}

#billingPlanStatus[data-status="cancelled"] {
  color: #8d3a2f;
  background: #ffe9e4;
}

.billing-summary {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(239, 247, 242, 0.82));
}

.billing-summary div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.billing-summary span,
.billing-summary p,
#billingWorkspaceName,
.billing-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 620;
}

.billing-summary strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  font-weight: 820;
}

.billing-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.instruction-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.primary-button {
  flex: 0 0 auto;
  min-height: 54px;
  border-radius: 18px;
  padding: 0 34px;
  color: #fff;
  background: var(--orange);
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 16px 34px rgba(255, 116, 51, 0.28);
}

.toolbar-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 14px 0 0;
}

.invite-card {
  display: grid;
  gap: 14px;
  width: min(100%, 620px);
  max-height: min(740px, calc(100dvh - 36px));
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(23, 33, 29, 0.1);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(7, 47, 42, 0.13);
  backdrop-filter: blur(18px);
}

.invite-sheet {
  align-items: center;
  justify-items: center;
}

.invite-sheet .invite-card {
  transform: translateY(12px) scale(0.98);
  transition: transform 180ms ease;
}

.invite-sheet.is-open .invite-card {
  transform: translateY(0) scale(1);
}

.invite-form {
  display: grid;
  gap: 14px;
}

.invite-head,
.invite-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.invite-close {
  color: var(--ink);
  background: #f4f8f6;
}

.invite-close svg {
  width: 18px;
  height: 18px;
}

.invite-head strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.invite-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.invite-fields label {
  min-width: 0;
}

.invite-card span,
.invite-fields label span {
  display: block;
  margin-bottom: 6px;
  color: #5f6d66;
  font-size: 12px;
  font-weight: 760;
}

.invite-fields input,
.invite-fields select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(23, 33, 29, 0.14);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  font-weight: 720;
}

.invite-fields input::placeholder {
  color: #9aa6a0;
}

.invite-fields select option {
  color: var(--ink);
}

.invite-card a {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--teal);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.35;
}

.invite-actions {
  display: flex;
  gap: 10px;
}

.invite-feedback {
  min-height: 18px;
  margin: -2px 0 0;
  color: #5f6d66;
  font-size: 13px;
  font-weight: 720;
}

.invite-feedback[data-tone="pending"] {
  color: #a2522f;
}

.invite-feedback[data-tone="success"] {
  color: #18744d;
}

.invite-feedback[data-tone="error"] {
  color: #9f3a2d;
}

.invite-submit {
  justify-self: start;
}

.text-action {
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  border-radius: 999px;
  padding: 0 16px;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 640;
  text-align: center;
}

.text-action:disabled,
.text-button:disabled,
.ghost-add:disabled,
.primary-button:disabled,
.family-switch:disabled,
.icon-button:disabled,
.profile-button:disabled {
  opacity: 0.48;
  transform: none;
}

.invite-state {
  margin: 0 0 0 auto;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  font-weight: 700;
}

.onboarding-empty {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
  align-items: start;
  gap: 18px;
  margin-top: 14px;
  padding: 20px;
  border: 1px solid rgba(17, 41, 35, 0.1);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(246, 248, 247, 0.98)),
    radial-gradient(circle at 100% 0%, rgba(217, 110, 63, 0.12), transparent 34%);
  box-shadow: 0 16px 44px rgba(5, 28, 25, 0.12);
}

.onboarding-empty[hidden] {
  display: none;
}

.onboarding-empty > div {
  min-width: 0;
}

.onboarding-empty span {
  display: block;
  margin-bottom: 6px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 860;
  text-transform: uppercase;
}

.onboarding-empty h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.onboarding-empty p {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  font-weight: 620;
}

.onboarding-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 1 / -1;
}

.launch-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.launch-step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.launch-step > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0;
  border-radius: 50%;
  color: #6f7672;
  background: #eef1ef;
  font-size: 12px;
  font-weight: 820;
}

.launch-step[data-state="done"] > span {
  color: #fff;
  background: #2f7d5c;
}

.launch-step[data-state="active"] {
  border-color: rgba(217, 110, 63, 0.3);
  background: #fff8f4;
}

.launch-step[data-state="active"] > span {
  color: #fff;
  background: var(--orange);
}

.launch-step strong,
.launch-step em {
  display: block;
  min-width: 0;
}

.launch-step strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 760;
}

.launch-step em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-style: normal;
  font-weight: 560;
}

.launch-examples {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 14px;
  background: #f8faf9;
}

.launch-examples span {
  margin: 0;
  color: var(--muted);
}

.launch-examples code {
  display: block;
  min-width: 0;
  width: 100%;
  padding: 9px 10px;
  border-radius: 11px;
  color: #29322e;
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
  white-space: normal;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 18px;
  margin-top: 18px;
}

.panel {
  min-width: 0;
  padding: 22px;
}

.dashboard-grid > .panel[data-section] {
  display: none;
}

.dashboard-grid > .panel[data-section].is-visible {
  display: block;
}

.dashboard-grid > .family-panel.is-visible,
.dashboard-grid > .bot-sync-panel.is-visible,
.dashboard-grid > .bot-card.is-visible {
  display: grid;
}

.day-list,
.finance-panel {
  grid-column: span 8;
}

.bot-sync-panel,
.nutrition-panel {
  grid-column: span 4;
}

body[data-view="day"] .day-list {
  grid-column: 1 / -1;
}

body[data-view="family"] .family-panel,
body[data-view="tasks"] .bot-sync-panel,
body[data-view="finance"] .finance-panel,
body[data-view="finance"] .projects-panel,
body[data-view="finance"] .week-panel,
body[data-view="more"] .bot-card,
body[data-view="more"] .billing-panel,
body[data-view="more"] .nutrition-panel,
body[data-view="more"] .week-panel {
  grid-column: 1 / -1;
}

body:not([data-view="day"]) .today-card,
body:not([data-view="day"]) .next-step-card {
  display: none;
}

body:not([data-view="day"]) .dashboard-grid {
  margin-top: 10px;
}

.panel-heading {
  align-items: center;
  margin-bottom: 18px;
}

.panel-heading > div {
  min-width: 0;
}

.panel-subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0 12px;
}

.panel-heading h2,
.panel-subheading h3 {
  margin-bottom: 0;
}

.panel-eyebrow {
  color: var(--muted);
}

.panel-heading h2 {
  font-size: 22px;
}

.panel-subheading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.1;
  font-weight: 680;
  letter-spacing: -0.015em;
}

.surface-empty-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfa;
}

.surface-empty-note span {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.panel-caption {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 720;
  text-align: right;
}

.text-button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 8px;
  color: #677770;
  background: transparent;
  font-size: 13px;
  font-weight: 620;
  white-space: nowrap;
}

.day-list { min-height: 220px; }

.task-list,
.compact-list {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.task-board-head {
  display: grid;
  gap: 12px;
}

.task-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.task-stats article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-soft);
}

.task-stats strong,
.task-stats span {
  display: block;
}

.task-stats strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.task-stats span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.task-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 1px;
}

.task-filter {
  flex: 0 0 auto;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: #60716b;
  background: #fff;
  font-size: 12px;
  font-weight: 640;
}

.task-filter.active {
  color: #fff;
  border-color: var(--teal);
  background: var(--teal);
}

.project-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.project-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(7, 47, 42, 0.08);
}

.project-card.active {
  border-color: rgba(15, 111, 95, 0.42);
  background: linear-gradient(180deg, #fff, #edf7f1);
}

.project-card.over-budget {
  border-color: rgba(217, 110, 63, 0.42);
  background: linear-gradient(180deg, #fff, #fff4ee);
}

.project-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.project-card-head strong,
.project-card-head span,
.project-card-head em {
  display: block;
  min-width: 0;
}

.project-card-head strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.08;
  font-weight: 780;
}

.project-card-head span,
.project-card-head em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.project-card-head em {
  margin-top: 0;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--mint);
  color: var(--teal);
  font-style: normal;
  white-space: nowrap;
}

.project-metrics {
  display: grid;
  gap: 8px;
}

.project-budget-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-budget-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.project-budget-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-metrics span {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.project-metrics strong {
  color: var(--ink);
  font-weight: 780;
}

.project-next-task {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eeeb;
}

.project-progress i {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--orange));
}

.project-progress.is-over i {
  background: var(--orange);
}

.project-budget-state {
  min-height: 34px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 720;
}

.project-card.over-budget .project-budget-state {
  color: #9b4c2f;
}

.project-open {
  justify-self: start;
  min-height: 36px;
}

.monthly-finance {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.monthly-finance-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.monthly-finance-head span,
.monthly-finance-grid span,
.monthly-categories span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
}

.monthly-finance-head strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.monthly-finance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.monthly-finance-grid article {
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: var(--paper-soft);
}

.monthly-finance-grid span,
.monthly-finance-grid strong {
  display: block;
}

.monthly-finance-grid strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.1;
  font-weight: 790;
}

.monthly-categories {
  display: grid;
  gap: 8px;
}

.monthly-categories span {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 34px;
  align-items: center;
  overflow: hidden;
  border-radius: 12px;
  padding: 0 10px;
  background: var(--paper-soft);
}

.monthly-categories span i {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  min-width: 6px;
  border-radius: inherit;
  background: rgba(58, 169, 120, 0.18);
}

.monthly-categories strong,
.monthly-categories em {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.monthly-categories strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-categories em {
  color: var(--ink);
  font-style: normal;
  font-weight: 790;
  white-space: nowrap;
}

.monthly-categories .monthly-empty {
  display: block;
  min-height: 0;
  padding: 8px 0;
  background: transparent;
}

.payment-calendar {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f5fbf8 100%);
}

.payment-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payment-calendar-head div {
  min-width: 0;
}

.payment-calendar-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 740;
}

.payment-calendar-head strong {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-calendar-head em {
  display: inline-flex;
  min-width: 30px;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(10, 118, 101, 0.1);
  color: var(--accent-deep);
  font-style: normal;
  font-weight: 820;
}

.payment-calendar-list {
  display: grid;
  gap: 8px;
}

.payment-row,
.payment-empty {
  width: 100%;
  border: 1px solid rgba(15, 36, 33, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.payment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
}

.payment-row strong,
.payment-row em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-row strong {
  font-size: 14px;
  font-weight: 790;
}

.payment-row em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
}

.payment-row b {
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.payment-empty {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.task-row,
.compact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid rgba(20, 36, 32, 0.08);
}

.task-row:last-child,
.compact-item:last-child {
  border-bottom: 0;
}

.task-row[data-edit-type],
.compact-item[data-edit-type] {
  cursor: pointer;
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.task-row[data-edit-type]:hover,
.compact-item[data-edit-type]:hover {
  background: #f8fbfa;
  box-shadow: inset 0 0 0 1px rgba(37, 184, 125, 0.18);
}

.task-row::before {
  content: "";
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 2px solid #bac6c0;
  border-radius: 50%;
}

.task-row > div {
  flex: 1;
  min-width: 0;
}

.task-card {
  align-items: flex-start;
}

.reminder-card {
  align-items: flex-start;
}

.task-card[data-status="open"]::before,
.reminder-card[data-status="scheduled"]::before {
  border-color: var(--green);
  background: radial-gradient(circle, var(--green) 0 45%, transparent 48%);
}

.task-card.is-done::before,
.reminder-card.is-done::before {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}

.task-card.is-cancelled::before,
.reminder-card.is-cancelled::before {
  border-color: #d7c8be;
  background: #fff;
}

.task-card.is-done strong {
  color: #6b7a74;
  text-decoration: line-through;
}

.task-card.is-cancelled {
  opacity: 0.66;
}

.reminder-card.is-done strong {
  color: #6b7a74;
  text-decoration: line-through;
}

.reminder-card.is-cancelled {
  opacity: 0.66;
}

.task-row strong,
.compact-item strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.22;
  font-weight: 650;
}

.task-row em {
  flex: 0 0 auto;
  color: var(--teal);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.task-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
}

.task-actions button {
  min-height: 36px;
  border: 1px solid rgba(11, 125, 103, 0.12);
  border-radius: 999px;
  padding: 0 10px;
  color: var(--teal);
  background: #f5fbf8;
  font-size: 12px;
  font-weight: 680;
}

.task-actions button[data-task-action="cancel"] {
  color: #8a4a2f;
  border-color: rgba(138, 74, 47, 0.14);
  background: #fff8f4;
}

.task-actions button[data-reminder-action="cancel"] {
  color: #8a4a2f;
  border-color: rgba(138, 74, 47, 0.14);
  background: #fff8f4;
}

.task-actions button:disabled {
  opacity: 0.5;
  cursor: default;
}

.task-row.is-readonly {
  cursor: default;
}

.readonly-label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  align-items: end;
  padding: 18px;
  background: rgba(1, 16, 17, 0.48);
  opacity: 0;
  transition: opacity 180ms ease;
}

.sheet-backdrop.is-open {
  opacity: 1;
}

.sheet-backdrop[hidden] {
  display: none;
}

.task-editor {
  width: min(100%, 520px);
  max-height: calc(100dvh - 36px);
  overflow: auto;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid rgba(20, 36, 32, 0.1);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  transform: translateY(18px);
  transition: transform 180ms ease;
}

.sheet-backdrop.is-open .task-editor {
  transform: translateY(0);
}

.task-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.task-editor-head span,
.task-editor label span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.task-editor-head h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.04em;
}

.task-editor-close {
  flex: 0 0 auto;
  color: var(--ink);
  background: var(--paper-soft);
}

.task-editor-close svg {
  width: 18px;
  height: 18px;
}

.task-editor label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.task-editor input,
.task-editor select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--paper-soft);
  font: inherit;
  font-size: 15px;
  font-weight: 720;
}

.task-editor-feedback {
  min-height: 20px;
  margin: 2px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
}

.task-editor-feedback:empty {
  margin-bottom: 4px;
}

.task-editor-feedback[data-tone="pending"] {
  color: #8a6a2f;
}

.task-editor-feedback[data-tone="success"] {
  color: var(--teal);
}

.task-editor-feedback[data-tone="error"] {
  color: #a44534;
}

.task-editor-save {
  width: 100%;
  margin-top: 4px;
}

.task-editor-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.task-editor-actions .text-button,
.task-editor-actions .task-editor-save {
  width: 100%;
  min-height: 46px;
  margin-top: 0;
}

.nutrition-editor {
  width: min(100%, 540px);
}

.nutrition-macro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 2px;
}

.nutrition-macro-grid label {
  min-width: 0;
}

.workspace-switcher {
  width: min(100%, 480px);
}

.workspace-list {
  display: grid;
  gap: 8px;
}

.workspace-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px;
  color: var(--ink);
  background: var(--paper-soft);
  text-align: left;
}

.workspace-choice.active {
  border-color: rgba(15, 111, 95, 0.32);
  background: #e8f3ed;
}

.workspace-choice strong,
.workspace-choice span,
.workspace-choice em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-choice strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 840;
}

.workspace-choice span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.workspace-choice em {
  color: var(--teal);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 2px 0 12px;
}

.detail-meta:empty {
  display: none;
}

.detail-meta-item {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper-soft);
}

.detail-meta-item span,
.detail-meta-item strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-meta-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.detail-meta-item strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 760;
}

.detail-meta-item[data-tone="pending"] strong {
  color: #8a6a2f;
}

.detail-meta-item[data-tone="success"] strong {
  color: var(--teal);
}

.detail-meta-item[data-tone="error"] strong {
  color: #a44534;
}

.detail-meta-item[data-tone="muted"] strong {
  color: var(--muted);
}

.empty-state {
  min-height: 84px;
  padding: 18px;
  color: var(--muted);
  background: #fff;
  font-weight: 560;
}

.empty-state-action {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 0;
  text-align: left;
}

.empty-state-action strong {
  color: var(--teal);
  font-size: 13px;
  font-weight: 820;
}

.empty-state-action:hover {
  background: #f8fbfa;
}

.ghost-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #6d7b76;
  background: transparent;
  font-size: 14px;
  font-weight: 680;
}

.ghost-add::before {
  content: "+";
  color: #87948f;
  font-size: 20px;
  line-height: 1;
}

.family-list {
  min-height: 220px;
}

.family-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.family-summary {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid rgba(11, 125, 103, 0.12);
  border-radius: 16px;
  background: linear-gradient(135deg, #f7fbf8, #eef7f1);
}

.family-summary span,
.family-summary strong,
.family-summary p {
  margin: 0;
}

.family-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.family-summary strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.family-summary p {
  color: #5f6d66;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.family-members {
  display: grid;
  gap: 10px;
}

.family-metrics,
.finance-kpis,
.nutrition-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.nutrition-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.family-metrics article,
.finance-kpis article,
.nutrition-kpis article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfa;
}

.family-metrics strong,
.family-metrics span,
.finance-kpis strong,
.finance-kpis span,
.nutrition-kpis strong,
.nutrition-kpis span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-metrics strong,
.finance-kpis strong,
.nutrition-kpis strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.family-metrics span,
.finance-kpis span,
.nutrition-kpis span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
}

.family-member-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: left;
}

button.family-member-card:not(:disabled):hover {
  border-color: rgba(15, 111, 95, 0.22);
  background: #f8fbfa;
}

.family-member-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  font-size: 15px;
  font-weight: 860;
}

.family-member-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.family-member-card strong,
.family-member-card span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-member-card strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 820;
}

.family-member-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.member-editor {
  width: min(100%, 560px);
}

.member-identity {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbfa;
}

.member-identity strong,
.member-identity span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-identity strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 840;
}

.member-identity span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.member-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 10px;
}

.member-history,
.member-danger {
  display: grid;
  gap: 10px;
  margin: 4px 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbfa;
}

.member-history-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.member-history-head span,
.member-history-head strong,
.member-danger strong,
.member-danger span {
  display: block;
  min-width: 0;
}

.member-history-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  text-transform: uppercase;
}

.member-history-head strong,
.member-danger strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 840;
}

.member-danger {
  border-color: rgba(164, 69, 52, 0.18);
  background: #fff8f4;
}

.member-danger span {
  margin-top: 4px;
  color: #8a4a2f;
  font-size: 12px;
  font-weight: 680;
}

.confirm-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  margin: 0 !important;
}

.confirm-row input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  flex: 0 0 18px;
  padding: 0;
}

.danger-button {
  justify-self: start;
  color: #9f3a2d;
  background: #ffe9e4;
}

.bot-sync-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.bot-sync-panel .panel-heading {
  margin-bottom: 2px;
}

.bot-review-block {
  display: grid;
  gap: 12px;
  margin-top: 2px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbfa, #f3f7f6);
}

.bot-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.bot-review-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.15;
  font-weight: 760;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.command-examples {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
}

.command-examples span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.command-examples code {
  min-width: 0;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--ink);
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 720;
  white-space: nowrap;
}

.status-strip article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfa;
}

.status-strip strong,
.status-strip span {
  display: block;
}

.status-strip strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.status-strip span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
}

.ai-decision {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #092d2a, #0d5f50);
}

.ai-decision span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.ai-decision strong {
  color: #fff;
  font-size: 15px;
  line-height: 1.25;
  font-weight: 650;
}

.inbox-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.inbox-item div {
  min-width: 0;
}

.inbox-item strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-item em {
  color: #bdf4dc;
  font-size: 11px;
  font-style: normal;
  font-weight: 860;
  white-space: nowrap;
}

.inbox-item.needs-attention em {
  color: #ffc39f;
}

.sync-task-list {
  border-radius: 14px;
}

.home-task-list {
  border-radius: 14px;
}

.sync-task-list .task-row {
  min-height: 58px;
  padding: 10px 12px;
}

.home-task-list .task-row {
  min-height: 58px;
  padding: 10px 12px;
}

.sync-task-list .task-row strong,
.home-task-list .task-row strong {
  font-size: 13px;
}

.sync-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.settings-list {
  display: grid;
  gap: 8px;
}

.settings-list article {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-soft);
}

.settings-list strong,
.settings-list span {
  display: block;
  min-width: 0;
}

.settings-list strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
}

.settings-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 650;
}

.sync-status article {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper-soft);
}

.sync-status strong,
.sync-status span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sync-status strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 650;
}

.sync-status span {
  margin-top: 3px;
  font-size: 10px;
}

.finance-panel,
.nutrition-panel {
  min-height: 356px;
}

.projects-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.project-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.project-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.project-card.active {
  border-color: rgba(15, 111, 95, 0.28);
  background: #f3faf7;
}

.project-card.over-budget {
  border-color: rgba(217, 110, 63, 0.42);
  background: #fff4ee;
}

.project-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.project-card-head strong,
.project-card-head span,
.project-card-head em,
.project-metrics span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-head strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.15;
  font-weight: 840;
}

.project-card-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.project-card-head em {
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--teal);
  background: var(--mint);
  font-size: 11px;
  font-style: normal;
  font-weight: 820;
}

.project-metrics {
  display: grid;
  gap: 6px;
}

.project-budget-summary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-budget-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.project-budget-summary strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.project-metrics strong {
  color: var(--ink);
  font-weight: 860;
}

.project-next-task {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef3f0;
}

.project-progress i {
  display: block;
  height: 100%;
  max-width: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.project-progress.is-over i {
  background: var(--orange);
}

.project-budget-state {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 720;
}

.project-card.over-budget .project-budget-state,
.project-card.over-budget .project-card-head span {
  color: #9b4c2f;
}

.project-open {
  justify-self: start;
}

.finance-kpis {
  margin-bottom: 18px;
}

.monthly-finance {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbfa;
}

.monthly-finance-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.monthly-finance-head span,
.monthly-finance-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.monthly-finance-head strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-finance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.monthly-finance-grid article {
  min-width: 0;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
}

.monthly-finance-grid strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  margin-top: 5px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.15;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-categories {
  display: grid;
  gap: 8px;
}

.monthly-categories span {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  padding: 9px 10px;
  border-radius: 12px;
  background: #fff;
}

.monthly-categories i {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  border-radius: inherit;
  background: rgba(15, 111, 95, 0.09);
}

.monthly-categories strong,
.monthly-categories em {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-categories em {
  color: var(--muted);
}

.monthly-categories .monthly-empty {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.balance-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  margin-bottom: 22px;
}

.balance-line span {
  grid-column: 1 / -1;
}

.balance-line strong {
  color: #102520;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.045em;
}

.balance-line em {
  align-self: end;
  color: #2eaf6f;
  font-size: 14px;
  font-style: normal;
  font-weight: 800;
}

.budget-meter {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.budget-meter > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.budget-meter strong {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.budget-meter p {
  position: relative;
  height: 10px;
  margin: 0;
  color: transparent;
  border-radius: 999px;
  background: #e8ece9;
  overflow: hidden;
}

.budget-meter p::before {
  content: "";
  position: absolute;
  inset: 0 38% 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #42b883, #69c99e);
}

.compact-list {
  border: 0;
  border-radius: 0;
  gap: 10px;
}

.compact-item {
  min-height: 38px;
  padding: 0;
  border: 0;
}

.compact-item span {
  position: relative;
  padding-left: 18px;
}

.compact-item span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #66a6ff;
}

.compact-item:nth-child(2) span::before {
  background: #8ec753;
}

.compact-item:nth-child(3) span::before {
  background: #ffbd52;
}

.compact-item:nth-child(4) span::before {
  background: #9aa3ad;
}

.meal-today {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  margin-bottom: 12px;
}

.meal-today span {
  grid-column: 1 / -1;
}

.meal-today strong {
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -0.03em;
}

.meal-today em {
  align-self: center;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
  font-weight: 700;
}

.meal-list {
  border: 1px solid var(--line);
  border-radius: 16px;
  gap: 0;
}

.meal-list .compact-item {
  min-height: 62px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(20, 36, 32, 0.08);
}

.meal-list .compact-item:last-child {
  border-bottom: 0;
}

.meal-list .compact-item::before {
  display: none;
}

.meal-list .compact-item span {
  flex: 1;
  padding-left: 0;
  color: var(--ink);
  font-weight: 730;
}

.meal-list .compact-item strong {
  max-width: 112px;
  color: #566760;
  text-align: right;
  font-size: 13px;
  line-height: 1.25;
}

.meal-list .compact-item span::before {
  display: none;
}

.week-panel {
  grid-column: 1 / -1;
}

.week-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.week-stats > div {
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.week-stats strong {
  display: block;
  margin: 12px 0 18px;
  color: var(--ink);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.bars,
.line {
  display: block;
  height: 46px;
  border-radius: 8px;
}

.bars {
  background:
    linear-gradient(to top, rgba(66, 184, 131, 0.28) 0 28%, transparent 28% 100%) 0 100% / 14% 100%,
    linear-gradient(to top, rgba(66, 184, 131, 0.55) 0 52%, transparent 52% 100%) 18% 100% / 14% 100%,
    linear-gradient(to top, rgba(66, 184, 131, 0.34) 0 72%, transparent 72% 100%) 36% 100% / 14% 100%,
    linear-gradient(to top, rgba(66, 184, 131, 0.72) 0 44%, transparent 44% 100%) 54% 100% / 14% 100%,
    linear-gradient(to top, rgba(66, 184, 131, 0.42) 0 66%, transparent 66% 100%) 72% 100% / 14% 100%,
    linear-gradient(to top, rgba(66, 184, 131, 0.22) 0 38%, transparent 38% 100%) 90% 100% / 14% 100%;
  background-repeat: no-repeat;
}

.bars.dense {
  filter: hue-rotate(36deg);
}

.line {
  background:
    radial-gradient(circle at 8% 68%, #47b47d 0 3px, transparent 4px),
    radial-gradient(circle at 24% 48%, #47b47d 0 3px, transparent 4px),
    radial-gradient(circle at 42% 55%, #47b47d 0 3px, transparent 4px),
    radial-gradient(circle at 58% 28%, #47b47d 0 3px, transparent 4px),
    radial-gradient(circle at 76% 46%, #47b47d 0 3px, transparent 4px),
    radial-gradient(circle at 92% 24%, #47b47d 0 3px, transparent 4px),
    linear-gradient(145deg, transparent 0 10%, #47b47d 10% 12%, transparent 12% 25%, #47b47d 25% 27%, transparent 27% 42%, #47b47d 42% 44%, transparent 44% 58%, #47b47d 58% 60%, transparent 60% 76%, #47b47d 76% 78%, transparent 78%);
}

.app-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.app-footer span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.app-footer svg {
  width: 24px;
  height: 24px;
}

.app-footer p {
  color: rgba(255, 255, 255, 0.76);
}

.app-footer strong {
  color: #fff;
}

.section-rail {
  display: none;
}

.brand:hover,
.family-switch:not(:disabled):hover,
.icon-button:not(:disabled):hover,
.profile-button:not(:disabled):hover,
.text-action:not(:disabled):hover,
.primary-button:not(:disabled):hover,
.text-button:not(:disabled):hover,
.ghost-add:not(:disabled):hover,
.nav-item:not(:disabled):hover {
  transform: translateY(-1px);
}

.primary-button:not(:disabled):hover {
  background: #f26324;
}

.text-action:not(:disabled):hover,
.icon-button:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(180deg, rgba(3, 27, 29, 0.98) 0 206px, #f4fbf7 206px 100%);
  }

  body::before {
    display: none;
  }

  .app-shell {
    width: 100%;
    min-height: 100svh;
    padding: 16px 14px calc(104px + env(safe-area-inset-bottom));
  }

  .topbar {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    margin-bottom: 14px;
  }

  .brand {
    min-height: 40px;
    font-size: 25px;
  }

  .family-switch {
    height: 34px;
    padding-inline: 6px;
    font-size: 13px;
  }

  .icon-button {
    width: 32px;
    height: 32px;
    background: transparent;
  }

  .profile-button {
    display: none;
  }

  .today-card {
    min-height: 154px;
    border-radius: 18px;
  }

  .today-content {
    padding: 20px 18px 16px;
  }

  .today-content h1 {
    margin-bottom: 8px;
    font-size: 29px;
  }

  .today-content p {
    display: none;
  }

  .today-metrics {
    gap: 16px;
  }

  .today-metrics strong {
    font-size: 25px;
  }

  .today-metrics span,
  .today-footer {
    font-size: 11px;
  }

  .today-footer {
    justify-content: space-between;
    margin-top: 14px;
  }

  .next-step-card {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
  }

  .attention-card {
    margin-top: 12px;
    padding: 12px;
    border-radius: 16px;
  }

  .attention-head {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .attention-head .text-button {
    justify-self: start;
    min-height: 44px;
    padding: 0 14px;
  }

  .attention-item {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    min-height: 0;
  }

  .attention-item em {
    max-width: 100%;
  }

  .onboarding-empty {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
    padding: 14px;
    border-radius: 16px;
  }

  .onboarding-empty h2 {
    font-size: 18px;
  }

  .onboarding-empty p {
    font-size: 13px;
  }

  .onboarding-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    grid-column: auto;
  }

  .launch-steps,
  .launch-examples {
    grid-column: auto;
  }

  .launch-step {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 9px;
    padding: 9px;
  }

  .launch-step > span {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .launch-step strong {
    font-size: 12px;
  }

  .launch-step em,
  .launch-examples code {
    font-size: 11px;
  }

  .next-step-card span {
    margin-bottom: 4px;
    font-size: 10px;
  }

  .next-step-card strong {
    font-size: 16px;
  }

  .next-step-card p {
    display: none;
  }

  .next-step-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .compact-primary,
  .next-step-secondary {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    padding: 0 10px;
    font-size: 13px;
  }

  .bot-card,
  .family-setup-card,
  .panel {
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(13, 52, 45, 0.08);
  }

  .bot-card {
    display: none;
  }

  .family-setup-card {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 14px;
    padding: 18px;
  }

  .family-setup-card h2 {
    font-size: 28px;
  }

  .family-setup-form {
    padding: 14px;
  }

  .card-heading {
    display: grid;
  }

  .instruction-actions {
    justify-content: flex-start;
  }

  .invite-card {
    width: 100%;
    max-height: calc(100dvh - 48px);
    gap: 12px;
    padding: 16px;
    border-radius: 22px 22px 0 0;
  }

  .invite-head,
  .invite-result {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .invite-fields {
    grid-template-columns: 1fr;
  }

  .invite-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .invite-close {
    width: 40px;
    height: 40px;
    justify-self: end;
  }

  .invite-submit {
    width: 100%;
  }

  .card-heading h2 {
    font-size: 19px;
  }

  .primary-button {
    height: 46px;
    min-height: 46px;
    border-radius: 16px;
  }

  .primary-button {
    flex: 0 0 132px;
    padding: 0 12px;
    font-size: 14px;
  }

  .toolbar-row {
    display: none;
  }

  .toolbar-row::-webkit-scrollbar {
    display: none;
  }

  .toolbar-row .text-action {
    flex: 0 0 auto;
    min-width: 0;
    padding-inline: 10px;
    color: #0b302a;
    background: rgba(255, 255, 255, 0.92);
    font-size: 13px;
    line-height: 1.1;
    box-shadow: 0 8px 20px rgba(7, 47, 42, 0.08);
  }

  .invite-state {
    flex: 0 0 auto;
    margin-left: 2px;
    color: #71817b;
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 14px;
  }

  .day-list,
  .finance-panel,
  .projects-panel,
  .bot-sync-panel,
  .nutrition-panel,
  .week-panel {
    grid-column: auto;
  }

  .project-list {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 17px;
  }

  .surface-empty-note {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .surface-empty-note .text-button {
    display: none;
  }

  .task-editor {
    max-height: calc(100dvh - 28px);
    padding: 18px;
  }

  .detail-meta {
    grid-template-columns: 1fr;
  }

  .member-fields {
    grid-template-columns: 1fr;
  }

  .member-history-head {
    grid-template-columns: 1fr;
  }

  .member-history-head .text-button {
    justify-self: start;
  }

  .detail-meta-item {
    padding: 9px 10px;
  }

  .panel-heading h2 {
    font-size: 18px;
  }

  .status-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .status-strip article {
    padding: 10px;
  }

  .status-strip strong {
    font-size: 19px;
  }

  .status-strip span {
    font-size: 10px;
  }

  .sync-status {
    grid-template-columns: 1fr;
  }

  .project-list {
    grid-template-columns: 1fr;
  }

  .project-card {
    padding: 14px;
    border-radius: 14px;
  }

  .monthly-finance {
    padding: 12px;
    border-radius: 14px;
  }

  .monthly-finance-grid {
    grid-template-columns: 1fr;
  }

  .payment-calendar {
    padding: 12px;
    border-radius: 14px;
  }

  .payment-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .payment-row b {
    justify-self: start;
  }

  .balance-line strong {
    font-size: 26px;
  }

  .week-stats {
    grid-template-columns: 1fr;
  }

  .app-footer {
    display: none;
  }

  .section-rail {
    position: static;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    min-height: 62px;
    margin: 14px auto 0;
    max-width: 520px;
    padding: 6px;
    border: 1px solid rgba(20, 36, 32, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 20px 60px rgba(7, 47, 42, 0.18);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
  }

  body.sheet-open .section-rail {
    display: none;
  }

  .nav-item {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 50px;
    border-radius: 14px;
    color: #73817b;
    background: transparent;
    font-size: 12px;
    font-weight: 620;
  }

  .nav-item svg {
    width: 20px;
    height: 20px;
  }

  .nav-item.active {
    color: #071d18;
  }
}

@media (max-width: 390px) {
  .app-shell {
    padding-inline: 10px;
  }

  .today-metrics {
    gap: 10px;
  }

  .today-metrics strong {
    font-size: 24px;
  }

  .status-strip {
    grid-template-columns: 1fr;
  }

  .task-row,
  .compact-item {
    padding-inline: 12px;
  }

  .task-card,
  .reminder-card {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    column-gap: 10px;
    row-gap: 10px;
  }

  .task-card::before,
  .reminder-card::before {
    grid-column: 1;
    grid-row: 1;
    margin-top: 1px;
  }

  .task-card > div:first-of-type,
  .reminder-card > div:first-of-type {
    grid-column: 2;
    min-width: 0;
  }

  .task-card .task-actions,
  .reminder-card .task-actions {
    grid-column: 2;
    justify-content: flex-start;
    width: 100%;
  }

  .task-actions button {
    flex: 1 1 104px;
  }

  .ghost-add {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

/* 2026-07 product UI refresh: Telegram-first dashboard, not a green landing mockup. */
:root {
  color-scheme: dark;
  --page: #0b0f17;
  --page-2: #111827;
  --paper: #ffffff;
  --paper-soft: #f4f6fa;
  --mint: #edf3ff;
  --ink: #101623;
  --muted: #667085;
  --line: rgba(16, 24, 40, 0.1);
  --teal: #2f6fed;
  --teal-dark: #174ea6;
  --orange: #f26d3d;
  --green: #2f6fed;
  --accent-deep: #174ea6;
  --shadow: 0 30px 90px rgba(2, 6, 23, 0.34);
  --card-shadow: 0 20px 54px rgba(2, 8, 23, 0.1);
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 16% -10%, rgba(242, 109, 61, 0.18), transparent 28%),
    radial-gradient(circle at 86% 0%, rgba(47, 111, 237, 0.22), transparent 32%),
    linear-gradient(145deg, #070a10 0%, #0b0f17 48%, #121a2a 100%);
}

body::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline-color: rgba(47, 111, 237, 0.36);
}

.app-shell {
  width: min(100% - 40px, 1080px);
  padding-top: 24px;
}

.topbar {
  margin-bottom: 18px;
}

.brand {
  letter-spacing: -0.03em;
}

.family-switch {
  max-width: 360px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.icon-button,
.profile-button {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.today-card {
  min-height: 150px;
  border-color: rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(8, 13, 23, 0.96) 0%, rgba(11, 18, 32, 0.9) 56%, rgba(47, 111, 237, 0.34) 100%),
    radial-gradient(circle at 88% 26%, rgba(242, 109, 61, 0.24), transparent 28%);
  box-shadow: var(--shadow);
}

.today-card::after {
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 100%),
    linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.18) 100%);
}

.today-content {
  padding: 21px 26px 20px;
}

.today-content h1 {
  margin-bottom: 8px;
  font-size: clamp(30px, 3.2vw, 40px);
}

.today-content p {
  max-width: 560px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.today-metrics {
  width: min(100%, 580px);
  gap: 12px;
}

.today-metrics article {
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}

.today-metrics strong {
  font-size: 26px;
}

.today-eyebrow {
  color: rgba(255, 255, 255, 0.52);
}

.next-step-card {
  margin-top: 16px;
  padding: 18px 20px;
  border-color: rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(9, 14, 24, 0.78);
  box-shadow: 0 16px 44px rgba(2, 6, 23, 0.22);
}

.next-step-card span {
  color: rgba(255, 255, 255, 0.58);
}

.next-step-card p {
  color: rgba(255, 255, 255, 0.68);
}

.primary-button {
  border: 0;
  background: linear-gradient(135deg, #ff7a3d, #f25f31);
  box-shadow: 0 16px 34px rgba(242, 109, 61, 0.28);
}

.primary-button:not(:disabled):hover {
  background: linear-gradient(135deg, #ff8a50, #f26324);
}

.next-step-secondary,
.text-action {
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.07);
}

.next-step-card .next-step-secondary {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.14);
}

.next-step-card .next-step-secondary:not(:disabled):hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.toolbar-row {
  gap: 8px;
  margin-top: 14px;
}

.toolbar-row .text-action {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.attention-card,
.bot-card,
.panel,
.family-setup-card,
.onboarding-empty {
  border-color: rgba(16, 24, 40, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--card-shadow);
}

.attention-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 241, 0.98)),
    radial-gradient(circle at 100% 0%, rgba(242, 109, 61, 0.14), transparent 32%);
}

.attention-head span {
  color: #c24f2d;
}

.attention-item {
  border-color: rgba(194, 79, 45, 0.14);
}

.attention-item em {
  color: #a74327;
}

.dashboard-grid {
  gap: 16px;
  margin-top: 16px;
}

.panel {
  padding: 18px;
}

.panel-heading {
  margin-bottom: 16px;
}

.panel-heading h2,
.card-heading h2 {
  letter-spacing: -0.03em;
}

.task-list,
.compact-list,
.meal-list {
  border-color: rgba(16, 24, 40, 0.09);
  border-radius: 14px;
}

.task-row,
.compact-item {
  min-height: 58px;
  border-bottom-color: rgba(16, 24, 40, 0.08);
  background: #fff;
}

.task-card,
.reminder-card {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.task-card::before,
.reminder-card::before {
  grid-column: 1;
  margin: 0;
}

.task-card > div:first-of-type,
.reminder-card > div:first-of-type {
  grid-column: 2;
  min-width: 0;
}

.task-card .task-actions,
.reminder-card .task-actions {
  grid-column: 3;
}

.task-row strong,
.compact-item strong {
  font-weight: 760;
}

.task-row span,
.compact-item span {
  font-size: 12px;
}

.task-row[data-edit-type]:hover,
.compact-item[data-edit-type]:hover {
  background: #f7f9fc;
  box-shadow: inset 0 0 0 1px rgba(47, 111, 237, 0.16);
}

.task-row::before {
  border-color: #c8d0dc;
}

.task-card[data-status="open"]::before,
.reminder-card[data-status="scheduled"]::before {
  border-color: var(--teal);
  background: radial-gradient(circle, var(--teal) 0 45%, transparent 48%);
}

.task-card.is-done::before,
.reminder-card.is-done::before {
  border-color: var(--teal);
  background: var(--teal);
}

.task-row em,
.workspace-choice em,
.invite-card a {
  color: var(--teal);
}

.task-actions button {
  border-color: rgba(47, 111, 237, 0.15);
  color: var(--teal);
  background: #f2f6ff;
}

.task-filter {
  border-color: rgba(16, 24, 40, 0.1);
  color: #5b6678;
  background: #fff;
}

.task-filter.active {
  border-color: var(--teal);
  background: var(--teal);
}

#botStatus,
#billingPlanStatus,
.project-card-head em {
  color: var(--teal);
  background: #edf3ff;
}

#botStatus[data-status="connected"],
#billingPlanStatus[data-status="active"],
.invite-feedback[data-tone="success"],
.task-editor-feedback[data-tone="success"] {
  color: #2364d6;
  background: #eaf1ff;
}

.billing-summary,
.family-setup-card,
.family-setup-form,
.onboarding-empty,
.surface-empty-note,
.command-examples,
.task-stats article,
.status-strip article,
.sync-status article,
.settings-list article,
.family-summary,
.family-metrics article,
.finance-kpis article,
.nutrition-kpis article,
.member-identity,
.member-history,
.monthly-finance,
.payment-calendar {
  background: #f6f8fb;
}

.family-setup-card,
.onboarding-empty {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 252, 0.98)),
    radial-gradient(circle at 92% 0%, rgba(47, 111, 237, 0.1), transparent 32%);
}

.family-setup-card > div > span,
.onboarding-empty span {
  color: var(--teal);
}

.invite-card,
.task-editor {
  border-color: rgba(16, 24, 40, 0.1);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.24);
}

.invite-close,
.task-editor-close {
  background: #eef2f8;
}

.invite-fields input,
.invite-fields select,
.task-editor input,
.task-editor select,
.family-setup-form input {
  border-color: rgba(16, 24, 40, 0.12);
  background: #f7f9fc;
}

.workspace-choice {
  background: #f7f9fc;
}

.workspace-choice.active {
  border-color: rgba(47, 111, 237, 0.34);
  background: #edf3ff;
}

.family-member-avatar {
  background: linear-gradient(135deg, #2f6fed, #7c5cff);
}

button.family-member-card:not(:disabled):hover {
  border-color: rgba(47, 111, 237, 0.22);
  background: #f7f9fc;
}

.ai-decision {
  background:
    linear-gradient(135deg, #182235, #23395f),
    radial-gradient(circle at 100% 0%, rgba(47, 111, 237, 0.28), transparent 34%);
}

.inbox-item em {
  color: #a7c0ff;
}

.project-card.active {
  border-color: rgba(47, 111, 237, 0.28);
  background: #f3f6ff;
}

.project-progress i,
.budget-meter p::before {
  background: linear-gradient(90deg, #2f6fed, #7c5cff);
}

.monthly-categories i {
  background: rgba(47, 111, 237, 0.1);
}

.balance-line em {
  color: #2364d6;
}

.bars {
  background:
    linear-gradient(to top, rgba(47, 111, 237, 0.24) 0 28%, transparent 28% 100%) 0 100% / 14% 100%,
    linear-gradient(to top, rgba(47, 111, 237, 0.52) 0 52%, transparent 52% 100%) 18% 100% / 14% 100%,
    linear-gradient(to top, rgba(47, 111, 237, 0.32) 0 72%, transparent 72% 100%) 36% 100% / 14% 100%,
    linear-gradient(to top, rgba(47, 111, 237, 0.72) 0 44%, transparent 44% 100%) 54% 100% / 14% 100%,
    linear-gradient(to top, rgba(47, 111, 237, 0.38) 0 66%, transparent 66% 100%) 72% 100% / 14% 100%,
    linear-gradient(to top, rgba(47, 111, 237, 0.2) 0 38%, transparent 38% 100%) 90% 100% / 14% 100%;
  background-repeat: no-repeat;
}

.bars.dense {
  filter: none;
}

.line {
  background:
    radial-gradient(circle at 8% 68%, #2f6fed 0 3px, transparent 4px),
    radial-gradient(circle at 24% 48%, #2f6fed 0 3px, transparent 4px),
    radial-gradient(circle at 42% 55%, #2f6fed 0 3px, transparent 4px),
    radial-gradient(circle at 58% 28%, #2f6fed 0 3px, transparent 4px),
    radial-gradient(circle at 76% 46%, #2f6fed 0 3px, transparent 4px),
    radial-gradient(circle at 92% 24%, #2f6fed 0 3px, transparent 4px),
    linear-gradient(145deg, transparent 0 10%, #2f6fed 10% 12%, transparent 12% 25%, #2f6fed 25% 27%, transparent 27% 42%, #2f6fed 42% 44%, transparent 44% 58%, #2f6fed 58% 60%, transparent 60% 76%, #2f6fed 76% 78%, transparent 78%);
}

.app-footer {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.text-action:not(:disabled):hover,
.icon-button:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.13);
}

@media (min-width: 761px) {
  .section-rail {
    position: sticky;
    top: 14px;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    max-width: 720px;
    min-height: 54px;
    margin: 16px auto 0;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(12, 17, 28, 0.82);
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.22);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
  }

  .nav-item {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 42px;
    border-radius: 13px;
    color: rgba(255, 255, 255, 0.66);
    background: transparent;
    font-size: 12px;
    font-weight: 650;
  }

  .nav-item svg {
    width: 18px;
    height: 18px;
  }

  .nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
  }
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(180deg, #0b101a 0 318px, #f4f6fa 318px 100%);
  }

  .app-shell {
    padding: 12px 10px calc(96px + env(safe-area-inset-bottom));
  }

  .topbar {
    gap: 10px;
    margin-bottom: 10px;
  }

  .brand {
    min-height: 36px;
    font-size: 30px;
  }

  .family-switch {
    min-height: 36px;
    height: 36px;
    max-width: 210px;
    padding: 0 12px;
    border-radius: 13px;
    font-size: 15px;
  }

  .icon-button {
    width: 36px;
    height: 36px;
  }

  .today-card {
    min-height: 126px;
    border-radius: 17px;
  }

  .today-content {
    padding: 15px 15px 13px;
  }

  .today-content h1 {
    margin-bottom: 12px;
    font-size: 32px;
    line-height: 0.96;
  }

  .today-eyebrow {
    margin-bottom: 6px;
    font-size: 10px;
  }

  .today-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .today-metrics article {
    padding: 0;
    border: 0;
    background: transparent;
  }

  .today-metrics strong {
    margin-bottom: 5px;
    font-size: 25px;
  }

  .today-metrics span {
    font-size: 11px;
    line-height: 1.25;
  }

  .today-footer {
    margin-top: 12px;
    font-size: 11px;
  }

  .next-step-card {
    gap: 12px;
    margin-top: 12px;
    padding: 14px;
    border-radius: 16px;
  }

  .next-step-card strong {
    font-size: 19px;
  }

  .next-step-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  }

  .compact-primary,
  .next-step-secondary {
    min-height: 42px;
    font-size: 14px;
  }

  .attention-card {
    padding: 14px;
  }

  .attention-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .attention-head strong {
    font-size: 21px;
  }

  .attention-head .text-button {
    min-height: 36px;
    padding: 0 8px;
  }

  .attention-item {
    padding: 12px;
  }

  .attention-item strong {
    font-size: 15px;
  }

  .attention-card,
  .bot-card,
  .family-setup-card,
  .panel {
    padding: 16px;
    box-shadow: 0 14px 34px rgba(2, 8, 23, 0.08);
  }

  .panel-heading {
    gap: 10px;
    margin-bottom: 14px;
  }

  .panel-heading h2 {
    font-size: 22px;
  }

  .panel-caption {
    max-width: 118px;
    font-size: 11px;
  }

  .command-examples {
    display: grid;
    gap: 7px;
  }

  .command-examples code {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .settings-list article {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .section-rail {
    position: static;
    z-index: 20;
    max-width: 520px;
    margin: 14px auto 0;
    border-color: rgba(16, 24, 40, 0.1);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 54px rgba(2, 8, 23, 0.18);
  }

  .nav-item {
    color: #667085;
  }

  .nav-item.active {
    color: #174ea6;
    background: #edf3ff;
  }

  .task-card,
  .reminder-card {
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    row-gap: 10px;
  }

  .task-card .task-actions,
  .reminder-card .task-actions {
    grid-column: 2;
    width: 100%;
    justify-content: flex-start;
  }

  .task-actions button {
    flex: 1 1 104px;
  }
}
