:root {
  color-scheme: light;
  --ink: #252722;
  --muted: #687064;
  --line: #d9ddd3;
  --line-strong: #aeb8ab;
  --panel: #ffffff;
  --canvas: #f6f7f1;
  --soft: #e9f2ec;
  --green: #3e6f58;
  --green-dark: #284b3d;
  --coral: #c85e4c;
  --gold: #d5a342;
  --blue: #4d6f8f;
  --shadow: 0 18px 50px rgba(48, 57, 47, 0.12);
  --wash-a: rgba(159, 201, 177, 0.78);
  --wash-b: rgba(185, 226, 216, 0.72);
  --wash-c: rgba(213, 232, 164, 0.7);
  --wash-d: rgba(249, 242, 205, 0.92);
}

body[data-theme="navy"] {
  --ink: #172434;
  --muted: #617080;
  --line: #ced7df;
  --line-strong: #8da1b2;
  --canvas: #f2f5f7;
  --soft: #e4edf3;
  --green: #285b7d;
  --green-dark: #173b5f;
  --blue: #406f91;
  --wash-a: rgba(88, 128, 204, 0.7);
  --wash-b: rgba(148, 220, 235, 0.66);
  --wash-c: rgba(193, 219, 239, 0.76);
  --wash-d: rgba(239, 241, 224, 0.94);
}

body[data-theme="soft"] {
  --ink: #352b34;
  --muted: #776872;
  --line: #e2d1da;
  --line-strong: #ba8fa7;
  --canvas: #fff8fb;
  --soft: #f5e8ef;
  --green: #9a5f7f;
  --green-dark: #653b55;
  --blue: #487b80;
  --wash-a: rgba(241, 174, 207, 0.68);
  --wash-b: rgba(196, 181, 235, 0.66);
  --wash-c: rgba(195, 231, 216, 0.7);
  --wash-d: rgba(253, 226, 207, 0.94);
}

body[data-theme="bold"] {
  --ink: #20282c;
  --muted: #636c6f;
  --line: #cfd4d2;
  --line-strong: #849294;
  --canvas: #f3f4f1;
  --soft: #e4ecea;
  --green: #3e6870;
  --green-dark: #263d43;
  --coral: #b6493d;
  --wash-a: rgba(63, 91, 105, 0.68);
  --wash-b: rgba(182, 106, 82, 0.5);
  --wash-c: rgba(218, 179, 93, 0.48);
  --wash-d: rgba(220, 232, 227, 0.94);
}

body[data-theme="natural"] {
  --wash-a: rgba(159, 201, 177, 0.78);
  --wash-b: rgba(185, 226, 216, 0.72);
  --wash-c: rgba(213, 232, 164, 0.7);
  --wash-d: rgba(249, 242, 205, 0.92);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(118deg, var(--wash-a) 0%, transparent 48%),
    linear-gradient(238deg, var(--wash-b) 0%, transparent 52%),
    linear-gradient(145deg, var(--wash-c) 0%, var(--wash-d) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.brand {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--green-dark);
  color: white;
  font-weight: 800;
}

.brand h1,
.brand p,
.topbar h2,
.topbar p,
.section-heading h3,
.panel h4 {
  margin: 0;
}

.brand h1 {
  font-size: 1.35rem;
}

.brand p,
.eyebrow {
  color: var(--muted);
  font-size: 0.9rem;
}

.eyebrow {
  color: var(--green-dark);
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: capitalize;
}

.tabs {
  display: grid;
  gap: 8px;
}

.tab {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.34);
  color: var(--muted);
  text-align: left;
}

.tab span {
  text-align: center;
}

.tab.is-active {
  border-color: var(--line);
  background: var(--soft);
  color: var(--green-dark);
  font-weight: 700;
}

.secondary-button,
.primary-button,
.icon-button {
  min-height: 42px;
  border-radius: 8px;
  border: 2px solid var(--line-strong);
}

.workspace {
  min-width: 0;
  padding: 30px clamp(18px, 4vw, 46px) 44px;
}

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

.topbar-actions {
  display: grid;
  gap: 8px;
  min-width: min(100%, 470px);
}

