:root {
    --background: #FCF7F1;
    --surface: #FFFDFC;
    --surface-soft: #FFF3EA;
    --primary: #FF8B72;
    --primary-dark: #E96F59;
    --pink: #F7A6B5;
    --lavender: #DCCBF1;
    --sage: #A8C89F;
    --sage-dark: #7FA675;
    --text: #3F302C;
    --text-muted: #8A6E65;
    --border: #EED9CC;
    --danger: #E66D61;
    --shadow: 0 10px 30px rgba(102, 71, 60, 0.10);
    --shadow-soft: 0 14px 32px rgba(102, 71, 60, 0.08);
    --ring-coral: 0 0 0 4px rgba(255, 139, 114, 0.14);
    --ring-sage: 0 0 0 4px rgba(168, 200, 159, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    background: var(--background);
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Avenir Next", "Nunito Sans", "Segoe UI", Helvetica, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(247, 166, 181, 0.16), transparent 24%),
        radial-gradient(circle at top right, rgba(220, 203, 241, 0.20), transparent 26%),
        linear-gradient(180deg, #fffaf6 0%, var(--background) 100%);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease, opacity 0.22s ease;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    transition: background-color 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

a:active,
button:active {
    transform: scale(0.985);
}

.app-shell {
    padding-bottom: 0;
}

.page-shell {
    min-height: 100vh;
    max-width: 760px;
    margin: 0 auto;
    padding: 1.15rem 1rem calc(7.9rem + env(safe-area-inset-bottom));
}

.topbar {
    margin-bottom: 1.35rem;
}

.eyebrow {
    margin: 0 0 0.45rem;
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.brand {
    margin: 0;
    color: var(--text);
    font-family: "Brush Script MT", "Snell Roundhand", "Segoe Script", cursive;
    font-size: clamp(2.3rem, 6vw, 3.1rem);
    line-height: 1;
}

.content,
.dashboard-grid,
.dose-form,
.history-section,
.dose-list,
.progress-list,
.progress-summary {
    display: grid;
    gap: 1rem;
}

.content > * {
    animation: fade-up 0.28s ease both;
}

.hero-card,
.info-card,
.dashboard-card,
.summary-card,
.dose-card,
.progress-card,
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.hero-card,
.info-card,
.dashboard-card,
.summary-card,
.dose-card,
.progress-card {
    padding: 1.2rem;
}

.form-card {
    padding: 1rem;
    background: rgba(255, 253, 252, 0.95);
}

.hero-card-home,
.hero-card-dose-history,
.hero-card-progress-history,
.hero-card-history,
.hero-card-dose-form,
.hero-card-progress-form,
.settings-form-shell,
.dashboard-card {
    position: relative;
    overflow: hidden;
}

.hero-card-home::after,
.hero-card-dose-history::after,
.hero-card-progress-history::after,
.hero-card-history::after,
.hero-card-dose-form::after,
.hero-card-progress-form::after,
.dashboard-card::after {
    content: "";
    position: absolute;
    top: -1rem;
    right: -1rem;
    width: 5.8rem;
    height: 5.8rem;
    border-radius: 999px;
    opacity: 0.55;
    pointer-events: none;
}

.hero-card-home::after,
.dashboard-card-dose::after {
    background: rgba(255, 139, 114, 0.18);
}

body:has(.hero-card-home) .topbar {
    display: none;
}

body:has(.dashboard-home-header) .topbar {
    display: none;
}

.hero-card::before,
.history-section-header::before {
    content: "";
    display: inline-block;
    width: 2.1rem;
    height: 0.22rem;
    margin-bottom: 0.9rem;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), rgba(255, 139, 114, 0.18));
}

.hero-card-dose-history::after,
.hero-card-dose-form::after {
    background: rgba(247, 166, 181, 0.22);
}

.hero-card-progress-history::after,
.hero-card-progress-form::after,
.dashboard-card-accent::after,
.summary-card-wide::after {
    background: rgba(168, 200, 159, 0.26);
}

.hero-card-history::after,
.dashboard-card-weight::after {
    background: rgba(220, 203, 241, 0.30);
}

.section-label {
    margin: 0 0 0.45rem;
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-card h2,
.info-card h3,
.history-section-header h3,
.measure-group h3 {
    margin: 0 0 0.7rem;
    color: var(--text);
    line-height: 1.16;
}

.hero-card h2 {
    font-size: clamp(1.65rem, 5vw, 2.2rem);
    letter-spacing: -0.03em;
}

.info-card h3,
.history-section-header h3,
.measure-group h3 {
    font-size: 1.06rem;
}

.hero-card p,
.info-card p,
.dose-details p,
.progress-measures p,
.dashboard-note,
.dashboard-support,
.dashboard-caption,
.dashboard-empty {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.hero-decoration {
    position: absolute;
    right: 1.2rem;
    bottom: 1rem;
    color: rgba(233, 111, 89, 0.78);
    font-size: 0.95rem;
}

.flash-stack {
    display: grid;
    gap: 0.8rem;
}

.flash-message {
    padding: 1rem 1.05rem;
    background: rgba(255, 243, 234, 0.95);
    border: 1px solid rgba(255, 139, 114, 0.24);
    border-radius: 18px;
    color: var(--primary-dark);
    box-shadow: 0 8px 22px rgba(102, 71, 60, 0.08);
    font-weight: 700;
}

.primary-button,
.secondary-link,
.edit-link,
.nav-link,
.delete-button {
    -webkit-tap-highlight-color: transparent;
}

.primary-button,
.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 3.15rem;
    border-radius: 999px;
    font-size: 0.97rem;
    font-weight: 800;
}

.primary-button {
    margin-top: 1rem;
    padding: 0.88rem 1.3rem;
    border: 0;
    color: #fffdfa;
    box-shadow: 0 10px 22px rgba(102, 71, 60, 0.12);
    cursor: pointer;
}

.dose-button,
.hero-card-dose-history .primary-button {
    background: var(--primary);
}

.progress-button,
.hero-card-progress-history .primary-button {
    background: var(--sage-dark);
}

.secondary-link {
    color: var(--text-muted);
}

.back-link {
    justify-content: center;
    width: 100%;
}

.dashboard-grid-home {
    gap: 1rem;
}

.hero-card-home {
    gap: 0.75rem;
    padding-bottom: 1.55rem;
}

.hero-card-home h2 {
    max-width: 14ch;
    margin-bottom: 0;
}

.hero-card-home .section-label {
    margin-bottom: 0;
}

.hero-card-home::before {
    width: 2.4rem;
}

.hero-card-home .settings-link {
    margin-top: 0.15rem;
}

.dashboard-welcome {
    background:
        linear-gradient(180deg, rgba(255, 253, 252, 0.94), rgba(255, 246, 238, 0.95)),
        var(--surface);
}

.dashboard-intro {
    max-width: 24ch;
    font-size: 0.98rem;
}

.dashboard-home-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0.1rem 0.4rem;
}

.dashboard-home-header-copy h2 {
    margin: 0;
    color: #1f1715;
    font-size: clamp(2rem, 7vw, 2.8rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.dashboard-home-header-copy p {
    margin: 0.5rem 0 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.dashboard-home-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.dashboard-header-button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 251, 247, 0.76);
    border: 1px solid rgba(238, 217, 204, 0.56);
    color: #8e7368;
    box-shadow: 0 6px 18px rgba(102, 71, 60, 0.06);
}

.dashboard-header-button:hover {
    background: rgba(255, 248, 242, 0.92);
    color: #755e55;
}

.dashboard-header-button .icon {
    width: 18px;
    height: 18px;
}

.dashboard-summary-card {
    position: relative;
    display: grid;
    gap: 1.2rem;
    padding: 1.25rem 1.15rem 1rem;
    background: rgba(255, 253, 250, 0.92);
    border: 1px solid rgba(244, 203, 183, 0.86);
    border-radius: 28px;
    box-shadow: 0 16px 40px rgba(102, 71, 60, 0.09);
    overflow: hidden;
}

.dashboard-summary-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.85), transparent 38%),
        radial-gradient(circle at bottom right, rgba(255, 239, 229, 0.56), transparent 36%);
    pointer-events: none;
}

