﻿:root {
    --nx-bg: #fcf8ff;
    --nx-surface: rgba(255, 255, 255, .80);
    --nx-surface-solid: #ffffff;
    --nx-container: #f0ecf9;
    --nx-text: #1b1b24;
    --nx-muted: #464555;
    --nx-outline: #c7c4d8;
    --nx-primary: #3525cd;
    --nx-health: #4db6ac;
    --nx-finance: #059669;
    --nx-wardrobe: #fb7185;
    --nx-shadow: 0 10px 30px rgba(53, 37, 205, .06);
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

html,
body {
    background: radial-gradient(120% 120% at 50% -10%, #ebe5fb 0%, var(--nx-bg) 48%);
    color: var(--nx-text);
    font-family: Manrope, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    min-height: 100%;
}

body {
    line-height: 1.36;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.08;
}

h2 {
    font-size: 1.04rem;
    font-weight: 760;
}

h3 {
    font-size: .96rem;
    font-weight: 740;
}

button,
input,
textarea {
    font: inherit;
}

.nexo-page {
    min-height: 100dvh;
}

.nexo-topbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    left: 50%;
    max-width: 880px;
    padding: calc(10px + env(safe-area-inset-top)) 12px 10px;
    position: fixed;
    top: 0;
    transform: translateX(-50%);
    width: calc(100% - 16px);
    z-index: 90;
}

.brand {
    align-items: center;
    display: inline-flex;
    font-size: 1.02rem;
    font-weight: 800;
    gap: 8px;
}

.brand-logo {
    border-radius: 10px;
    height: 30px;
    width: 30px;
}

.brand-dot {
    background: linear-gradient(145deg, #5e51e7 0%, var(--nx-primary) 100%);
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(53, 37, 205, .35);
    display: inline-block;
    height: 10px;
    width: 10px;
}

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

.topbar-icon,
.topbar-avatar {
    align-items: center;
    background: var(--nx-surface-solid);
    border: 1px solid var(--nx-outline);
    border-radius: 999px;
    color: var(--nx-muted);
    display: inline-flex;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.topbar-avatar {
    background: linear-gradient(145deg, #efedff 0%, #fff 100%);
    color: var(--nx-primary);
}

.content {
    margin: 0 auto;
    max-width: 860px;
    width: 100%;
}

.shell-content {
    padding: calc(88px + env(safe-area-inset-top)) 12px calc(90px + env(safe-area-inset-bottom));
}

.safe-bottom {
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.page-header {
    margin-bottom: 14px;
}

.eyebrow {
    color: var(--nx-muted);
    font-size: .74rem;
    font-weight: 760;
    letter-spacing: .06em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.page-subtitle {
    color: var(--nx-muted);
    font-size: .9rem;
    margin-top: 8px;
}

.glass-card {
    backdrop-filter: blur(12px);
    background: var(--nx-surface);
    border: 1px solid rgba(255, 255, 255, .62);
    border-radius: 18px;
    box-shadow: var(--nx-shadow);
}

.section-card {
    margin-top: 14px;
    padding: 14px;
}

.module-page-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
}

.module-page-head h1 {
    font-size: 1.7rem;
    margin: 0;
}

.module-add-button {
    align-items: center;
    background: var(--nx-primary);
    border: 0;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.module-filter-panel,
.module-inline-form,
.module-form-grid {
    display: grid;
    gap: 10px;
}

.module-inline-form {
    grid-template-columns: 1fr;
    margin-bottom: 12px;
}

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

.module-check-list label,
.module-balance-row {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.module-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.bento-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

.bento-main {
    padding: 14px;
}

.metric-strip {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.metric-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
    margin-top: 12px;
}

.metric-card {
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 11px;
}

.metric-card span {
    color: var(--nx-muted);
    display: block;
    font-size: .74rem;
    font-weight: 700;
}

.metric-card strong {
    display: block;
    font-size: 1rem;
    margin-top: 4px;
}

.metric-card small {
    color: var(--nx-muted);
    display: block;
    font-size: .75rem;
    margin-top: 3px;
}

.module-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

.dashboard-module-list {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}

.dashboard-module-card {
    display: grid;
    gap: 10px;
    padding: 16px;
}

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

.wardrobe-card {
    display: grid;
    overflow: hidden;
}

.wardrobe-photo {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, .6);
    object-fit: cover;
    width: 100%;
}

.wardrobe-photo-empty {
    align-items: center;
    color: var(--nx-muted);
    display: flex;
    justify-content: center;
}

.wardrobe-card-body {
    display: grid;
    gap: 7px;
    padding: 10px;
}

.wardrobe-card-body span {
    color: var(--nx-muted);
    font-size: .8rem;
    min-height: 1rem;
}

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

.finance-tabs {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    overflow-x: auto;
    padding-bottom: 3px;
}

.finance-tab {
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(124, 111, 191, .22);
    border-radius: 999px;
    color: var(--nx-muted);
    flex: 0 0 auto;
    font-size: .82rem;
    font-weight: 800;
    min-height: 38px;
    padding: 0 14px;
}

.finance-tab.active {
    background: var(--nx-text);
    color: #fff;
}

.finance-table-card {
    padding: 12px;
}

.finance-table-scroll {
    overflow-x: auto;
    width: 100%;
}

.finance-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: .78rem;
    min-width: 920px;
    width: 100%;
}

.finance-table th,
.finance-table td {
    border-bottom: 1px solid rgba(124, 111, 191, .16);
    padding: 9px 8px;
    text-align: right;
    white-space: nowrap;
}

.finance-table th:first-child,
.finance-table td:first-child {
    text-align: left;
}

.finance-table th {
    color: var(--nx-muted);
    font-size: .72rem;
    text-transform: uppercase;
}

.finance-row-button {
    background: transparent;
    border: 1px solid rgba(124, 111, 191, .18);
    text-align: left;
    width: 100%;
}

.finance-chart {
    display: block;
    height: auto;
    max-width: 100%;
    width: 100%;
}

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

.finance-chart-legend span {
    align-items: center;
    color: var(--nx-muted);
    display: flex;
    font-size: .78rem;
    gap: 7px;
}

.finance-chart-legend i {
    border-radius: 999px;
    display: inline-block;
    height: 9px;
    width: 9px;
}

.finance-subform {
    border-top: 1px solid rgba(124, 111, 191, .16);
    margin-top: 12px;
    padding-top: 12px;
}

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

.dashboard-simple-card {
    align-items: center;
    border: 1px solid transparent;
    color: var(--nx-text);
    display: grid;
    gap: 10px;
    justify-items: center;
    min-height: 118px;
    padding: 16px 10px;
    text-align: center;
}

.dashboard-simple-card span {
    font-size: .95rem;
    font-weight: 800;
}

.module-card {
    border: 1px solid transparent;
    display: grid;
    gap: 8px;
    padding: 14px;
}

.module-card-head,
.section-header,
.card-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.module-card p,
.empty,
.notice,
.history-row span,
.history-row small {
    color: var(--nx-muted);
}

.module-icon-wrap {
    align-items: center;
    background: rgba(255, 255, 255, .72);
    border-radius: 999px;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.module-toggle {
    background: var(--nx-surface-solid);
    border: 1px solid var(--nx-outline);
    border-radius: 12px;
    color: var(--nx-text);
    font-size: .88rem;
    font-weight: 700;
    min-height: 42px;
    padding: 10px 12px;
}

.nav-toggle.on {
    background: rgba(53, 37, 205, .1);
    border-color: rgba(53, 37, 205, .22);
    color: var(--nx-primary);
}

.pill {
    background: rgba(53, 37, 205, .10);
    border: 1px solid rgba(53, 37, 205, .18);
    border-radius: 999px;
    color: var(--nx-primary);
    display: inline-flex;
    font-size: .72rem;
    font-weight: 760;
    padding: 4px 10px;
}

.pill-on {
    background: rgba(16, 185, 129, .11);
    border-color: rgba(16, 185, 129, .26);
    color: #047857;
}

.pill-off {
    background: rgba(113, 113, 122, .11);
    border-color: rgba(113, 113, 122, .26);
    color: #52525b;
}

.primary-action {
    align-items: center;
    background: linear-gradient(145deg, #4738dd 0%, var(--nx-primary) 100%);
    border: 0;
    border-radius: 14px;
    color: #fff;
    display: inline-flex;
    font-size: .9rem;
    font-weight: 760;
    gap: 7px;
    justify-content: center;
    min-height: 46px;
    padding: 10px 14px;
    text-decoration: none;
}

.settings-action,
.secondary-action {
    align-items: center;
    background: var(--nx-surface-solid);
    border: 1px solid var(--nx-outline);
    border-radius: 14px;
    color: var(--nx-primary);
    display: inline-flex;
    font-size: .9rem;
    font-weight: 760;
    gap: 7px;
    justify-content: center;
    min-height: 46px;
    padding: 10px 14px;
}

.settings-action {
    margin-bottom: 12px;
}

.text-link {
    color: var(--nx-primary);
    font-size: .88rem;
    font-weight: 760;
}

.module-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.module-chip {
    background: #fff;
    border: 1px solid var(--nx-outline);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    padding: 6px 10px;
}

.module-page-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-top: 2px;
}

.module-add-button {
    align-items: center;
    background: linear-gradient(145deg, #4738dd 0%, var(--nx-primary) 100%);
    border: 0;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.form-card {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    padding: 14px;
}

.form-card label {
    color: var(--nx-muted);
    display: grid;
    font-size: .84rem;
    font-weight: 700;
    gap: 6px;
}

.form-card input,
.form-card textarea {
    background: #fff;
    border: 1px solid var(--nx-outline);
    border-radius: 11px;
    color: var(--nx-text);
    min-height: 44px;
    padding: 10px 12px;
}

.form-card textarea {
    min-height: 86px;
}

.weight-summary-card {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding: 14px;
}

.weight-current-card {
    background: linear-gradient(160deg, rgba(53, 37, 205, .1), rgba(53, 37, 205, .03));
    border: 1px solid rgba(53, 37, 205, .18);
    border-radius: 14px;
    display: grid;
    gap: 8px;
    padding: 12px;
}

.weight-current-header {
    align-items: baseline;
    display: grid;
    gap: 4px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.weight-current-header span {
    color: var(--nx-muted);
    font-size: .8rem;
    font-weight: 780;
}

.weight-current-header small {
    color: var(--nx-muted);
    font-size: .72rem;
    font-weight: 700;
}

.weight-current-card > strong {
    color: var(--nx-ink);
    font-size: 1.62rem;
    line-height: 1.05;
}

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

.weight-average-card {
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--nx-outline);
    border-radius: 12px;
    display: grid;
    gap: 6px;
    padding: 10px;
}

.weight-average-card span {
    color: var(--nx-muted);
    display: block;
    font-size: .76rem;
    font-weight: 740;
}

.weight-average-card strong {
    display: block;
    font-size: 1rem;
}

.weight-trend-badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: .74rem;
    font-weight: 820;
    justify-self: start;
    line-height: 1.2;
    padding: 4px 8px;
}

.weight-trend-hint {
    color: var(--nx-muted);
    font-size: .76rem;
    margin: 0;
}

.weight-trend-badge.trend-up {
    background: rgba(180, 35, 24, .12);
    color: #b42318;
}

.weight-trend-badge.trend-down {
    background: rgba(4, 120, 87, .12);
    color: #047857;
}

.weight-trend-badge.trend-same,
.weight-trend-badge.trend-none {
    background: rgba(70, 69, 85, .1);
    color: var(--nx-muted);
}

.weight-insights {
    margin-top: 10px;
}

.weight-insights h2 {
    font-size: .92rem;
    margin: 0 0 8px;
}

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

.weight-insight-item {
    background: rgba(255, 255, 255, .58);
    border: 1px solid rgba(196, 187, 238, .68);
    border-radius: 10px;
    padding: 7px 8px;
}

.weight-insight-item span {
    color: var(--nx-muted);
    display: block;
    font-size: .68rem;
    font-weight: 760;
}

.weight-insight-item strong {
    color: var(--nx-text);
    display: block;
    font-size: .86rem;
    margin-top: 2px;
}

.weight-insight-item.insight-good strong {
    color: #047857;
}

.weight-insight-item.insight-bad strong {
    color: #b42318;
}

.weight-insight-item.insight-empty strong,
.weight-insight-item.insight-neutral strong {
    color: var(--nx-muted);
}

.weight-filter {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    justify-content: flex-end;
}

.weight-filter .form-select {
    background: #fff;
    border: 1px solid var(--nx-outline);
    border-radius: 999px;
    color: var(--nx-text);
    font-size: .78rem;
    font-weight: 760;
    min-height: 34px;
    padding: 5px 28px 5px 10px;
}

.weight-wheel {
    background: rgba(255, 255, 255, .62);
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 16px;
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 190px;
    padding: 10px;
    position: relative;
}

.weight-wheel-column {
    display: grid;
    gap: 6px;
    max-height: 170px;
    overflow-y: auto;
    padding: 56px 2px;
    scroll-snap-type: y mandatory;
}

.weight-wheel-column::-webkit-scrollbar {
    display: none;
}

.weight-wheel-item {
    background: transparent;
    border: 0;
    color: var(--nx-muted);
    display: block;
    font-size: 1rem;
    font-weight: 740;
    min-height: 40px;
    scroll-snap-align: center;
    text-align: center;
}

.weight-wheel-item.is-selected {
    color: var(--nx-text);
    font-size: 1.15rem;
    font-weight: 820;
}

.weight-wheel-selection {
    background: rgba(255, 255, 255, .88);
    border: 1px solid var(--nx-outline);
    border-radius: 12px;
    height: 42px;
    left: 10px;
    pointer-events: none;
    position: absolute;
    right: 10px;
    top: calc(50% - 21px);
}

.weight-wheel-readout {
    color: var(--nx-muted);
    font-size: .9rem;
    font-weight: 760;
    text-align: center;
}

.form-card > button {
    background: var(--nx-health);
    border: 0;
    border-radius: 12px;
    color: #083344;
    font-weight: 760;
    min-height: 44px;
}

.chart-wrap {
    margin-top: 10px;
    width: 100%;
}

.weight-chart {
    background: linear-gradient(180deg, rgba(53, 37, 205, .07) 0%, rgba(53, 37, 205, 0) 100%);
    border: 1px solid rgba(53, 37, 205, .1);
    border-radius: 12px;
    display: block;
    height: 196px;
    width: 100%;
}

.weight-axis {
    stroke: rgba(70, 69, 85, .55);
    stroke-width: 1;
}

.weight-grid-line {
    stroke: rgba(70, 69, 85, .14);
    stroke-width: 1;
}

.weight-grid-line-x {
    stroke: rgba(70, 69, 85, .08);
}

.weight-axis-label {
    fill: var(--nx-muted);
    font-size: 10px;
    font-weight: 760;
}

.history-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.history-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--nx-text);
    display: flex;
    font-size: 1.04rem;
    font-weight: 760;
    justify-content: space-between;
    padding: 0;
    text-align: left;
    width: 100%;
}

.history-row {
    align-items: center;
    background: rgba(255, 255, 255, .7);
    border: 1px solid var(--nx-outline);
    border-radius: 12px;
    display: grid;
    gap: 6px;
    grid-template-columns: 1fr auto;
    padding: 11px;
}

.history-row strong {
    font-size: .9rem;
}

.shopping-tabs {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

.shopping-list-board {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

.shopping-list-card {
    border: 1px solid var(--nx-outline);
    color: var(--nx-text);
    display: grid;
    gap: 6px;
    min-height: 112px;
    padding: 16px;
    position: relative;
    text-align: left;
    width: 100%;
}

.shopping-list-card-main {
    background: transparent;
    border: 0;
    color: inherit;
    display: grid;
    gap: 6px;
    padding: 0;
    text-align: left;
    width: 100%;
}

.shopping-list-card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

.shopping-list-card strong {
    font-size: 1.02rem;
}

.shopping-list-card span,
.shopping-list-card small {
    color: var(--nx-muted);
    font-weight: 700;
}

.shopping-list-card em {
    background: rgba(53, 37, 205, .1);
    border-radius: 999px;
    color: var(--nx-primary);
    font-size: .72rem;
    font-style: normal;
    font-weight: 800;
    padding: 4px 8px;
    position: absolute;
    right: 12px;
    top: 12px;
}

.shopping-back {
    background: rgba(255, 255, 255, .7);
    border: 1px solid var(--nx-outline);
    border-radius: 999px;
    color: var(--nx-text);
    font-size: .82rem;
    font-weight: 800;
    min-height: 34px;
    padding: 6px 12px;
}

.shopping-tab {
    background: rgba(255, 255, 255, .65);
    border: 1px solid var(--nx-outline);
    border-radius: 11px;
    color: var(--nx-muted);
    font-size: .82rem;
    font-weight: 760;
    min-height: 40px;
    padding: 8px 10px;
}

.shopping-tab.active {
    background: rgba(53, 37, 205, .12);
    border-color: rgba(53, 37, 205, .26);
    color: var(--nx-primary);
}

.shopping-inline-form {
    display: grid;
    gap: 8px;
}

.shopping-create-grid {
    display: grid;
    gap: 14px;
}

.shopping-create-block {
    display: grid;
    gap: 10px;
}

.shopping-create-block fieldset {
    border: 0;
    display: grid;
    gap: 8px;
    margin: 0;
    min-inline-size: 0;
    padding: 0;
}

.shopping-create-block fieldset:disabled {
    opacity: .72;
}

.shopping-search-wrap {
    margin-top: 10px;
}

.shopping-quick-add {
    margin-top: 10px;
}

.shopping-quick-add .form-control {
    min-height: 46px;
}

.shopping-quick-options {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shopping-category-trigger {
    background: rgba(255, 255, 255, .76);
    border: 1px solid var(--nx-outline);
    border-radius: 999px;
    color: var(--nx-text);
    font-size: .75rem;
    font-weight: 760;
    min-height: 34px;
    padding: 6px 12px;
}

.shopping-category-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.shopping-chip {
    background: rgba(255, 255, 255, .74);
    border: 1px solid var(--nx-outline);
    border-radius: 999px;
    color: var(--nx-muted);
    font-size: .72rem;
    font-weight: 780;
    min-height: 32px;
    padding: 5px 10px;
}

.shopping-chip.active {
    background: rgba(53, 37, 205, .12);
    border-color: rgba(53, 37, 205, .3);
    color: var(--nx-primary);
}

.shopping-suggestion-list {
    display: grid;
    gap: 6px;
}

.shopping-suggestion-item {
    background: rgba(255, 255, 255, .76);
    border: 1px solid var(--nx-outline);
    border-radius: 11px;
    color: var(--nx-text);
    display: grid;
    gap: 2px;
    padding: 9px 10px;
    text-align: left;
    width: 100%;
}

.shopping-suggestion-item strong {
    font-size: .88rem;
}

.shopping-suggestion-item small {
    color: var(--nx-muted);
    font-size: .72rem;
}

.shopping-category-form {
    margin-top: 12px;
}

.shopping-item-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.shopping-group-list {
    display: grid;
    gap: 12px;
    margin-top: 10px;
}

.shopping-group-list h3 {
    color: var(--nx-muted);
    font-size: .78rem;
    font-weight: 820;
    margin: 0;
}

.shopping-item-row {
    align-items: center;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--nx-outline);
    border-radius: 13px;
    display: grid;
    gap: 8px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 10px;
}

.shopping-item-row.purchased {
    opacity: .8;
}

.category-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.shopping-check {
    align-items: center;
    background: #fff;
    border: 2px solid var(--nx-outline);
    border-radius: 11px;
    color: var(--nx-primary);
    display: inline-flex;
    font-weight: 900;
    height: 32px;
    justify-content: center;
    padding: 0;
    width: 32px;
}

.shopping-check.checked {
    background: rgba(53, 37, 205, .12);
    border-color: rgba(53, 37, 205, .28);
}

.shopping-item-content {
    min-width: 0;
}

.shopping-item-content strong {
    display: block;
    font-size: .92rem;
}

.shopping-item-content small {
    color: var(--nx-muted);
    display: block;
    font-size: .75rem;
    margin-top: 3px;
}

.shopping-recipe-tag {
    align-self: start;
    background: rgba(53, 37, 205, .1);
    border-radius: 999px;
    color: var(--nx-primary);
    display: inline-flex;
    font-size: .7rem;
    font-weight: 800;
    margin-top: 6px;
    max-width: 100%;
    overflow: hidden;
    padding: 3px 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shopping-item-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.shopping-mini {
    background: var(--nx-surface-solid);
    border: 1px solid var(--nx-outline);
    border-radius: 10px;
    color: var(--nx-muted);
    font-size: .75rem;
    font-weight: 760;
    min-height: 32px;
    min-width: 32px;
    padding: 0 8px;
}

.shopping-mini:disabled {
    opacity: .5;
}

.nexo-empty-state {
    background: rgba(255, 255, 255, .7);
    border: 1px dashed rgba(53, 37, 205, .22);
    border-radius: 16px;
    display: grid;
    gap: 6px;
    padding: 14px;
}

.nexo-empty-state span {
    color: var(--nx-primary);
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.nexo-empty-state strong {
    color: var(--nx-ink);
    font-size: 1rem;
}

.nexo-empty-state p {
    color: var(--nx-muted);
    font-size: .84rem;
    font-weight: 700;
    margin: 0;
}

.nexo-empty-state-actions {
    margin-top: 4px;
}

.shopping-mini.danger {
    color: var(--danger);
}

.shopping-recurring-list {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.shopping-recurring-card {
    background: rgba(255, 255, 255, .74);
    border: 1px solid var(--nx-outline);
    border-radius: 13px;
    display: grid;
    gap: 8px;
    padding: 11px;
}

.shopping-recurring-top {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.shopping-recurring-top strong {
    font-size: .92rem;
}

.shopping-recurring-meta {
    color: var(--nx-muted);
    font-size: .74rem;
}

.shopping-recurring-actions {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.shopping-recurring-primary {
    min-height: 36px;
    padding: 0 12px;
}

.shopping-recurring-menu summary {
    background: var(--nx-surface-solid);
    border: 1px solid var(--nx-outline);
    border-radius: 10px;
    color: var(--nx-muted);
    cursor: pointer;
    font-size: .75rem;
    font-weight: 760;
    list-style: none;
    min-height: 32px;
    padding: 6px 10px;
}

.shopping-recurring-menu summary::-webkit-details-marker {
    display: none;
}

.shopping-recurring-menu[open] summary {
    border-color: rgba(53, 37, 205, .28);
    color: var(--nx-primary);
}

.shopping-recurring-menu-body {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    margin-top: 8px;
}

.shopping-recipe-ingredient-editor {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr);
}

.shopping-recipe-draft-list,
.shopping-recipe-detail-list {
    display: grid;
    gap: 8px;
}

.nexo-icon {
    height: 18px;
    width: 18px;
}

.tone-health {
    border-color: rgba(77, 182, 172, .35);
}

.tone-finance {
    border-color: rgba(5, 150, 105, .33);
}

.tone-wardrobe {
    border-color: rgba(251, 113, 133, .32);
}

.tone-shopping {
    border-color: rgba(53, 37, 205, .34);
}

.myinvestor-list {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.myinvestor-row {
    align-items: center;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--nx-outline);
    border-radius: 13px;
    color: var(--nx-text);
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 10px;
    text-align: left;
    width: 100%;
}

.myinvestor-row.as-button {
    cursor: pointer;
}

.myinvestor-row strong,
.myinvestor-row span {
    display: block;
    font-size: .9rem;
    font-weight: 820;
}

.myinvestor-row small {
    color: var(--nx-muted);
    display: block;
    font-size: .74rem;
    margin-top: 3px;
}

.myinvestor-bars {
    display: grid;
    gap: 9px;
    margin-top: 10px;
}

.myinvestor-bar-row {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 54px minmax(0, 1fr) auto;
}

.myinvestor-bar-row span,
.myinvestor-bar-row strong {
    font-size: .76rem;
    font-weight: 780;
}

.myinvestor-bar-row div {
    background: rgba(53, 37, 205, .08);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.myinvestor-bar-row i {
    background: var(--nx-primary);
    border-radius: inherit;
    display: block;
    height: 100%;
}

.myinvestor-bar-row i.negative {
    background: #b42318;
}

.tone-indigo {
    border-color: rgba(53, 37, 205, .22);
}

.bottom-nav {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, .88);
    border-top: 1px solid var(--nx-outline);
    bottom: 0;
    box-shadow: 0 -8px 24px rgba(14, 16, 28, .07);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    left: 0;
    min-height: 70px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    z-index: 85;
}

.app-loading-overlay {
    align-items: center;
    backdrop-filter: blur(8px);
    background: rgba(252, 248, 255, .58);
    display: flex;
    inset: 0;
    justify-content: center;
    pointer-events: auto;
    position: fixed;
    z-index: 2000;
}

.app-loading-card {
    align-items: center;
    display: flex;
    height: 106px;
    justify-content: center;
    position: relative;
    width: 106px;
}

.app-loading-card img {
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(53, 37, 205, .16);
    height: 76px;
    width: 76px;
}

.app-loading-ring {
    animation: nexo-spin .85s linear infinite;
    border: 4px solid rgba(53, 37, 205, .18);
    border-radius: 999px;
    border-top-color: var(--nx-primary);
    height: 96px;
    position: absolute;
    width: 96px;
}

@keyframes nexo-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-loading-ring {
        animation: none;
    }
}

.nav-link {
    align-items: center;
    border-radius: 10px;
    color: var(--nx-muted);
    display: grid;
    font-size: .75rem;
    font-weight: 730;
    gap: 4px;
    justify-items: center;
    min-height: 46px;
    padding: 4px;
}

.nav-link.active {
    background: rgba(53, 37, 205, .1);
    color: var(--nx-primary);
}

.notice,
.empty {
    font-size: .9rem;
    padding: 8px 2px;
}

.validation-message,
.validation-summary-errors,
.text-danger {
    color: var(--danger);
}

.auth-page,
.account-page {
    display: grid;
    gap: 14px;
}

.auth-shell {
    align-items: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(73, 190, 170, .16), transparent 32%),
        linear-gradient(180deg, #f8faf8 0%, #edf4f1 100%);
    display: grid;
    min-height: 100dvh;
    padding: max(22px, env(safe-area-inset-top)) 16px max(22px, env(safe-area-inset-bottom));
}

.login-clean {
    display: grid;
    justify-items: center;
    margin: 0 auto;
    max-width: 390px;
    width: 100%;
}

.login-brand {
    align-items: center;
    display: inline-flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 18px;
    width: 100%;
}

.login-brand img {
    border-radius: 14px;
    height: 44px;
    width: 44px;
}

.login-brand span {
    color: var(--nx-ink);
    font-size: 1.2rem;
    font-weight: 800;
}

.login-card {
    display: grid;
    gap: 12px;
    padding: 22px;
    width: 100%;
}

.login-field {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

.login-field label {
    color: var(--nx-muted);
    font-size: .82rem;
    font-weight: 700;
}

.login-remember {
    align-items: center;
    color: var(--nx-muted);
    display: flex;
    font-size: .86rem;
    font-weight: 700;
    gap: 10px;
    margin: 2px 0 10px;
}

.login-remember input {
    accent-color: var(--nx-primary);
    height: 18px;
    width: 18px;
}

.login-submit {
    border: 0;
    margin-top: 4px;
    width: 100%;
}

.auth-grid,
.account-grid {
    display: grid;
    gap: 10px;
}

.auth-panel,
.account-card {
    background: var(--nx-surface);
    border: 1px solid var(--nx-outline);
    border-radius: 16px;
    padding: 14px;
}

.auth-panel .btn-primary {
    background: var(--nx-primary);
    border-color: var(--nx-primary);
}

.account-nav .nav {
    gap: 6px;
}

.account-nav .nav-link {
    border: 1px solid var(--nx-outline);
    border-radius: 10px;
    color: var(--nx-text);
    margin: 0;
    padding: 10px 12px;
}

.account-nav .nav-link.active {
    background: rgba(53, 37, 205, .12);
    border-color: rgba(53, 37, 205, .22);
    color: var(--nx-primary);
}

.accounts-tabs {
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.accounts-section-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 4px 2px 0;
}

.accounts-section-heading h2 {
    font-size: 1.05rem;
    margin: 0;
}

.accounts-section-heading span {
    color: var(--nx-primary);
    font-size: .78rem;
    font-weight: 800;
}

.accounts-board {
    gap: 10px;
}

.accounts-list-card {
    align-items: center;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.accounts-list-main {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0;
    text-align: left;
    width: 100%;
}

.accounts-avatar {
    align-items: center;
    background: linear-gradient(135deg, rgba(53, 37, 205, .18), rgba(73, 190, 170, .16));
    border-radius: 16px;
    color: var(--nx-primary);
    display: inline-grid;
    font-size: .78rem;
    font-weight: 900;
    height: 44px;
    justify-items: center;
    width: 44px;
}

.accounts-list-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.accounts-list-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.accounts-list-copy small,
.accounts-list-copy em {
    color: var(--nx-muted);
    font-size: .76rem;
    font-style: normal;
}

.accounts-list-money {
    font-size: .9rem;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.accounts-list-actions {
    display: flex;
    justify-content: flex-end;
}

.accounts-empty {
    display: grid;
    gap: 4px;
}

.accounts-summary-card {
    background:
        radial-gradient(circle at 88% 12%, rgba(255, 255, 255, .7), transparent 34%),
        linear-gradient(135deg, rgba(53, 37, 205, .12), rgba(73, 190, 170, .12));
    border: 1px solid rgba(53, 37, 205, .12);
    border-radius: 22px;
    box-shadow: 0 18px 44px rgba(35, 28, 90, .08);
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
    padding: 18px;
}

.accounts-summary-card > span {
    color: var(--nx-muted);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.accounts-summary-card > strong {
    color: var(--nx-ink);
    font-size: clamp(1.55rem, 6vw, 2.1rem);
    line-height: 1;
}

.accounts-summary-card > small {
    color: var(--nx-muted);
    font-weight: 700;
}

.accounts-summary-actions {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

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

.accounts-balance-card {
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--nx-outline);
    border-radius: 16px;
    display: grid;
    gap: 4px;
    padding: 12px;
}

.accounts-balance-card span,
.accounts-balance-card small {
    color: var(--nx-muted);
    font-size: .78rem;
    font-weight: 700;
}

.accounts-balance-card strong {
    font-size: 1.1rem;
}

.accounts-debt-list,
.accounts-recurring-list {
    margin-top: 10px;
}

.accounts-debt-row,
.accounts-recurring-row {
    align-items: center;
}

.accounts-share-summary {
    background: rgba(53, 37, 205, .06);
    border: 1px solid rgba(53, 37, 205, .12);
    border-radius: 16px;
    display: grid;
    gap: 6px;
    margin-top: 12px;
    padding: 12px;
}

.accounts-share-summary span {
    color: var(--nx-muted);
    font-size: .82rem;
    font-weight: 800;
}

.accounts-share-summary small {
    color: #2f7d55;
    font-size: .78rem;
    font-weight: 900;
}

.accounts-search {
    margin-bottom: 12px;
    min-height: 44px;
}

.accounts-recurring-form {
    margin: 12px 0;
}

.accounts-form-card .shopping-inline-form,
.accounts-recurring-form,
.accounts-movement-card .shopping-inline-form {
    display: grid;
    gap: 10px;
}

.accounts-form-card .form-control,
.accounts-form-card .form-select,
.accounts-recurring-form .form-control,
.accounts-recurring-form .form-select,
.accounts-movement-card .form-control,
.accounts-movement-card .form-select {
    min-height: 44px;
}

.accounts-form-summary {
    background: rgba(53, 37, 205, .08);
    border: 1px solid rgba(53, 37, 205, .14);
    border-radius: 14px;
    display: grid;
    gap: 3px;
    padding: 10px 12px;
}

.accounts-form-heading {
    display: grid;
    gap: 2px;
    margin: 14px 0 8px;
}

.accounts-form-heading span {
    color: var(--nx-ink);
    font-size: .92rem;
    font-weight: 900;
}

.accounts-form-heading small,
.accounts-form-hint,
.validation-message {
    color: var(--nx-muted);
    font-size: .78rem;
    font-weight: 800;
}

.accounts-form-hint,
.validation-message {
    color: #b42318;
}

.accounts-form-summary strong {
    color: var(--nx-ink);
    font-size: 1rem;
}

.accounts-form-summary small {
    color: var(--nx-muted);
    font-weight: 700;
}

.money-positive,
.pill-on {
    color: #2f7d55;
}

.money-negative,
.pill-off {
    color: #b42318;
}

.money-neutral {
    color: var(--nx-muted);
}

.calendar-tabs {
    margin: 12px 0;
}

.calendar-shell-header {
    margin-bottom: 8px;
}

.calendar-month-card {
    display: grid;
    gap: 12px;
}

.calendar-toolbar {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.calendar-toolbar > div {
    display: grid;
    gap: 2px;
    text-align: center;
}

.calendar-toolbar span,
.calendar-modal-eyebrow,
.calendar-form-hint {
    color: var(--nx-muted);
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.calendar-toolbar strong {
    color: var(--nx-ink);
    font-size: 1.18rem;
    text-transform: capitalize;
}

.calendar-toolbar-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, .55fr) minmax(0, 1fr);
}

.calendar-weekdays,
.calendar-month-grid {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays span {
    color: var(--nx-muted);
    font-size: .68rem;
    font-weight: 900;
    text-align: center;
}

.calendar-day-cell {
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--nx-outline);
    border-radius: 14px;
    display: grid;
    gap: 4px;
    min-height: 92px;
    padding: 6px;
}

.calendar-day-cell.muted {
    opacity: .48;
}

.calendar-day-cell.today {
    border-color: rgba(53, 37, 205, .38);
    box-shadow: 0 0 0 2px rgba(53, 37, 205, .08);
}

.calendar-day-cell.selected {
    background: rgba(53, 37, 205, .08);
}

.calendar-day-cell.has-events {
    border-color: rgba(73, 190, 170, .3);
}

.calendar-day-button,
.calendar-event-pill,
.calendar-more-pill,
.calendar-agenda-button,
.calendar-event-detail-trigger {
    background: transparent;
    border: 0;
    color: inherit;
    padding: 0;
    text-align: left;
}

.calendar-day-button {
    display: grid;
    gap: 1px;
}

.calendar-day-button span {
    color: var(--nx-ink);
    font-size: .86rem;
    font-weight: 900;
}

.calendar-day-button small {
    color: var(--nx-muted);
    font-size: .58rem;
    font-weight: 800;
}

.calendar-day-events {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.calendar-event-pill,
.calendar-more-pill {
    border-radius: 999px;
    font-size: .62rem;
    font-weight: 850;
    line-height: 1.15;
    min-width: 0;
    overflow: hidden;
    padding: 3px 5px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event-pill {
    background: rgba(53, 37, 205, .11);
    color: var(--nx-primary);
}

.calendar-event-pill.recurring {
    background: rgba(47, 125, 85, .12);
    color: #2f7d55;
}

.calendar-event-pill.exception {
    border: 1px solid rgba(180, 35, 24, .24);
}

.calendar-more-pill {
    color: var(--nx-muted);
}

.calendar-agenda-button {
    width: 100%;
}

.calendar-recurring-card {
    align-items: center;
}

.calendar-modal-backdrop {
    align-items: flex-end;
    background: rgba(20, 18, 35, .34);
    display: flex;
    inset: 0;
    padding: 14px;
    position: fixed;
    z-index: 30;
}

.calendar-modal {
    border-radius: 22px 22px 18px 18px;
    display: grid;
    gap: 12px;
    max-height: min(82vh, 720px);
    overflow: auto;
    padding: 16px;
    width: 100%;
}

.calendar-modal h2 {
    margin: 0;
}

.calendar-event-detail-trigger {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.calendar-event-detail-trigger small,
.calendar-form-hint {
    text-transform: none;
}

.calendar-reminder-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.calendar-form {
    display: grid;
    gap: 10px;
}

.calendar-form .form-control,
.calendar-form .form-select {
    min-height: 44px;
}

.calendar-weekday-picker {
    max-height: 220px;
    overflow: auto;
}

@media (min-width: 780px) {
    .calendar-day-cell {
        min-height: 124px;
    }

    .calendar-event-pill,
    .calendar-more-pill {
        font-size: .72rem;
    }

    .calendar-modal-backdrop {
        align-items: center;
        justify-content: center;
    }

    .calendar-modal {
        max-width: 620px;
    }
}

#blazor-error-ui {
    background: #fff7ed;
    border-top: 1px solid #fed7aa;
    bottom: calc(78px + env(safe-area-inset-bottom));
    display: none;
    left: 0;
    padding: 12px 16px;
    position: fixed;
    right: 0;
    z-index: 1000;
}

@media (min-width: 500px) {
    .shell-content {
        padding-left: 16px;
        padding-right: 16px;
    }

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

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

    .bento-main {
        grid-column: span 2;
    }

    .shopping-list-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .weight-insights-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 760px) {
    .metric-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .shopping-list-board {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .auth-grid,
    .account-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .account-grid {
        grid-template-columns: minmax(210px, .9fr) minmax(0, 2.1fr);
    }

    .weight-insights-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 980px) {
    .shell-content {
        padding-top: 108px;
    }

    .bottom-nav {
        border: 1px solid var(--nx-outline);
        border-radius: 16px;
        bottom: 18px;
        left: 50%;
        max-width: 520px;
        right: auto;
        transform: translateX(-50%);
        width: calc(100% - 32px);
    }
}

.baby-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(232,248,239,.86));
}

.baby-hero h2 {
    margin: .15rem 0;
}

.baby-hero p {
    margin: 0;
    color: var(--text-muted);
}

.baby-week-actions,
.baby-selector {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
}

.baby-chip {
    border: 1px solid rgba(24, 49, 36, .12);
    background: rgba(255,255,255,.72);
    border-radius: 999px;
    padding: .55rem .85rem;
    font-weight: 800;
    color: var(--text-main);
}

.baby-chip.active {
    background: #193b2b;
    color: #fff;
    box-shadow: 0 10px 24px rgba(25, 59, 43, .18);
}

.baby-chip.add {
    border-style: dashed;
}

.baby-tabs {
    margin-top: .9rem;
}

.baby-week-board {
    display: grid;
    gap: .85rem;
}

.baby-day-card {
    padding: .9rem;
    border: 1px solid rgba(24, 49, 36, .08);
}

.baby-day-card.today {
    outline: 2px solid rgba(39, 132, 85, .28);
}

.baby-day-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: .75rem;
}

.baby-day-head span {
    color: var(--text-muted);
    font-size: .86rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.baby-slot-list,
.baby-recipe-list {
    display: grid;
    gap: .65rem;
}

.baby-slot-card,
.baby-recipe-main {
    width: 100%;
    border: 1px solid rgba(24, 49, 36, .1);
    border-radius: 18px;
    padding: .78rem .85rem;
    text-align: left;
    background: rgba(255,255,255,.82);
    display: grid;
    gap: .2rem;
    color: var(--text-main);
}

.baby-slot-card.filled {
    background: linear-gradient(135deg, rgba(239, 251, 244, .96), rgba(255, 255, 255, .88));
    border-color: rgba(39, 132, 85, .22);
}

.baby-slot-card strong,
.baby-recipe-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.baby-slot-card span,
.baby-slot-card small,
.baby-recipe-main small,
.baby-assignment-preview {
    color: var(--text-muted);
}

.baby-info {
    justify-self: start;
    margin-top: -.35rem;
}

.baby-recipe-card {
    border: 1px solid rgba(24, 49, 36, .08);
    border-radius: 20px;
    padding: .7rem;
    background: rgba(255,255,255,.62);
    display: grid;
    gap: .6rem;
}

.baby-recipe-main {
    grid-template-columns: auto 1fr;
    align-items: center;
}

.baby-protein {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(39, 132, 85, .12);
    color: #193b2b;
    font-size: .72rem;
    font-weight: 900;
}

.baby-ingredient-editor {
    display: grid;
    gap: .5rem;
}

@media (min-width: 780px) {
    .baby-week-board {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .baby-day-card {
        min-height: 14rem;
    }

    .baby-ingredient-editor {
        grid-template-columns: 1fr .7fr auto;
        align-items: center;
    }
}

.baby-week-actions {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.baby-week-actions .shopping-mini {
    min-width: 2.4rem;
}

.baby-field-label {
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.baby-help {
    display: block;
    margin-top: -.35rem;
    color: var(--text-muted);
}

.baby-ingredient-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding-top: .35rem;
}

.baby-ingredient-head div {
    display: grid;
    gap: .1rem;
}

.baby-ingredient-head small {
    color: var(--text-muted);
}

.baby-ingredient-list {
    display: grid;
    gap: .55rem;
}

.baby-ingredient-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
    padding: .65rem;
    border: 1px solid rgba(24, 49, 36, .09);
    border-radius: 18px;
    background: rgba(255,255,255,.72);
}

.baby-protein-form {
    align-items: end;
}

@media (min-width: 640px) {
    .baby-ingredient-row {
        grid-template-columns: 1fr .65fr auto;
        align-items: center;
    }
}

@media (max-width: 520px) {
    .baby-hero {
        align-items: stretch;
    }

    .baby-week-actions {
        justify-content: space-between;
    }
}

/* Keep modal actions above bottom navigation on mobile/PWA. */
.calendar-modal-backdrop {
    padding: 14px 14px calc(96px + env(safe-area-inset-bottom));
}

.calendar-modal {
    max-height: calc(100dvh - 124px - env(safe-area-inset-bottom));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.calendar-modal .primary-action:last-child,
.calendar-modal form > .primary-action:last-child {
    margin-bottom: 8px;
}

@media (min-width: 780px) {
    .calendar-modal-backdrop {
        padding: 14px;
    }

    .calendar-modal {
        max-height: min(82vh, 720px);
    }
}