.profile-switch {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.profile-switch select {
  min-height: 38px;
  border: 2px solid var(--line-strong);
}

.topbar h2 {
  margin-top: 4px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 850;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 8px;
  min-width: min(100%, 470px);
}

.status-card {
  text-align: left;
  min-height: 72px;
  padding: 12px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: inherit;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.status-card:hover,
.status-card:focus-visible {
  border-color: var(--green);
  background: white;
  transform: translateY(-1px);
}

.status-card:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(62, 111, 88, 0.22);
  outline-offset: 2px;
}

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

.status-strip strong {
  font-size: 1.55rem;
}

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

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-heading h3 {
  font-size: 1.35rem;
}

.heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.today-heading {
  min-height: 78px;
}

.profile-caption {
  margin: 5px 0 0;
  color: var(--muted);
}

.profile-photo {
  display: grid;
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  overflow: hidden;
  place-items: center;
  border: 3px solid var(--green-dark);
  border-radius: 50%;
  background: var(--soft);
  color: var(--green-dark);
  font-size: 1.25rem;
  font-weight: 850;
  box-shadow: 0 8px 22px rgba(35, 46, 42, 0.16);
}

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

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

.birthday-panel {
  min-height: 220px;
}

.celebration-icon,
.celebration-row .check {
  color: var(--gold);
}

.celebration-row {
  border-color: rgba(213, 163, 66, 0.55);
}

.shopping-preview {
  grid-column: 1 / -1;
}

.planning-stack {
  display: grid;
  gap: 16px;
}

.task-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.task-panel {
  min-height: 220px;
}

.routine-section,
.recipe-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 2px solid var(--line);
}

.routine-form,
.birthday-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px minmax(190px, 0.7fr) 130px;
  gap: 10px;
  margin-bottom: 18px;
}

.birthday-form {
  grid-template-columns: minmax(170px, 1fr) 160px 130px minmax(180px, 1fr) 120px;
}

.routine-groups {
  display: grid;
  gap: 22px;
}

.routine-group {
  min-width: 0;
}

.routine-group h4 {
  margin: 0 0 10px;
  color: var(--green-dark);
}

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

.routine-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px 160px 100px 36px;
  gap: 8px;
  align-items: center;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.routine-row input,
.routine-row select {
  min-height: 38px;
}

.profile-page-layout {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.profile-heading-actions select {
  min-width: 180px;
  border: 2px solid var(--line-strong);
}

.profile-identity {
  display: grid;
  min-height: 320px;
  place-items: center;
  align-content: center;
  padding: 24px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  text-align: center;
}

.profile-identity h4 {
  margin: 16px 0 4px;
  font-size: 1.35rem;
}

.profile-identity p {
  margin: 0;
  color: var(--muted);
}

.profile-page-photo {
  display: grid;
  width: 150px;
  height: 150px;
  overflow: hidden;
  place-items: center;
  border: 4px solid var(--green-dark);
  border-radius: 50%;
  background: var(--soft);
  color: var(--green-dark);
  font-size: 2rem;
  font-weight: 850;
}

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

.profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.profile-workdays,
.profile-form > .primary-button {
  grid-column: 1 / -1;
}

.panel {
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.panel h4 {
  font-size: 1.05rem;
}

.entry-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

#taskTitle {
  grid-column: span 2;
}

.meal-form {
  grid-template-columns: 130px minmax(180px, 1fr) 140px 150px;
}

#mealIngredients {
  grid-column: span 3;
}

.toggle-field {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  color: var(--green-dark);
  font-size: 0.86rem;
  font-weight: 750;
}

.toggle-field input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--green-dark);
}

.compact-form {
  grid-template-columns: minmax(180px, 1fr) 120px;
  max-width: 680px;
}

.member-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) 130px 150px 180px 150px;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 16px;
}

.member-form .weekday-picker {
  grid-column: span 4;
}