.dashboard-summary-top,
.dashboard-goal-track,
.dashboard-dose-panels,
.dashboard-summary-empty {
    position: relative;
    z-index: 1;
}

.dashboard-summary-top {
    display: block;
}

.dashboard-summary-label-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

.dashboard-summary-label-icon {
    width: 34px;
    height: 34px;
}

.dashboard-summary-label {
    letter-spacing: 0.06em;
}

.dashboard-summary-copy h3 {
    margin: 0;
    color: #201817;
    font-size: clamp(1.9rem, 7vw, 2.7rem);
    line-height: 1.03;
    letter-spacing: -0.05em;
}

.dashboard-summary-weeks {
    margin: 0.55rem 0 0;
    color: #5b5048;
    font-size: 0.98rem;
    line-height: 1.4;
}

.dashboard-summary-message {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 1rem 0 0;
    color: #5b5048;
    font-size: 1.03rem;
    line-height: 1.45;
}

.dashboard-summary-message::before {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 999px 999px 999px 0;
    background:
        linear-gradient(180deg, rgba(147, 197, 114, 0.9), rgba(115, 174, 101, 0.82));
    transform: rotate(-45deg);
    box-shadow: inset -4px -4px 0 rgba(255, 255, 255, 0.18);
    flex: 0 0 auto;
}

.dashboard-goal-track {
    display: grid;
    gap: 0.85rem;
}

.dashboard-goal-bar {
    position: relative;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #ff8b72 0%, #f5a6ba 34%, #c8c79b 68%, #7dc18f 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.dashboard-goal-fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255, 131, 104, 0.22), rgba(111, 188, 131, 0.14));
}

.dashboard-goal-marker {
    position: absolute;
    top: 50%;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #63b882;
    border: 3px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 6px 16px rgba(88, 159, 109, 0.22);
    transform: translate(-50%, -50%);
}

.dashboard-goal-legend {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.dashboard-goal-legend-label {
    margin: 0;
    color: #826d63;
    font-size: 0.82rem;
    font-weight: 700;
}

.dashboard-goal-legend-value {
    margin: 0.22rem 0 0;
    color: #312423;
    font-size: 0.98rem;
    font-weight: 800;
}

.dashboard-goal-legend-current .dashboard-goal-legend-label,
.dashboard-goal-legend-current .dashboard-goal-legend-value {
    color: #4fa06a;
}

.dashboard-summary-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    background: rgba(255, 248, 242, 0.74);
    border: 1px solid rgba(238, 217, 204, 0.72);
}

.dashboard-summary-empty p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.45;
}

.dashboard-dose-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid rgba(244, 203, 183, 0.72);
    padding-top: 1rem;
}

.dashboard-dose-panel {
    display: flex;
    gap: 0.9rem;
    padding: 0.05rem 0.2rem 0.05rem 0;
}

