:root {
  --bg: #f4efe6;
  --surface: rgba(255, 250, 243, 0.82);
  --surface-strong: #fffaf4;
  --surface-dark: #21313b;
  --ink: #1f2a33;
  --muted: #65707a;
  --line: rgba(31, 42, 51, 0.1);
  --line-strong: rgba(31, 42, 51, 0.18);
  --accent: #dd6f42;
  --accent-deep: #b8512a;
  --blue: #3f6f8f;
  --green: #2f735c;
  --gold: #c59035;
  --shadow: 0 22px 54px rgba(73, 58, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(221, 111, 66, 0.16), transparent 30%),
    radial-gradient(circle at 100% 10%, rgba(63, 111, 143, 0.12), transparent 24%),
    linear-gradient(180deg, #f8f3eb 0%, #f2ede4 100%);
}

button {
  font: inherit;
}

input,
select {
  font: inherit;
}

.ambient {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(20px);
  opacity: 0.6;
  pointer-events: none;
}

.ambient-one {
  top: 100px;
  right: 8%;
  width: 240px;
  height: 240px;
  background: rgba(221, 111, 66, 0.1);
}

.ambient-two {
  bottom: 80px;
  left: 6%;
  width: 280px;
  height: 280px;
  background: rgba(63, 111, 143, 0.1);
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}

.sidebar,
.topbar,
.hero-band,
.panel {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  border-radius: 32px;
  min-height: calc(100vh - 48px);
  position: sticky;
  top: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--accent), #efb26d);
  color: #fff;
  font-weight: 800;
}

.brand p,
.panel-head p,
.sidebar-label,
.eyebrow {
  margin: 0;
  color: var(--muted);
}

.brand span {
  font-size: 0.82rem;
  color: var(--muted);
}

.primary-action,
.topbar-meta button,
.filter-chip.active,
.assistant-steps span {
  border: none;
  border-radius: 999px;
}

.primary-action,
.topbar-meta button,
.secondary-action,
.ghost-action,
.danger-action {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 800;
  transition: transform 180ms ease, background-color 180ms ease;
}

.primary-action,
.topbar-meta button,
.secondary-action {
  background: var(--ink);
  color: #fff;
}

.ghost-action {
  background: rgba(255, 250, 243, 0.72);
  color: var(--ink);
  border: 1px solid var(--line);
}

.danger-action {
  background: #8f3d29;
  color: #fff7f3;
  border: 1px solid rgba(143, 61, 41, 0.2);
}

.primary-action:hover,
.topbar-meta button:hover,
.secondary-action:hover,
.ghost-action:hover,
.danger-action:hover,
.record-item:hover {
  transform: translateY(-2px);
}

.primary-action:disabled,
.topbar-meta button:disabled,
.secondary-action:disabled,
.ghost-action:disabled,
.danger-action:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.nav-stack {
  display: grid;
  gap: 10px;
}

.nav-item,
.filter-chip {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: rgba(255, 250, 243, 0.7);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.nav-item {
  padding: 14px;
  border-radius: 20px;
}

.nav-item strong,
.record-copy strong,
.stat-card strong,
.timeline-card strong,
.detail-meta strong {
  display: block;
}

.nav-item span {
  font-size: 0.86rem;
  color: var(--muted);
}

.nav-item.active {
  border-color: rgba(221, 111, 66, 0.35);
  background: linear-gradient(180deg, rgba(255, 248, 241, 0.96), rgba(255, 239, 226, 0.94));
}

.sidebar-card {
  margin-top: auto;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(33, 49, 59, 0.95), rgba(33, 49, 59, 0.88));
  color: #f4efe6;
}

.sidebar-card h2 {
  margin: 10px 0 14px;
  font-size: 1.35rem;
}

.sidebar-card ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(244, 239, 230, 0.8);
  line-height: 1.7;
}

.workload-card {
  margin-top: 0;
  display: grid;
  gap: 12px;
}

.workload-list {
  display: grid;
  gap: 10px;
}

.workload-item,
.workload-empty {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(244, 239, 230, 0.08);
}

.workload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workload-item strong,
.workload-item span {
  display: block;
}