.birthday-editor {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.birthday-editor input {
  width: auto;
  min-height: 36px;
}

.file-picker,
.small-button {
  display: grid;
  min-height: 44px;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  color: var(--green-dark);
  font-size: 0.86rem;
  font-weight: 750;
  cursor: pointer;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.profile-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.inline-workdays {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 8px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.work-schedule-editor {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.work-schedule-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.work-schedule-toolbar > select {
  width: auto;
  min-width: 180px;
  min-height: 38px;
}

.cycle-start-field {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.cycle-start-field input {
  width: auto;
  min-height: 38px;
}

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

.cycle-week-grid .inline-workdays {
  margin: 0;
  padding: 9px;
  border: 2px solid var(--line);
  border-radius: 8px;
}

.cycle-week-grid .inline-workdays.is-current-week {
  border-color: var(--green-dark);
  background: var(--soft);
}

.cycle-week-grid .inline-workdays.is-current-week legend {
  color: var(--green-dark);
  font-weight: 850;
}

.inline-workdays legend {
  width: 100%;
  padding: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.inline-workdays label {
  position: relative;
  display: grid;
  width: 38px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.inline-workdays label:has(input:checked) {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: white;
}

.inline-workdays label:focus-within {
  outline: 3px solid rgba(62, 111, 88, 0.22);
  outline-offset: 2px;
}

.inline-workdays input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.member-tasks-button {
  border-color: var(--green-dark);
  background: var(--soft);
}

.profile-tools select,
.compact-picker,
.small-button {
  width: auto;
  min-height: 36px;
}

.profile-tools select {
  min-width: 160px;
}

.compact-picker,
.small-button {
  padding: 0 12px;
}

.member-avatar {
  overflow: hidden;
  border: 2px solid var(--green);
  background: var(--soft);
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 1;
}

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

.recipe-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

#recipeIngredients {
  grid-column: span 2;
}

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

.recipe-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  padding: 12px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
}

.recipe-visual {
  display: grid;
  width: 96px;
  aspect-ratio: 1;
  overflow: hidden;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--green-dark);
  font-weight: 850;
}

.recipe-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-content {
  min-width: 0;
}

.recipe-content strong,
.recipe-content p {
  overflow-wrap: anywhere;
}

.recipe-content p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.recipe-link {
  color: var(--green-dark);
  font-size: 0.84rem;
  font-weight: 800;
}

.recipe-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(120px, 1fr) auto 36px;
  gap: 8px;
}

.recipe-actions select {
  min-height: 36px;
}

.leftover-item {
  border-color: rgba(213, 163, 66, 0.6);
}

.leftover-item .check {
  color: #705321;
  background: rgba(213, 163, 66, 0.18);
}

.weekday-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.weekday-picker legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

.weekday-picker label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-size: 0.88rem;
}

.weekday-picker input {
  width: 16px;
  min-height: auto;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 0 12px;
}

.primary-button {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: white;
  font-weight: 700;
}

.secondary-button {
  background: white;
  color: var(--green-dark);
  font-weight: 700;
}

.secondary-button:hover,
.icon-button:hover,
.small-button:hover,
.file-picker:hover {
  border-color: var(--green-dark);
  background: var(--soft);
}

.icon-button {
  display: grid;
  width: 42px;
  padding: 0;
  place-items: center;
  background: white;
  color: var(--green-dark);
  font-size: 1.2rem;
}

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

.roomy {
  gap: 12px;
}

.item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.item.is-done .item-title {
  color: var(--muted);
  text-decoration: line-through;
}

.check {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: var(--canvas);
  color: transparent;
}

.item.is-done .check,
.shopping-item.is-bought .check {
  background: var(--green);
  color: white;
}

.item-main {
  min-width: 0;
}

.item-title {
  overflow-wrap: anywhere;
  font-weight: 750;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.84rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--soft);
}

.delete-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--coral);
  font-size: 1.15rem;
}

.empty-state {
  display: grid;
  gap: 4px;
  min-height: 110px;
  place-content: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
}

.shopping-item.is-bought .item-title {
  color: var(--muted);
  text-decoration: line-through;
}

.source-menu {
  background: rgba(213, 163, 66, 0.16);
}

.day-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.day-button {
  min-height: 44px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  font-weight: 700;
}

.day-button.is-active {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: white;
}

.week-grid,
.week-mini {
  display: grid;
  gap: 10px;
}

.week-grid {
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  overflow-x: auto;
  padding-bottom: 4px;
}

.week-mini {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

.day-card {
  display: grid;
  align-content: start;
  gap: 8px;
  width: 100%;
  min-height: 132px;
  padding: 10px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: inherit;
  text-align: left;
}

.day-card:hover,
.day-card:focus-visible,
.day-card.is-selected {
  border-color: var(--green);
  background: white;
}

.day-card strong {
  font-size: 0.92rem;
}

.day-count {
  color: var(--muted);
  font-size: 0.8rem;
}

.mini-task {
  overflow-wrap: anywhere;
  padding: 6px 7px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--green-dark);
  font-size: 0.78rem;
  line-height: 1.25;
}