.dashboard-dose-panel + .dashboard-dose-panel {
    padding-left: 1rem;
    border-left: 1px solid rgba(244, 203, 183, 0.72);
}

.dashboard-dose-panel-icon {
    width: 52px;
    height: 52px;
}

.dashboard-dose-panel-title,
.dashboard-dose-panel-copy {
    margin: 0;
}

.dashboard-dose-panel-title {
    color: #1f1715;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.35;
}

.dashboard-dose-panel-copy {
    margin-top: 0.2rem;
    color: #5c5148;
    font-size: 0.95rem;
}

.dashboard-grid-refined {
    gap: 1rem;
}

.dashboard-metric-card {
    min-height: 0;
    padding: 1.15rem;
    border-radius: 24px;
    box-shadow: 0 14px 36px rgba(102, 71, 60, 0.07);
}

.dashboard-metric-card-weight {
    background:
        radial-gradient(circle at 85% 18%, rgba(220, 203, 241, 0.22), transparent 25%),
        linear-gradient(180deg, rgba(247, 243, 255, 0.98), rgba(251, 248, 255, 0.94));
}

.dashboard-card-theme-lavender {
    color: #7d66aa;
}

.dashboard-card-theme-sage {
    color: #58a26d;
}

.dashboard-card-theme-gold {
    color: #ee9b17;
}

.dashboard-card-theme-pink {
    color: #e96b88;
}

.dashboard-imc-icon {
    background: rgba(255, 198, 77, 0.16);
    color: #e59b1a;
}

.dashboard-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3rem;
    margin-top: auto;
    padding: 0.8rem 1rem;
    border-radius: 18px;
    font-weight: 800;
}

.dashboard-card-cta::after {
    content: "›";
    font-size: 1.35rem;
    line-height: 1;
}

.dashboard-card-cta-sage {
    background: rgba(88, 162, 109, 0.10);
    color: #4b9a62;
}

.dashboard-card-cta-pink {
    background: rgba(233, 107, 136, 0.10);
    color: #ea667f;
}

.dashboard-weight-change {
    color: #7a67b2;
}

.dashboard-weight-change-loss {
    color: #7a67b2;
}

.dashboard-weight-sparkline {
    margin-top: auto;
    padding-top: 0.4rem;
}

.dashboard-weight-sparkline-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.dashboard-weight-sparkline-line {
    fill: none;
    stroke: #9f87df;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dashboard-weight-sparkline-dot {
    fill: #a590e0;
}

.dashboard-weight-sparkline-dot-last {
    fill: #8a73d1;
}

.dashboard-bmi-scale {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr 0.85fr;
    gap: 0.35rem;
    margin-top: auto;
    padding-top: 0.3rem;
}

.dashboard-bmi-segment {
    height: 14px;
    border-radius: 999px;
}

.dashboard-bmi-segment-low {
    background: #a4d5ab;
}

.dashboard-bmi-segment-mid {
    background: #d9d88e;
}

.dashboard-bmi-segment-high {
    background: #ffc44d;
}

.dashboard-bmi-segment-alert {
    background: #ff7963;
}

.dashboard-bmi-marker {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff6ea;
    border: 3px solid #b56c34;
    transform: translate(-50%, -50%);
}

.dashboard-photo-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: center;
}

.dashboard-photo-preview-small {
    aspect-ratio: 1 / 1;
    height: 92px;
}

.dashboard-photo-meta {
    display: grid;
    gap: 0.2rem;
}

.dashboard-photo-meta-title {
    margin: 0;
    color: #211917;
    font-size: 0.98rem;
    font-weight: 700;
}

.dashboard-actions-card-refined {
    gap: 0.95rem;
    border-radius: 26px;
    background: rgba(255, 253, 251, 0.94);
}

.dashboard-action-button-lavender {
    background: rgba(247, 243, 255, 0.92);
    color: #6451a8;
}

.dashboard-action-button-sage {
    background: rgba(243, 251, 245, 0.96);
    color: #4c9f64;
}

.dashboard-action-button-pink {
    background: rgba(255, 246, 248, 0.96);
    color: #e66a86;
}

.dashboard-action-button-coral {
    background: rgba(255, 248, 242, 0.96);
    color: #e96f59;
}

.dashboard-milestone-card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: center;
    padding: 1.1rem 1.15rem;
    background: rgba(255, 252, 249, 0.95);
    border: 1px solid rgba(244, 203, 183, 0.8);
    border-radius: 26px;
    box-shadow: 0 14px 34px rgba(102, 71, 60, 0.07);
    overflow: hidden;
}

.dashboard-milestone-icon {
    color: #eb6d56;
}

.dashboard-milestone-copy p {
    margin: 0;
}

.dashboard-milestone-copy .summary-label {
    margin-bottom: 0.2rem;
}

.dashboard-milestone-copy p:last-child {
    color: #2c211f;
    font-size: 1.02rem;
    font-weight: 700;
    line-height: 1.4;
}

.dashboard-milestone-decoration {
    position: absolute;
    right: 1.1rem;
    bottom: -0.25rem;
    width: 92px;
    height: 56px;
    border-radius: 100% 100% 0 0;
    background: linear-gradient(180deg, rgba(255, 208, 190, 0.8), rgba(255, 183, 153, 0.75));
    opacity: 0.8;
}

.hero-card-home .hero-decoration {
    right: 1.25rem;
    bottom: 1rem;
    width: 4.1rem;
    height: 4.1rem;
    color: transparent;
}

.hero-card-home .hero-decoration::before,
.hero-card-home .hero-decoration::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    opacity: 0.55;
}