.workload-item span,
.workload-empty {
  color: rgba(244, 239, 230, 0.78);
  font-size: 0.82rem;
}

.workload-badge {
  min-width: 40px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(239, 178, 109, 0.16);
  color: #f8d39c;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.auth-card {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.78);
}

.auth-status {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.household-status {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(31, 42, 51, 0.05);
}

.household-roster {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}

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

.roster-head strong {
  font-size: 0.9rem;
}

.roster-head span {
  min-width: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(221, 111, 66, 0.14);
  color: var(--accent-deep);
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.roster-member,
.roster-empty {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(31, 42, 51, 0.05);
}

.roster-member {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.roster-member strong,
.roster-member span {
  display: block;
}

.roster-member strong {
  font-size: 0.9rem;
}

.roster-member span,
.roster-empty {
  color: var(--muted);
  font-size: 0.82rem;
}

.roster-role {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(63, 111, 143, 0.12);
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.invite-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.invite-panel label {
  display: grid;
  gap: 8px;
}

.invite-panel input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  color: var(--ink);
}

.settings-form {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.38);
}

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

.settings-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  color: var(--ink);
}

.settings-form input:disabled {
  opacity: 0.66;
  cursor: not-allowed;
}

.auth-status strong {
  display: block;
}

.household-status strong {
  display: block;
}

.auth-status span,
.household-status span,
.auth-form span {
  color: var(--muted);
  font-size: 0.85rem;
}

.auth-form {
  display: grid;
  gap: 12px;
}

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

.auth-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  color: var(--ink);
}

.owner-row {
  margin-bottom: 16px;
}

.owner-row select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  color: var(--ink);
}

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

.main-panel {
  display: grid;
  gap: 20px;
}

.topbar,
.hero-band,
.panel {
  border-radius: 30px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 28px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  color: var(--accent-deep);
  font-weight: 800;
}

.topbar h1,
.hero-copy h2 {
  margin: 8px 0 0;
  font-family: "Fraunces", serif;
  letter-spacing: -0.03em;
}

.topbar h1 {
  font-size: clamp(2rem, 3vw, 3.2rem);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-meta span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
}

.topbar-meta strong {
  font-size: 1.05rem;
}

.hero-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  padding: 28px;
}

.hero-copy h2 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.02;
}

.hero-copy p {
  max-width: 62ch;
  line-height: 1.75;
  color: var(--muted);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.stat-card,
.record-item,
.timeline-card,
.detail-meta,
.insight-item {
  border: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.78);
}

.stat-card {
  padding: 18px;
  border-radius: 22px;
}

.stat-card strong {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.stat-card span,
.record-copy small,
.stat-card p,
.timeline-card p,
.insight-item p,
.detail-body {
  color: var(--muted);
  line-height: 1.6;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 20px;
}

.content-column,
.detail-column {
  display: grid;
  gap: 20px;
}

.panel {
  padding: 24px;
}

.utility-row,
.composer-actions,
.detail-actions,
.template-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.utility-row {
  margin-bottom: 16px;
}

.search-row {
  margin-bottom: 14px;
}

.search-field {
  display: grid;
  gap: 8px;
}

.search-field span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
}

.search-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  color: var(--ink);
}

.template-row {
  margin-bottom: 18px;
}

.template-chip {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.8);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.composer {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 250, 243, 0.78);
}

.hidden {
  display: none;
}

.composer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.composer-wide {
  grid-column: span 2;
}

.composer label {
  display: grid;
  gap: 8px;
}

.composer span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
}

.composer input,
.composer select,
.composer textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  color: var(--ink);
}

.composer textarea {
  resize: vertical;
  min-height: 112px;
}

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

.panel-head h3 {
  margin: 6px 0 0;
  font-size: 1.5rem;
}