.meal-mini {
  background: rgba(213, 163, 66, 0.18);
  color: #705321;
}

.assignee-badge {
  background: rgba(77, 111, 143, 0.14);
  color: var(--blue);
}

.workday-badge {
  background: rgba(200, 94, 76, 0.12);
  color: var(--coral);
}

.repeat-badge {
  background: rgba(213, 163, 66, 0.18);
  color: #705321;
}

.notification-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 2px solid var(--line);
}

.notification-settings {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  align-items: center;
}

.setting-field,
.month-filter {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.setting-field input,
.month-filter input {
  border: 2px solid var(--line-strong);
}

.notification-status {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

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

.finance-total {
  display: grid;
  gap: 6px;
  min-height: 100px;
  align-content: center;
  padding: 16px;
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
}

.finance-total span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.finance-total strong {
  overflow-wrap: anywhere;
  font-size: 1.55rem;
}

.income-total {
  border-color: rgba(62, 111, 88, 0.65);
}

.expense-total {
  border-color: rgba(200, 94, 76, 0.65);
}

.balance-total {
  border-color: rgba(77, 111, 143, 0.65);
}

.is-negative {
  color: var(--coral);
}

.transaction-form {
  display: grid;
  grid-template-columns: 120px minmax(180px, 1fr) 130px 150px 150px 110px;
  gap: 10px;
  margin-bottom: 16px;
}

.finance-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: start;
}

.finance-panel {
  min-height: 280px;
}

.category-breakdown {
  display: grid;
  gap: 14px;
}

.category-row {
  display: grid;
  gap: 6px;
}

.category-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.86rem;
}

.category-track {
  height: 10px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--soft);
}

.category-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
}

.transaction-item.is-income .check {
  background: var(--soft);
  color: var(--green-dark);
}

.transaction-item.is-expense .check {
  background: rgba(200, 94, 76, 0.12);
  color: var(--coral);
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 14px;
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    grid-template-columns: 42px 1fr;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .tabs {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .tab {
    flex: 0 0 118px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 2px;
    min-height: 58px;
    padding: 8px 4px;
    text-align: center;
    font-size: 0.82rem;
  }

  .quiet-button {
    display: none;
  }

  .topbar {
    display: grid;
  }

  .topbar-actions {
    width: 100%;
  }

  .status-strip {
    width: 100%;
  }

  .overview-grid,
  .task-columns,
  .entry-form,
  .meal-form,
  .member-form,
  .recipe-form,
  .routine-form,
  .birthday-form,
  .profile-page-layout,
  .profile-form,
  .transaction-form,
  .finance-layout {
    grid-template-columns: 1fr;
  }

  .notification-settings {
    grid-template-columns: 1fr;
  }

  .notification-status {
    grid-column: auto;
  }

  #taskTitle {
    grid-column: auto;
  }

  #mealIngredients,
  #recipeIngredients {
    grid-column: auto;
  }

  .member-form .weekday-picker {
    grid-column: auto;
  }

  .profile-workdays,
  .profile-form > .primary-button {
    grid-column: auto;
  }

  .routine-row {
    grid-template-columns: minmax(160px, 1fr) 130px 140px 92px 36px;
    overflow-x: auto;
  }

  .day-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .week-mini {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recipe-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 520px) {
  .workspace {
    padding-inline: 12px;
  }

  .tabs {
    display: flex;
  }

  .tab {
    min-height: 50px;
  }

  .status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .finance-total {
    min-height: 82px;
  }

  .section-heading.with-action {
    align-items: stretch;
    flex-direction: column;
  }

  .heading-actions,
  .heading-actions button {
    width: 100%;
  }

  .item {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
  }

  .day-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weekday-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }


  .recipe-card {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .recipe-visual {
    width: 76px;
  }

  .routine-row {
    grid-template-columns: 1fr 1fr;
  }

  .routine-row > :first-child {
    grid-column: 1 / -1;
  }

  .routine-row .delete-button {
    justify-self: end;
  }
}