.hero-card-home .hero-decoration::before {
    right: 0.7rem;
    bottom: 0.1rem;
    width: 1.15rem;
    height: 2.5rem;
    border: 2px solid rgba(127, 166, 117, 0.38);
    border-left: 0;
    border-bottom: 0;
    transform: rotate(28deg);
}

.hero-card-home .hero-decoration::after {
    right: 0;
    bottom: 1.1rem;
    width: 0.78rem;
    height: 1.1rem;
    background: rgba(168, 200, 159, 0.28);
    box-shadow:
        -0.95rem 0.55rem 0 0 rgba(168, 200, 159, 0.22),
        -1.35rem 1.3rem 0 0 rgba(220, 203, 241, 0.28);
    transform: rotate(30deg);
}

.dashboard-card {
    display: grid;
    align-content: start;
    gap: 0.62rem;
    min-height: 12.25rem;
    padding-top: 1rem;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0));
}

.dashboard-card-dose {
    background-color: #FFF7F1;
}

.dashboard-card-weight {
    background-color: #FBF7FF;
}

.dashboard-card-bmi,
.summary-card-bmi {
    background-color: #FCF4F9;
}

.dashboard-card-accent,
.summary-card-wide,
.summary-card-change-block {
    background-color: #F7FCF6;
}

.dashboard-card::before,
.summary-card::before {
    content: "";
    width: 3rem;
    height: 0.28rem;
    border-radius: 999px;
    background: rgba(255, 139, 114, 0.18);
}

.dashboard-card-dose::before {
    background: rgba(255, 139, 114, 0.48);
}

.dashboard-card-weight::before,
.summary-card-current::before,
.summary-card-bmi::before {
    background: rgba(220, 203, 241, 0.7);
}

.dashboard-card-change::before,
.summary-card-change-block::before,
.summary-card-initial::before {
    background: rgba(168, 200, 159, 0.65);
}

.dashboard-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 0.15rem;
}

.summary-label {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dashboard-value,
.summary-value,
.summary-change {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.75rem, 6vw, 2.2rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.dashboard-support {
    font-weight: 700;
    font-size: 0.9rem;
}

.dashboard-caption,
.dashboard-note,
.intro-text {
    font-size: 0.9rem;
}

.dashboard-note-home {
    padding: 0 0.2rem;
    text-align: center;
}

.dashboard-grid-progress {
    gap: 0.9rem;
}

.dashboard-overview-card,
.dashboard-actions-card {
    display: grid;
    gap: 1rem;
    padding: 1.2rem;
    background: linear-gradient(180deg, rgba(255, 248, 242, 0.96), rgba(255, 253, 251, 0.92));
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.dashboard-overview-card {
    position: relative;
    overflow: hidden;
}

.dashboard-overview-card::after {
    content: "";
    position: absolute;
    top: -1.4rem;
    right: -1.2rem;
    width: 6rem;
    height: 6rem;
    border-radius: 999px;
    background: rgba(247, 166, 181, 0.15);
}

.dashboard-overview-header,
.dashboard-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
}

.dashboard-overview-header h3 {
    margin: 0.2rem 0 0;
    font-size: clamp(1.55rem, 5.3vw, 2rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
}

.dashboard-overview-icon {
    width: 48px;
    height: 48px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.78);
}

.dashboard-progressbar {
    position: relative;
    height: 12px;
    background: rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(238, 217, 204, 0.75);
}

.dashboard-progressbar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255, 139, 114, 0.92), rgba(247, 166, 181, 0.88) 48%, rgba(168, 200, 159, 0.9));
    box-shadow: 0 6px 16px rgba(233, 111, 89, 0.22);
}

.dashboard-overview-meta {
    display: grid;
    gap: 0.85rem;
}

.dashboard-overview-block {
    display: grid;
    gap: 0.25rem;
    padding: 0.92rem 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(238, 217, 204, 0.72);
}