.panel-head span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(221, 111, 66, 0.12);
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.filter-chip {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.filter-chip.active {
  background: var(--ink);
  color: #fff;
}

.record-list,
.timeline,
.detail-meta,
.assistant-steps,
.insight-list,
.note-list {
  display: grid;
  gap: 12px;
}

.record-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.record-item.active {
  border-color: rgba(221, 111, 66, 0.4);
  background: linear-gradient(180deg, rgba(255, 250, 243, 0.98), rgba(255, 238, 223, 0.95));
}

.record-item.due-overdue {
  border-color: rgba(159, 69, 31, 0.3);
  background: linear-gradient(180deg, rgba(255, 244, 240, 0.98), rgba(255, 232, 223, 0.95));
}

.record-item.due-soon {
  border-color: rgba(133, 89, 12, 0.28);
  background: linear-gradient(180deg, rgba(255, 249, 236, 0.98), rgba(250, 240, 214, 0.95));
}

.record-item.completed {
  opacity: 0.72;
}

.record-item.completed .record-copy strong,
.record-item.completed .record-value {
  text-decoration: line-through;
}

.record-badge,
.timeline-badge {
  min-width: 74px;
  padding: 8px 10px;
  border-radius: 16px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
}

.badge-urgent {
  background: #ffe0d1;
  color: #9f451f;
}

.badge-planned {
  background: #dceaf4;
  color: #1f5476;
}

.badge-saved {
  background: #dff0e4;
  color: #255b43;
}

.badge-doc {
  background: #f6e7c8;
  color: #85590c;
}

.record-copy {
  display: grid;
  gap: 4px;
  text-align: left;
}

.record-value {
  font-weight: 800;
  color: var(--accent-deep);
}

.record-helper {
  display: block;
  margin-top: 3px;
  font-size: 0.82rem;
  color: var(--muted);
}

.record-status {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(31, 42, 51, 0.08);
  color: var(--muted);
}

.record-status.done {
  background: #dff0e4;
  color: #255b43;
}

.record-status.overdue {
  background: #ffe0d1;
  color: #9f451f;
}

.record-status.soon {
  background: #f6e7c8;
  color: #85590c;
}

.record-status.ready {
  background: #dceaf4;
  color: #1f5476;
}

.timeline {
  grid-template-columns: repeat(5, 1fr);
}

.timeline-card {
  padding: 16px;
  border-radius: 20px;
}

.timeline-badge {
  margin-bottom: 12px;
}

.detail-body {
  margin: 0 0 18px;
  font-size: 1rem;
}

.detail-actions {
  margin-bottom: 14px;
}

.detail-meta {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 16px;
}

.detail-meta article {
  padding: 14px;
  border-radius: 18px;
}

.detail-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.assistant-steps {
  grid-template-columns: repeat(2, 1fr);
}

.assistant-steps button,
.assistant-steps span {
  padding: 14px 16px;
  background: rgba(31, 42, 51, 0.06);
  color: var(--ink);
  font-weight: 700;
}

.assistant-steps button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
  cursor: pointer;
}

.assistant-steps button.step-done {
  background: #dff0e4;
  color: #255b43;
  border-color: rgba(47, 115, 92, 0.18);
}

.insight-item {
  padding: 16px;
  border-radius: 20px;
}

.insight-item strong {
  display: block;
  margin-bottom: 6px;
}

.note-form {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

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

.note-form span {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
}

.note-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
  color: var(--ink);
}

.note-item,
.note-empty {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.78);
}

.note-item strong {
  display: block;
  margin-bottom: 4px;
}

.note-item p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.note-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.note-actions button {
  padding: 10px 12px;
  border-radius: 999px;
}

.note-item span,
.note-empty {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.activity-list {
  display: grid;
  gap: 12px;
}

.activity-item {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.72);
}

.activity-item strong {
  display: block;
  margin-bottom: 4px;
}

.activity-item p,
.activity-item span {
  color: var(--muted);
}

.activity-item span {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(33, 49, 59, 0.96);
  color: #f4efe6;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .app-shell,
  .content-grid,
  .hero-band {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    min-height: auto;
  }

  .hero-stats,
  .detail-meta,
  .assistant-steps,
  .timeline,
  .composer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 16px;
  }

  .topbar,
  .topbar-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats,
  .detail-meta,
  .assistant-steps,
  .timeline,
  .record-item,
  .composer-grid {
    grid-template-columns: 1fr;
  }

  .record-item {
    align-items: start;
  }

  .composer-wide {
    grid-column: auto;
  }
}