.dashboard-overview-label {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.dashboard-overview-copy,
.dashboard-overview-dose {
    margin: 0;
}

.dashboard-overview-dose {
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 800;
}

.dashboard-overview-dose-today {
    color: var(--primary-dark);
}

.dashboard-mini-card {
    min-height: 0;
    gap: 0.8rem;
    padding: 1rem;
}

.dashboard-mini-icon {
    width: 36px;
    height: 36px;
}

.dashboard-mini-value {
    margin: 0;
    color: var(--text);
    font-size: clamp(1.45rem, 5.4vw, 1.85rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.dashboard-mini-copy,
.dashboard-inline-link {
    margin: 0;
    font-size: 0.92rem;
}

.dashboard-mini-copy {
    color: var(--text-muted);
    line-height: 1.5;
}

.dashboard-inline-link {
    width: fit-content;
    color: var(--primary-dark);
    font-weight: 800;
}

.dashboard-bmi-copy {
    color: var(--text);
    font-weight: 800;
}

.dashboard-bmi-pill {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.dashboard-bmi-pill-sage {
    background: var(--sage);
}

.dashboard-bmi-pill-coral {
    background: var(--primary);
}

.dashboard-bmi-pill-pink {
    background: var(--pink);
}

.dashboard-bmi-pill-lavender,
.dashboard-bmi-pill-muted {
    background: var(--lavender);
}

.dashboard-measure-stack {
    display: grid;
    gap: 0.55rem;
}

.dashboard-card-measure-compare {
    gap: 0.95rem;
}

.dashboard-empty-state-inline {
    display: grid;
    gap: 0.55rem;
}

.dashboard-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.measure-compare-list {
    display: grid;
    gap: 0.75rem;
}

.measure-compare-item {
    display: grid;
    gap: 0.6rem;
    padding: 0.88rem 0.92rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(238, 217, 204, 0.78);
}

.measure-compare-top,
.measure-compare-values {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.measure-compare-values {
    align-items: flex-end;
}

.measure-compare-zone,
.measure-compare-label,
.measure-compare-value,
.measure-compare-change {
    margin: 0;
}

.measure-compare-zone {
    color: var(--text);
    font-size: 1rem;
    font-weight: 800;
}

.measure-compare-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.measure-compare-value {
    color: var(--text);
    font-size: 1.12rem;
    font-weight: 800;
}

.measure-compare-change {
    text-align: right;
    font-size: 0.9rem;
    font-weight: 800;
}

.measure-compare-change-loss {
    color: var(--sage-dark);
}

.measure-compare-change-gain {
    color: var(--primary-dark);
}

.measure-compare-change-same {
    color: var(--text-muted);
}

.measure-compare-arrow {
    padding-bottom: 0.15rem;
    color: var(--primary-dark);
    font-size: 1.1rem;
    font-weight: 800;
}

.dashboard-measure-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 700;
}

.dashboard-measure-value-loss {
    color: var(--sage-dark);
}

.dashboard-measure-value-gain {
    color: var(--primary-dark);
}

.dashboard-photo-card {
    background-color: #FCF4F9;
}

.dashboard-photo-preview {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(247, 166, 181, 0.34);
    box-shadow: 0 10px 22px rgba(102, 71, 60, 0.08);
}

.dashboard-photo-links,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dashboard-photo-empty {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 92px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 246, 238, 0.62));
    border: 1px dashed rgba(247, 166, 181, 0.5);
}

.dashboard-photo-empty span {
    position: absolute;
    display: block;
    border-radius: 999px;
    background: rgba(247, 166, 181, 0.32);
}

.dashboard-photo-empty span:nth-child(1) {
    width: 18px;
    height: 18px;
    top: 24px;
    right: 28px;
}

.dashboard-photo-empty span:nth-child(2) {
    width: 48px;
    height: 20px;
    bottom: 24px;
    left: 24px;
    border-radius: 999px 999px 14px 14px;
    background: rgba(168, 200, 159, 0.36);
}

.dashboard-photo-empty span:nth-child(3) {
    width: 70px;
    height: 34px;
    bottom: 18px;
    right: 22px;
    border-radius: 18px 18px 12px 12px;
    background: rgba(220, 203, 241, 0.34);
}

.dashboard-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.dashboard-action-button {
    display: grid;
    justify-items: start;
    gap: 0.7rem;
    min-height: 116px;
    padding: 0.95rem;
    border: 1px solid rgba(238, 217, 204, 0.8);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.75);
    color: var(--text);
    font-size: 0.96rem;
    font-weight: 800;
    text-align: left;
    box-shadow: 0 8px 20px rgba(102, 71, 60, 0.06);
}

.dashboard-action-icon {
    width: 40px;
    height: 40px;
}

.dashboard-action-button-disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.hero-card-photo-form::after {
    background: rgba(247, 166, 181, 0.22);
}

.hero-card-photo-form::before {
    width: 2rem;
}

.form-group input[type="file"] {
    padding: 0.7rem 0.8rem;
    background: rgba(255, 249, 244, 0.95);
    cursor: pointer;
}

.form-group input[type="file"]::file-selector-button {
    margin-right: 0.85rem;
    padding: 0.72rem 0.95rem;
    border: 0;
    border-radius: 999px;
    background: rgba(247, 166, 181, 0.24);
    color: #91546e;
    font-weight: 800;
    cursor: pointer;
}

.form-helper {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.photo-history-grid,
.photo-compare-grid {
    display: grid;
    gap: 1rem;
}

.photo-history-card,
.photo-compare-card {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.photo-slider-card {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(255, 253, 251, 0.96), rgba(252, 244, 249, 0.92));
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.photo-slider-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
}

.photo-slider-badge {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: rgba(247, 166, 181, 0.18);
    color: #91546e;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.photo-slider-stage {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    border-radius: 20px;
    border: 1px solid rgba(238, 217, 204, 0.82);
    background: #fffaf6;
}

.photo-slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-slider-overlay {
    position: absolute;
    inset: 0 auto 0 0;
    width: 50%;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.7);
}

.photo-slider-overlay .photo-slider-image {
    width: 100%;
    min-width: 100%;
}

.photo-slider-divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 1px rgba(145, 84, 110, 0.08);
    transform: translateX(-50%);
}

.photo-slider-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(247, 166, 181, 0.42);
    box-shadow: 0 10px 24px rgba(102, 71, 60, 0.14);
    transform: translate(-50%, -50%);
}

.photo-slider-handle::before,
.photo-slider-handle::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid #91546e;
    border-right: 2px solid #91546e;
}

.photo-slider-handle::before {
    left: 11px;
    transform: translateY(-50%) rotate(-135deg);
}

.photo-slider-handle::after {
    right: 11px;
    transform: translateY(-50%) rotate(45deg);
}

.photo-slider-label {
    position: absolute;
    top: 0.9rem;
    z-index: 1;
    min-height: 1.9rem;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: rgba(63, 48, 44, 0.62);
    color: #fffdfa;
    font-size: 0.78rem;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.photo-slider-label-left {
    left: 0.9rem;
}

.photo-slider-label-right {
    right: 0.9rem;
}

.photo-slider-control {
    display: grid;
    gap: 0.55rem;
}

.photo-slider-range {
    width: 100%;
    accent-color: #e96f59;
}

.photo-history-image,
.photo-compare-image {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid rgba(238, 217, 204, 0.72);
}

.photo-history-body {
    display: grid;
    gap: 0.35rem;
}

.photo-compare-form-grid {
    display: grid;
    gap: 1rem;
}

.photo-comparison-summary h3 {
    margin: 0;
    font-size: clamp(1.45rem, 5vw, 1.9rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.history-section {
    gap: 0.95rem;
}

.history-timeline {
    display: grid;
    gap: 0.95rem;
}

.history-section-header {
    position: relative;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--border);
}

.history-section-header h3 {
    margin: 0;
}

.history-section-header-dose {
    background: rgba(255, 139, 114, 0.12);
}

.history-section-header-progress {
    background: rgba(220, 203, 241, 0.32);
}

.history-more-link {
    font-weight: 800;
    color: var(--primary-dark);
}

.icon {
    width: 22px;
    height: 22px;
    display: block;
    flex: 0 0 auto;
}

.icon-sm {
    width: 17px;
    height: 17px;
}

.icon-lg {
    width: 28px;
    height: 28px;
}

.icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.icon-circle--coral {
    background: rgba(255, 139, 114, 0.16);
    color: var(--primary-dark);
}

.icon-circle--lavender {
    background: rgba(220, 203, 241, 0.28);
    color: #7b64a0;
}

.icon-circle--sage {
    background: rgba(168, 200, 159, 0.26);
    color: var(--sage-dark);
}

.icon-circle--pink {
    background: rgba(247, 166, 181, 0.22);
    color: #a05f79;
}

.form-shell {
    background: transparent;
    padding: 0;
    border: 0;
    box-shadow: none;
}

.dose-form {
    gap: 1.05rem;
}

.form-group {
    display: grid;
    gap: 0.42rem;
}

.form-group label {
    font-size: 0.84rem;
    font-weight: 800;
    color: #755f58;
    letter-spacing: 0.01em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 3.3rem;
    padding: 0.94rem 1rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #FFF9F4;
    color: var(--text);
    appearance: none;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.form-group textarea {
    min-height: 5.8rem;
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #b08f86;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 139, 114, 0.58);
    box-shadow: var(--ring-coral);
    background: #fffdf9;
}

.form-actions {
    display: grid;
    gap: 0.85rem;
    margin-top: 0.3rem;
}

.unit-field {
    position: relative;
}

.unit-field input {
    padding-right: 4rem;
}

.unit-badge {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 800;
    pointer-events: none;
}

.measure-group {
    display: grid;
    gap: 1rem;
    padding: 0;
    border: 0;
    background: transparent;
}

.symptoms-block {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(238, 217, 204, 0.72);
}

.symptoms-block-header {
    display: grid;
    gap: 0.3rem;
}

.symptoms-block-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.02rem;
}

.symptoms-block-header p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.symptoms-grid {
    display: grid;
    gap: 0.85rem;
}

.chart-card {
    background: var(--surface);
}

.weekly-evolution-card {
    display: grid;
    gap: 1rem;
}

.weekly-evolution-header {
    display: grid;
    gap: 0.5rem;
}

.section-label-inline {
    margin-bottom: 0.35rem;
}

.weekly-evolution-copy,
.weekly-evolution-range,
.weekly-evolution-total,
.weekly-measure-zone,
.weekly-measure-values,
.weekly-measure-change {
    margin: 0;
}

.weekly-evolution-copy {
    color: var(--text-muted);
}

.weekly-evolution-list {
    display: grid;
    gap: 0.8rem;
}

.weekly-evolution-item {
    border: 1px solid rgba(238, 217, 204, 0.82);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 253, 252, 0.95), rgba(247, 252, 246, 0.92));
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.weekly-evolution-item[open] {
    border-color: rgba(168, 200, 159, 0.9);
}

.weekly-evolution-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.05rem;
    list-style: none;
    cursor: pointer;
}

.weekly-evolution-summary::-webkit-details-marker {
    display: none;
}

.weekly-evolution-range {
    color: var(--text);
    font-size: 1rem;
    font-weight: 800;
}

.weekly-evolution-total {
    margin-top: 0.2rem;
    color: var(--sage-dark);
    font-size: 0.92rem;
    font-weight: 800;
}

.weekly-evolution-chevron {
    color: var(--primary-dark);
    font-size: 1.1rem;
    font-weight: 800;
    transition: transform 0.22s ease;
}

.weekly-evolution-item[open] .weekly-evolution-chevron {
    transform: rotate(180deg);
}

.weekly-evolution-body {
    display: grid;
    gap: 0.75rem;
    padding: 0 1.05rem 1.05rem;
}

.weekly-measure-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.85rem 0.9rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(238, 217, 204, 0.72);
}

.weekly-measure-main {
    display: grid;
    gap: 0.18rem;
}

.weekly-measure-zone {
    color: var(--text);
    font-size: 0.98rem;
    font-weight: 800;
}

.weekly-measure-values {
    color: var(--text-muted);
    font-size: 0.94rem;
    font-weight: 700;
}

.weekly-measure-change {
    text-align: right;
    font-size: 0.94rem;
    font-weight: 800;
    white-space: nowrap;
}

.weekly-measure-change-loss {
    color: var(--sage-dark);
}

.weekly-measure-change-gain {
    color: var(--primary-dark);
}

.weekly-measure-change-same,
.weekly-measure-change-first {
    color: var(--text-muted);
}

.weekly-evolution-empty {
    min-height: 0;
}

.chart-empty-state {
    display: grid;
    place-items: center;
    min-height: 220px;
    padding: 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(248, 243, 253, 0.68), rgba(255, 241, 233, 0.58));
    border: 1px dashed rgba(220, 203, 241, 0.9);
    text-align: center;
}

.progress-summary {
    gap: 0.85rem;
}

.summary-card {
    display: grid;
    align-content: start;
    min-height: 10.8rem;
    gap: 0.55rem;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0));
}

.summary-card-initial {
    background-color: #FFF8F2;
}

.summary-card-current {
    background-color: #FBF7FF;
}

.summary-card-measures {
    min-height: auto;
    background-color: #FFF6EE;
}

.bmi-category {
    margin: 0;
    color: #8369b1;
    font-size: 0.95rem;
    font-weight: 800;
}

.settings-link {
    margin-top: 0.2rem;
    color: var(--primary-dark);
    font-weight: 800;
}

.settings-form-shell {
    padding: 0;
}

.settings-form-card {
    background: rgba(251, 239, 247, 0.72);
}

.settings-form-actions {
    margin-top: 0.1rem;
}

.settings-current-value {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.settings-link-secondary {
    width: 100%;
}

.summary-change-loss {
    color: var(--sage-dark);
}

.summary-change-gain {
    color: var(--primary-dark);
}

.measure-progress-list {
    display: grid;
    gap: 0.7rem;
}

.measure-progress-item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.38rem;
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.45;
}

.measure-progress-value {
    font-weight: 800;
}

.measure-progress-value-loss {
    color: var(--sage-dark);
}

.measure-progress-value-gain {
    color: var(--primary-dark);
}

.measure-progress-zone,
.measure-progress-text,
.measure-progress-empty {
    color: var(--text);
}

.measure-progress-empty {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.5;
}

.measure-progress-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin-top: 0.15rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
}

.measure-progress-toggle:hover,
.measure-progress-toggle:focus-visible {
    color: var(--primary-dark);
}

.measure-progress-toggle:focus-visible {
    outline: none;
    box-shadow: var(--ring-coral);
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    margin-left: -0.45rem;
}

.dose-card,
.progress-card {
    gap: 0.85rem;
}

.dose-card-compact,
.progress-card-compact {
    padding: 0.95rem;
}

.dose-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
}

.dose-date,
.dose-amount {
    margin: 0;
    font-weight: 800;
}

.dose-date {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text);
    font-size: 1rem;
}

.dose-amount {
    color: var(--primary-dark);
    font-size: 1.2rem;
    white-space: nowrap;
}

.dose-details,
.progress-measures {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.timeline-group {
    position: relative;
    display: grid;
    gap: 0.9rem;
    padding-left: 3.2rem;
}

.timeline-group::before {
    content: "";
    position: absolute;
    top: 0.2rem;
    bottom: 0.2rem;
    left: 1.2rem;
    width: 2px;
    background: linear-gradient(180deg, rgba(233, 111, 89, 0.38), rgba(132, 104, 177, 0.28));
}

.timeline-event {
    position: relative;
    overflow: visible;
}

.timeline-marker {
    position: absolute;
    top: 1rem;
    left: -2.9rem;
    display: grid;
    justify-items: center;
    gap: 0.2rem;
}

.timeline-dot {
    width: 0.8rem;
    height: 0.8rem;
    border: 3px solid rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 4px 12px rgba(102, 71, 60, 0.12);
}

.timeline-icon {
    width: 36px;
    height: 36px;
    box-shadow: 0 8px 18px rgba(102, 71, 60, 0.08);
}

.timeline-content {
    display: grid;
    gap: 0.7rem;
}

.symptoms-summary {
    display: grid;
    gap: 0.55rem;
    padding-top: 0.1rem;
    border-top: 1px dashed rgba(238, 217, 204, 0.72);
}

.symptom-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.symptom-tag,
.symptom-more {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.2;
}

.symptom-tag-mild {
    background: rgba(168, 200, 159, 0.26);
    color: #58734f;
}

.symptom-tag-moderate {
    background: rgba(255, 207, 168, 0.42);
    color: #9a6547;
}

.symptom-tag-intense {
    background: rgba(247, 166, 181, 0.32);
    color: #a34f61;
}

.symptoms-summary-compact {
    margin-top: 0.1rem;
}

.symptom-tags-compact {
    gap: 0.45rem;
}

.symptom-tags-compact .symptom-tag,
.symptom-more {
    min-height: 1.8rem;
    padding: 0.34rem 0.62rem;
    font-size: 0.79rem;
}

.symptom-more {
    background: rgba(255, 243, 234, 0.92);
    color: var(--text-muted);
}

.record-icon {
    width: 30px;
    height: 30px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.empty-state {
    position: relative;
    overflow: hidden;
    text-align: center;
    gap: 0.45rem;
}

.empty-state::before {
    content: "";
    position: absolute;
    right: 1.1rem;
    top: 1rem;
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 999px;
    background:
        radial-gradient(circle at 20% 25%, rgba(220, 203, 241, 0.42) 0 0.18rem, transparent 0.19rem),
        radial-gradient(circle at 60% 62%, rgba(168, 200, 159, 0.34) 0 0.34rem, transparent 0.35rem),
        radial-gradient(circle at 78% 28%, rgba(247, 166, 181, 0.28) 0 0.22rem, transparent 0.23rem);
    opacity: 0.72;
}

.empty-state h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.05rem;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.92rem;
}

#weightChart {
    width: 100% !important;
    height: 260px !important;
    margin-top: 0.3rem;
}

.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(238, 217, 204, 0.72);
}

.card-actions form {
    margin: 0;
}

.edit-link {
    color: #8369b1;
    font-weight: 800;
}

.card-actions-dose-history {
    align-items: center;
}

.edit-link-strong {
    min-height: 2.75rem;
    padding: 0.74rem 1rem;
    border-radius: 999px;
    background: rgba(220, 203, 241, 0.34);
    color: #73579d;
    box-shadow: 0 8px 18px rgba(102, 71, 60, 0.08);
}

.delete-button {
    min-height: 2.75rem;
    padding: 0.74rem 0.95rem;
    border: 1px solid rgba(230, 109, 97, 0.22);
    border-radius: 999px;
    background: rgba(255, 250, 249, 0.96);
    color: var(--danger);
    font-weight: 800;
    cursor: pointer;
}

.delete-button-soft {
    border-color: rgba(230, 109, 97, 0.14);
    background: rgba(255, 250, 249, 0.72);
    color: rgba(230, 109, 97, 0.86);
    box-shadow: none;
}

.bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.42rem;
    padding: 0.76rem 0.82rem calc(0.76rem + env(safe-area-inset-bottom));
    background: rgba(252, 247, 241, 0.88);
    border-top: 1px solid rgba(238, 217, 204, 0.75);
    backdrop-filter: blur(14px);
    box-shadow: 0 -6px 20px rgba(102, 71, 60, 0.06);
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 3.15rem;
    padding: 0.42rem 0.3rem;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-align: center;
    gap: 0.18rem;
}

.nav-icon {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.72);
}

.nav-text {
    line-height: 1;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.68);
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(102, 71, 60, 0.06);
}

.nav-link.active .nav-icon {
    background: rgba(255, 241, 233, 0.96);
}

.nav-link.active .nav-text {
    transform: translateY(0.02rem);
}

.hero-card-dose-form::before,
.hero-card-progress-form::before,
.hero-card-history::before,
.hero-card-dose-history::before {
    width: 2rem;
}

.hero-card-dose-form::after,
.hero-card-progress-form::after,
.empty-state::after {
    content: "";
    position: absolute;
    right: 1.3rem;
    top: 1.15rem;
    width: 1rem;
    height: 1.45rem;
    border-radius: 999px 999px 999px 0;
    background: rgba(168, 200, 159, 0.22);
    transform: rotate(28deg);
    pointer-events: none;
}

.hero-card-dose-form::after,
.hero-card-progress-form::after {
    opacity: 0.48;
}

.hero-card-history::after,
.hero-card-dose-history::after,
.hero-card-progress-history::after {
    opacity: 0.42;
}

.form-card,
.dashboard-card,
.summary-card,
.dose-card,
.progress-card,
.info-card,
.hero-card {
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.dashboard-card:hover,
.summary-card:hover,
.dose-card:hover,
.progress-card:hover,
.info-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.primary-button:hover,
.edit-link-strong:hover,
.dashboard-action-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(102, 71, 60, 0.12);
}

.secondary-link:hover,
.edit-link:hover,
.history-more-link:hover {
    color: var(--primary-dark);
}

@media (max-width: 390px) {
    .page-shell {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .hero-card,
    .info-card,
    .dashboard-card,
    .summary-card,
    .dose-card,
    .progress-card,
    .form-card {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .dashboard-card,
    .summary-card {
        min-height: auto;
    }

    .nav-icon,
    .icon-circle {
        width: 40px;
        height: 40px;
    }

    .dashboard-home-header-copy h2 {
        font-size: 1.8rem;
    }

    .dashboard-summary-card,
    .dashboard-actions-card-refined,
    .dashboard-milestone-card {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (min-width: 520px) {
    .symptoms-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .photo-history-grid,
    .photo-compare-grid,
    .photo-compare-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .dashboard-grid-home,
    .progress-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .summary-card-measures {
        grid-column: 1 / -1;
    }
}

@media (max-width: 639px) {
    .dashboard-goal-legend {
        gap: 0.6rem;
    }

    .dashboard-dose-panels {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }

    .dashboard-dose-panel + .dashboard-dose-panel {
        padding-left: 0;
        border-left: 0;
        padding-top: 0.9rem;
        border-top: 1px solid rgba(244, 203, 183, 0.72);
    }

    .dashboard-summary-empty {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-photo-row {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .measure-compare-top,
    .measure-compare-values,
    .weekly-measure-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .measure-compare-change,
    .weekly-measure-change {
        text-align: left;
        white-space: normal;
    }

    .measure-compare-arrow {
        display: none;
    }
}

@media (min-width: 768px) {
    .page-shell {
        padding: 1.4rem 1.4rem calc(7.9rem + env(safe-area-inset-bottom));
    }

    .bottom-nav {
        left: 50%;
        max-width: 760px;
        transform: translateX(-50%);
        border: 1px solid rgba(238, 217, 204, 0.95);
        border-bottom: 0;
        border-top-left-radius: 22px;
        border-top-right-radius: 22px;
    }

    .dashboard-grid-home,
    .progress-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .dashboard-summary-card {
        padding: 1.35rem 1.35rem 1.1rem;
    }

    .summary-card-measures {
        grid-column: span 2;
    }

    .timeline-group {
        padding-left: 3.6rem;
    }

    .timeline-group::before {
        left: 1.45rem;
    }

    .timeline-marker {
        left: -3.15rem;
    }

    .dose-details,
    .progress-measures {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
