:root {
    color-scheme: light;
    --bg: #f4f7fb;
    --sidebar: #ffffff;
    --card: #ffffff;
    --surface: #ffffff;
    --surface-soft: #f7faff;
    --surface-subtle: #fbfdff;
    --surface-muted: #f3f6fa;
    --ink: #102246;
    --muted: #6880a8;
    --text-soft: #41577c;
    --text-soft-strong: #506684;
    --text-tertiary: #6a84ab;
    --line: #dbe5f2;
    --line-strong: #cad8eb;
    --pink: #ff4f7a;
    --pink-soft: #fff3f6;
    --pink-border: #ffbfd0;
    --blue: #327bf6;
    --blue-soft: #eef5ff;
    --green: #22c55e;
    --green-soft: #ecfbf2;
    --purple: #8b5cf6;
    --purple-soft: #f4edff;
    --navy: #111c3d;
    --mobile-control-border: #1c2742;
    --mobile-control-ink: #18233f;
    --shadow: 0 2px 10px rgba(43, 70, 112, 0.07);
    --radius-xl: 22px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

@media (max-width: 1080px) {
    .bottom-nav {
        display: flex;
        width: 100vw;
        grid-template-columns: none;
        justify-content: space-between;
        align-items: stretch;
        gap: 0;
        padding: 0 max(6px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-right));
    }

    .bottom-nav a {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        align-items: center;
        text-align: center;
    }

    .bottom-nav a span:last-child {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mental-layout {
        display: grid;
        grid-template-columns: 1fr;
        align-items: start;
    }

    .mental-layout > *,
    .mood-check-card,
    .mood-trends-card {
        width: 100%;
        max-width: none;
    }
}

@media (min-width: 721px) and (max-width: 1080px) {
    .calendar-board {
        padding: 18px;
    }

    .calendar-weekdays,
    .calendar-grid {
        gap: 8px;
    }

    .calendar-cell {
        min-height: 72px;
        border-radius: 16px;
        padding: 10px 9px;
    }

    .calendar-under {
        grid-template-columns: 1fr;
    }

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

    .cycle-insights-meta {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

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

    .mood-choice {
        min-height: 96px;
    }
}

@media (max-width: 720px) {
    .cycle-insights-meta {
        grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    }

    .cycle-metric-chip,
    .insight-chip {
        min-height: 0;
        padding: 12px;
        border-radius: 14px;
    }

    .calendar-cell {
        aspect-ratio: 1 / 1;
        min-height: 44px;
    }
}

@media (max-width: 420px) {
    .bottom-nav a {
        flex: 1 1 0;
        font-size: 0.5rem;
        padding-left: 1px;
        padding-right: 1px;
    }

    .bottom-nav .nav-icon {
        width: 14px;
        height: 14px;
        flex-basis: 14px;
    }
}
html body.theme-dark .content-shell-dashboard .mini-tag,
html body.theme-dark .content-shell-dashboard .metric-row span,
html body.theme-dark .content-shell-dashboard .day-pill,
html body.theme-dark .content-shell-dashboard .insight-chip,
html body.theme-dark .content-shell-dashboard .cycle-metric-chip,
html body.theme-dark .content-shell-dashboard .wellness-factor-chip,
html body.theme-dark .content-shell-dashboard .wellness-status-badge {
    background: #17253a !important;
    border-color: rgba(135, 164, 210, 0.34) !important;
    color: #dce8f8 !important;
    box-shadow: none !important;
}

html body.theme-dark .content-shell-dashboard .cycle-panel,
html body.theme-dark .content-shell-dashboard .cycle-focus-card {
    background: #15243a !important;
    border-color: rgba(135, 164, 210, 0.34) !important;
    color: #eaf2ff !important;
}

html body.theme-dark .content-shell-dashboard .cycle-day-ring {
    background: #0f1a2e !important;
    border-color: rgba(255, 132, 168, 0.72) !important;
    color: #ff6f9b !important;
}

html body.theme-dark .content-shell-dashboard .cycle-focus-card h4,
html body.theme-dark .content-shell-dashboard .cycle-focus-card p,
html body.theme-dark .content-shell-dashboard .cycle-focus-caption {
    color: #dbe8f9 !important;
}

html body.theme-dark .settings-password-modal-card,
html body.theme-dark .settings-password-method,
html body.theme-dark .settings-password-method-primary,
html body.theme-dark .settings-password-method-secondary,
html body.theme-dark .settings-password-method-backup {
    background: #142238 !important;
    border-color: rgba(135, 164, 210, 0.32) !important;
    color: #e8f1ff !important;
}

html body.theme-dark .settings-password-modal-head h2,
html body.theme-dark .settings-password-modal-head p,
html body.theme-dark .settings-password-modal-head strong,
html body.theme-dark .settings-password-method strong,
html body.theme-dark .settings-password-method span:last-child,
html body.theme-dark .settings-forgot-trigger,
html body.theme-dark .settings-backup-reveal,
html body.theme-dark .auth-text-button {
    color: #e8f1ff !important;
}

html body.theme-dark .settings-password-modal-card .auth-inline-status.is-error,
html body.theme-dark .settings-password-modal-card .field-error {
    color: #ff6b8f !important;
}

@media (max-width: 720px) {
    html body .calendar-layout,
    html body .calendar-main,
    html body .calendar-board,
    html body .calendar-top,
    html body .calendar-under,
    html body .cycle-insights-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    html body .calendar-board {
        padding: 12px !important;
    }

    html body .calendar-weekdays,
    html body .calendar-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
        gap: 5px !important;
        width: 100%;
        min-width: 0 !important;
        max-width: 100%;
    }

    html body .calendar-cell {
        min-width: 0 !important;
        min-height: 42px !important;
        aspect-ratio: 1 / 1 !important;
        border-radius: 11px !important;
        padding: 6px 4px 4px !important;
        font-size: 0.78rem;
    }

    html body .calendar-number {
        margin-bottom: 4px !important;
        font-size: 0.78rem !important;
        line-height: 1;
    }
}

@media (max-width: 430px) {
    html body .calendar-board {
        padding: 10px !important;
    }

    html body .calendar-weekdays,
    html body .calendar-grid {
        gap: 4px !important;
    }

    html body .calendar-cell {
        min-height: 36px !important;
        border-width: 1.5px !important;
        border-radius: 9px !important;
        padding: 5px 3px 3px !important;
    }

    html body .calendar-weekdays {
        font-size: 0.72rem !important;
    }
}

html body .content-shell-dashboard {
    max-width: 1180px;
}

html body .content-shell-dashboard .page-head {
    margin-bottom: 26px;
}

html body .content-shell-dashboard .page-head h1 {
    letter-spacing: 0;
}

html body .content-shell-dashboard .overview-wellness-grid {
    margin: 0 0 24px;
}

html body .content-shell-dashboard .overview-top-grid,
html body .content-shell-dashboard .overview-bottom-grid {
    gap: 22px;
    margin-bottom: 26px;
}

html body .content-shell-dashboard .wellness-prediction-card {
    display: grid;
    gap: 20px;
    padding: 28px 30px;
    border-radius: 28px;
    border: 1px solid rgba(207, 220, 238, 0.78);
    background: linear-gradient(145deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 18px 42px rgba(31, 51, 83, 0.058);
}

html body .content-shell-dashboard .wellness-prediction-card::before,
html body .content-shell-dashboard .wellness-prediction-card::after {
    display: none;
}

html body .content-shell-dashboard .wellness-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0;
    border: 0;
}

html body .content-shell-dashboard .wellness-card-title-wrap h3 {
    color: #172b45;
    font-size: 1.06rem;
    font-weight: 740;
    letter-spacing: 0;
}

html body .content-shell-dashboard .wellness-status-badge {
    margin-left: auto;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(216, 226, 240, 0.9);
    background: #f8fbff;
    color: #637894;
    box-shadow: none;
    font-size: 0.74rem;
    font-weight: 650;
    letter-spacing: 0;
}

html body .content-shell-dashboard .wellness-status-row {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.98fr);
    align-items: stretch;
    gap: 22px;
    margin: 0;
}

html body .content-shell-dashboard .wellness-status-copy {
    max-width: none;
    min-height: 100%;
    display: grid;
    align-content: center;
    gap: 11px;
    padding: 20px 22px;
    border-radius: 24px;
    border: 1px solid rgba(224, 232, 243, 0.82);
    background: linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

html body .content-shell-dashboard .wellness-trend-label {
    margin: 0;
    color: #76889f;
    font-size: 0.72rem;
    font-weight: 720;
    letter-spacing: 0;
    text-transform: uppercase;
}

html body .content-shell-dashboard .wellness-status-result {
    margin: 0;
    color: #344d69;
    font-size: 1.62rem;
    line-height: 1.16;
    font-weight: 720;
    letter-spacing: 0;
}

html body .content-shell-dashboard .wellness-status-result-warning {
    color: #986166;
}

html body .content-shell-dashboard .wellness-status-result-success {
    color: #2c7551;
}

html body .content-shell-dashboard .wellness-status-result-info {
    color: #3f6caa;
}

html body .content-shell-dashboard .wellness-support-context {
    margin: -2px 0 0;
    color: #71839a;
    font-size: 0.86rem;
    line-height: 1.5;
}

html body .content-shell-dashboard .wellness-summary-lines {
    display: grid;
    gap: 7px;
    margin: 2px 0 0;
    color: #5f738d;
    font-size: 0.9rem;
    line-height: 1.55;
    font-weight: 540;
}

html body .content-shell-dashboard .wellness-mini-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 3px;
}

html body .content-shell-dashboard .wellness-mini-metrics span {
    min-width: 0;
    padding: 9px 10px;
    border-radius: 16px;
    border: 1px solid rgba(216, 226, 240, 0.88);
    background: #f7faff;
    color: #5f748f;
    font-size: 0.73rem;
    font-weight: 660;
    line-height: 1.25;
    text-align: center;
}

html body .content-shell-dashboard .wellness-compact-note,
html body .content-shell-dashboard .wellness-data-helper {
    margin: 0;
    color: #8291a5;
    font-size: 0.78rem;
    line-height: 1.48;
    font-weight: 520;
}

html body .content-shell-dashboard .wellness-status-visual {
    width: 100%;
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 14px;
    padding: 20px 22px;
    border-radius: 24px;
    border: 1px solid rgba(216, 226, 240, 0.9);
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    box-shadow: none;
}

html body .content-shell-dashboard .wellness-visual-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(224, 232, 243, 0.88);
}

html body .content-shell-dashboard .wellness-visual-label,
html body .content-shell-dashboard .wellness-visual-soft-label {
    color: #7789a1;
    font-size: 0.68rem;
    font-weight: 720;
    letter-spacing: 0;
    text-transform: uppercase;
}

html body .content-shell-dashboard .wellness-visual-soft-label {
    color: #9aa8ba;
    font-weight: 650;
}

html body .content-shell-dashboard .wellness-checkin-trend {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 9px;
    margin: 0;
    padding: 13px;
    border-radius: 18px;
    border: 1px solid rgba(224, 232, 243, 0.82);
    background: #ffffff;
}

html body .content-shell-dashboard .wellness-checkin-day {
    display: grid;
    justify-items: center;
    gap: 7px;
}

html body .content-shell-dashboard .wellness-checkin-dot {
    width: 11px;
    height: 11px;
    border-width: 2px;
    box-shadow: none;
    opacity: 0.84;
}

html body .content-shell-dashboard .wellness-checkin-label {
    color: #8494a8;
    font-size: 0.62rem;
    font-weight: 720;
    line-height: 1;
}

html body .content-shell-dashboard .feature-card,
html body .content-shell-dashboard .panel-card:not(.wellness-prediction-card) {
    padding: 23px;
    border-radius: 24px;
    border-color: rgba(207, 220, 238, 0.72);
    box-shadow: 0 14px 34px rgba(31, 51, 83, 0.052);
}

html body .content-shell-dashboard .feature-card {
    min-height: 162px;
}

html body .content-shell-dashboard .feature-card h3,
html body .content-shell-dashboard .panel-card h3 {
    letter-spacing: 0;
}

html body .content-shell-dashboard .feature-card p,
html body .content-shell-dashboard .panel-card p {
    line-height: 1.56;
}

body.theme-dark .content-shell-dashboard .wellness-status-copy,
body.theme-dark .content-shell-dashboard .wellness-status-visual,
body.theme-dark .content-shell-dashboard .wellness-checkin-trend {
    background: #152033;
    border-color: rgba(129, 153, 190, 0.22);
}

@media (max-width: 980px) {
    html body .content-shell-dashboard .wellness-status-row {
        grid-template-columns: 1fr;
    }

    html body .content-shell-dashboard .wellness-status-copy {
        align-content: start;
    }
}

@media (max-width: 720px) {
    html body .content-shell-dashboard .page-head {
        margin-bottom: 16px;
    }

    html body .content-shell-dashboard .overview-wellness-grid,
    html body .content-shell-dashboard .overview-top-grid,
    html body .content-shell-dashboard .overview-bottom-grid {
        gap: 14px;
        margin-bottom: 16px;
    }

    html body .content-shell-dashboard .wellness-prediction-card,
    html body .content-shell-dashboard .feature-card,
    html body .content-shell-dashboard .panel-card:not(.wellness-prediction-card) {
        padding: 17px;
        border-radius: 20px;
    }

    html body .content-shell-dashboard .wellness-prediction-card {
        gap: 14px;
    }

    html body .content-shell-dashboard .wellness-card-header {
        display: grid;
        gap: 9px;
    }

    html body .content-shell-dashboard .wellness-status-badge {
        width: max-content;
        margin-left: 0;
    }

    html body .content-shell-dashboard .wellness-status-row {
        gap: 12px;
    }

    html body .content-shell-dashboard .wellness-status-copy,
    html body .content-shell-dashboard .wellness-status-visual {
        padding: 15px;
        border-radius: 18px;
    }

    html body .content-shell-dashboard .wellness-status-result {
        font-size: 1.28rem;
        line-height: 1.18;
    }

    html body .content-shell-dashboard .wellness-support-context,
    html body .content-shell-dashboard .wellness-summary-lines {
        font-size: 0.82rem;
    }

    html body .content-shell-dashboard .wellness-mini-metrics {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    html body .content-shell-dashboard .wellness-mini-metrics span {
        padding: 8px 9px;
        text-align: left;
    }

    html body .content-shell-dashboard .wellness-visual-meta {
        padding-bottom: 10px;
    }

    html body .content-shell-dashboard .wellness-checkin-trend {
        gap: 6px;
        padding: 10px;
    }

    html body .content-shell-dashboard .wellness-checkin-dot {
        width: 10px;
        height: 10px;
    }

    html body .content-shell-dashboard .feature-card {
        min-height: 0;
    }
}

html body .settings-password-modal-card {
    width: min(680px, calc(100vw - 28px));
    max-height: min(86vh, 760px);
    overflow: auto;
    padding: 30px;
    border-radius: 28px;
    border: 1px solid rgba(207, 220, 238, 0.82);
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(31, 51, 83, 0.18);
}

html body .settings-password-modal-head {
    gap: 9px;
    margin-bottom: 20px;
    padding-right: 34px;
}

html body .settings-password-modal-head .status-line {
    color: #6f87a5;
    font-size: 0.82rem;
    font-weight: 720;
    letter-spacing: 0;
}

html body .settings-password-modal-head h2 {
    color: #142943;
    font-size: 1.7rem;
    line-height: 1.18;
    font-weight: 760;
    letter-spacing: 0;
}

html body .settings-password-modal-head p {
    max-width: 58ch;
    color: #61748d;
    font-size: 0.95rem;
    line-height: 1.58;
}

html body .settings-password-flow {
    gap: 18px;
}

html body .settings-password-panel.is-active {
    gap: 16px;
}

html body .settings-password-primary-choice {
    display: grid;
    gap: 12px;
}

html body .settings-password-method {
    position: relative;
    z-index: 2;
    border-radius: 22px;
    text-align: left;
    cursor: pointer;
    pointer-events: auto;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

html body .settings-password-method:hover {
    transform: translateY(-1px);
}

html body .settings-password-method-primary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 22px;
    border: 1px solid rgba(90, 132, 178, 0.26);
    background: linear-gradient(145deg, #fbfdff 0%, #f4f9ff 100%);
    box-shadow: 0 18px 38px rgba(57, 89, 128, 0.11);
    color: #172d48;
}

html body .settings-password-method-primary:hover {
    border-color: rgba(75, 118, 166, 0.42);
    box-shadow: 0 20px 44px rgba(57, 89, 128, 0.15);
}

html body .settings-password-method-copy {
    display: grid;
    gap: 7px;
    min-width: 0;
}

html body .settings-password-method strong {
    color: #142943;
    font-size: 1.02rem;
    line-height: 1.28;
    font-weight: 740;
    letter-spacing: 0;
}

html body .settings-password-method span:last-child {
    color: #627790;
    font-size: 0.9rem;
    line-height: 1.48;
}

html body .settings-security-chip {
    width: max-content;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eaf5f4;
    color: #42736d;
    font-size: 0.7rem;
    font-weight: 760;
    line-height: 1;
    letter-spacing: 0;
}

html body .settings-security-chip-muted {
    background: #f3f6fa;
    color: #7c8da3;
}

html body .settings-password-method-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6ba7a3 0%, #5279aa 100%);
    box-shadow: 0 12px 24px rgba(77, 120, 160, 0.18);
}

html body .settings-password-method-secondary .settings-password-method-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6387bd 0%, #5f9ca0 100%);
    box-shadow: 0 10px 20px rgba(72, 105, 151, 0.12);
}

html body .settings-password-method-backup .settings-password-method-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #edf2f7;
    box-shadow: none;
}

html body .settings-password-method-backup .settings-password-method-icon::before {
    border-color: #73849a;
}

html body .settings-password-method-backup .settings-password-method-icon::after {
    background: #73849a;
    box-shadow: 0 7px 0 #73849a;
}

html body .settings-forgot-trigger {
    justify-self: start;
    min-height: 40px;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: #56789e;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

html body .settings-forgot-trigger:hover,
html body .settings-forgot-trigger:focus-visible {
    color: #315f8d;
    text-decoration: underline;
}

html body .settings-recovery-region {
    display: grid;
    gap: 12px;
    margin-top: 8px;
    padding: 16px;
    border: 1px solid rgba(219, 229, 241, 0.92);
    border-radius: 22px;
    background: #fbfdff;
}

html body .settings-recovery-region[hidden] {
    display: none;
}

html body .settings-recovery-copy {
    display: grid;
    gap: 4px;
}

html body .settings-recovery-copy > span {
    color: #4f6681;
    font-size: 0.84rem;
    font-weight: 750;
}

html body .settings-recovery-copy p {
    margin: 0;
    color: #7a8ba0;
    font-size: 0.84rem;
    line-height: 1.45;
}

html body .settings-password-recovery-list {
    display: grid;
    gap: 10px;
}

html body .settings-password-method-secondary,
html body .settings-password-method-backup {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    padding: 15px;
    border: 1px solid rgba(216, 226, 240, 0.9);
    background: #ffffff;
    box-shadow: none;
}

html body .settings-password-method-secondary:hover {
    border-color: rgba(94, 130, 176, 0.34);
    box-shadow: 0 12px 26px rgba(57, 89, 128, 0.07);
}

html body .settings-password-method-backup {
    width: min(100%, 520px);
    padding: 12px 14px;
    border-style: dashed;
    background: #fcfdff;
    opacity: 0.92;
}

html body .settings-password-method-backup strong {
    font-size: 0.92rem;
    font-weight: 700;
}

html body .settings-password-method-backup span:last-child {
    font-size: 0.82rem;
}

html body .settings-attempt-helper {
    margin: -4px 0 0;
    color: #7d8da2;
    font-size: 0.8rem;
    line-height: 1.45;
}

html body .settings-password-actions {
    gap: 12px;
}

html body .settings-password-actions .auth-gradient-button {
    min-width: 210px;
    background: linear-gradient(135deg, #5d8da9 0%, #6ba7a3 100%);
    box-shadow: 0 14px 30px rgba(85, 133, 158, 0.2);
}

html body .settings-password-actions .auth-secondary-button {
    border-color: rgba(91, 124, 163, 0.22);
    background: #f7fafc;
    color: #4f6681;
}

html body .settings-password-actions .auth-text-button {
    color: #647893;
}

html body .settings-password-modal-card .auth-inline-status {
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.45;
}

@media (max-width: 720px) {
    html body .settings-password-modal-card {
        width: min(100%, calc(100vw - 18px));
        max-height: 88vh;
        padding: 20px;
        border-radius: 22px;
    }

    html body .settings-password-modal-head {
        gap: 7px;
        margin-bottom: 15px;
        padding-right: 30px;
    }

    html body .settings-password-modal-head h2 {
        font-size: 1.35rem;
    }

    html body .settings-password-modal-head p {
        font-size: 0.86rem;
        line-height: 1.5;
    }

    html body .settings-password-panel.is-active,
    html body .settings-password-primary-choice,
    html body .settings-password-flow {
        gap: 12px;
    }

    html body .settings-password-method-primary {
        gap: 12px;
        padding: 16px;
        border-radius: 18px;
    }

    html body .settings-password-method-secondary,
    html body .settings-password-method-backup {
        gap: 10px;
        padding: 12px;
        border-radius: 16px;
    }

    html body .settings-recovery-region {
        padding: 12px;
        border-radius: 18px;
    }

    html body .settings-password-method-icon {
        width: 38px;
        height: 38px;
        border-radius: 14px;
    }

    html body .settings-password-method-secondary .settings-password-method-icon,
    html body .settings-password-method-backup .settings-password-method-icon {
        width: 32px;
        height: 32px;
        border-radius: 11px;
    }

    html body .settings-password-method strong {
        font-size: 0.94rem;
    }

    html body .settings-password-method span:last-child,
    html body .settings-attempt-helper {
        font-size: 0.78rem;
    }

    html body .settings-security-chip {
        padding: 4px 8px;
        font-size: 0.66rem;
    }

    html body .settings-password-actions {
        display: grid;
        gap: 9px;
    }

    html body .settings-password-actions .auth-gradient-button,
    html body .settings-password-actions .auth-secondary-button,
    html body .settings-password-actions .auth-text-button {
        width: 100%;
        min-width: 0;
    }
}

html body .settings-password-primary-choice,
html body .settings-password-recovery-list {
    display: grid;
    gap: 14px;
}

html body .settings-password-method-primary,
html body .settings-password-method-secondary {
    min-height: 168px;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 16px;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid rgba(202, 158, 255, 0.46);
    background: linear-gradient(180deg, #fffaff 0%, #f8f3ff 100%);
    box-shadow: 0 12px 28px rgba(112, 73, 154, 0.075);
}

html body .settings-password-method-primary {
    border-color: rgba(181, 123, 255, 0.58);
    box-shadow: 0 15px 32px rgba(112, 73, 154, 0.105);
}

html body .settings-password-method-primary:hover,
html body .settings-password-method-secondary:hover {
    border-color: rgba(166, 99, 246, 0.56);
    box-shadow: 0 16px 34px rgba(112, 73, 154, 0.12);
}

html body .settings-password-method-primary .settings-password-method-icon,
html body .settings-password-method-secondary .settings-password-method-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, #e62ab1 0%, #9628ed 100%);
    box-shadow: 0 14px 28px rgba(150, 40, 237, 0.18);
}

html body .settings-password-method-primary strong,
html body .settings-password-method-secondary strong {
    font-size: 1.05rem;
}

html body .settings-password-method-primary span:last-child,
html body .settings-password-method-secondary span:last-child {
    color: #6278a0;
    font-size: 0.95rem;
    line-height: 1.52;
}

html body .settings-recovery-region.reset-recovery-region,
html body .settings-recovery-region {
    padding: 0;
    border: 0;
    background: transparent;
}

html body .settings-backup-reveal {
    justify-self: start;
    min-height: 38px;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: #6a7f99;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}

html body .settings-backup-reveal:hover,
html body .settings-backup-reveal:focus-visible {
    color: #4a6688;
    text-decoration: underline;
}

html body .settings-pin-backup-region[hidden] {
    display: none;
}

html body .settings-pin-backup-region {
    display: block;
}

html body .settings-password-method-backup {
    min-height: 0;
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px dashed rgba(155, 169, 189, 0.58);
    background: #fbfcff;
    box-shadow: none;
    opacity: 0.9;
}

html body .settings-password-method-backup .settings-password-method-icon {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    background: #edf2f8;
}

html body .settings-password-method-backup strong {
    font-size: 0.9rem;
}

html body .settings-password-method-backup span:last-child {
    color: #7a8aa0;
    font-size: 0.8rem;
    line-height: 1.42;
}

html body .settings-security-chip {
    background: #f2ebff;
    color: #7a4aa6;
}

html body .settings-security-chip-muted {
    background: #f2f5f8;
    color: #7d8da2;
}

@media (max-width: 720px) {
    html body .settings-password-method-primary,
    html body .settings-password-method-secondary {
        min-height: 132px;
        gap: 12px;
        padding: 18px;
        border-radius: 20px;
    }

    html body .settings-password-method-primary .settings-password-method-icon,
    html body .settings-password-method-secondary .settings-password-method-icon {
        width: 44px;
        height: 44px;
        border-radius: 15px;
    }

    html body .settings-password-method-primary strong,
    html body .settings-password-method-secondary strong {
        font-size: 0.98rem;
    }

    html body .settings-password-method-primary span:last-child,
    html body .settings-password-method-secondary span:last-child {
        font-size: 0.86rem;
    }

    html body .settings-password-primary-choice,
    html body .settings-password-recovery-list {
        gap: 12px;
    }
}

html body .settings-password-modal-head h2 {
    color: #142943 !important;
}

body.theme-dark .settings-password-modal-head h2 {
    color: #f7f9ff !important;
}

body.theme-dark .settings-password-modal-head .status-line,
body.theme-dark .settings-password-modal-head p {
    color: #b8c6dc !important;
}

html body .settings-password-modal-card .field-error,
body.theme-dark .settings-password-modal-card .field-error {
    color: #ef4444 !important;
    font-weight: 700;
}

html body .settings-password-modal-card .auth-input-wrap.is-invalid {
    border-color: rgba(239, 68, 68, 0.72) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

html body .settings-password-modal-card .auth-inline-status.is-error,
body.theme-dark .settings-password-modal-card .auth-inline-status.is-error,
html body .auth-form-card .auth-inline-status.is-error,
body.theme-dark .auth-form-card .auth-inline-status.is-error {
    border-color: rgba(239, 68, 68, 0.45) !important;
    background: rgba(254, 226, 226, 0.96) !important;
    color: #b91c1c !important;
    font-weight: 700;
}

html body .content-shell-dashboard .wellness-prediction-card {
    gap: 22px;
    padding: 30px;
    overflow: hidden;
}

html body .content-shell-dashboard .wellness-card-header {
    padding-bottom: 2px;
}

html body .content-shell-dashboard .wellness-status-row {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.92fr);
    gap: 22px;
}

html body .content-shell-dashboard .wellness-status-copy {
    display: grid;
    align-content: stretch;
    gap: 16px;
    padding: 22px;
    border-radius: 26px;
    background:
        radial-gradient(circle at 16% 20%, rgba(120, 185, 176, 0.13), transparent 30%),
        linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

html body .content-shell-dashboard .wellness-intelligence-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

html body .content-shell-dashboard .wellness-score-ring {
    --wellness-ring-color: #6a9f97;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
    background:
        radial-gradient(circle at center, #ffffff 0 57%, transparent 58%),
        conic-gradient(var(--wellness-ring-color) var(--wellness-score), #e7eef6 0);
    box-shadow: inset 0 0 0 1px rgba(214, 226, 240, 0.86), 0 16px 34px rgba(71, 107, 134, 0.09);
}

html body .content-shell-dashboard .wellness-score-ring-warning {
    --wellness-ring-color: #c98678;
}

html body .content-shell-dashboard .wellness-score-ring-success {
    --wellness-ring-color: #60a982;
}

html body .content-shell-dashboard .wellness-score-ring-info {
    --wellness-ring-color: #6b8fc6;
}

html body .content-shell-dashboard .wellness-score-ring span,
html body .content-shell-dashboard .wellness-score-ring small {
    grid-area: 1 / 1;
    letter-spacing: 0;
}

html body .content-shell-dashboard .wellness-score-ring span {
    align-self: center;
    color: #203a56;
    font-size: 1.25rem;
    font-weight: 780;
    line-height: 1;
}

html body .content-shell-dashboard .wellness-score-ring small {
    align-self: end;
    margin-bottom: 25px;
    color: #7c8da3;
    font-size: 0.68rem;
    font-weight: 760;
    text-transform: uppercase;
}

html body .content-shell-dashboard .wellness-trend-copy {
    display: grid;
    gap: 6px;
}

html body .content-shell-dashboard .wellness-status-result {
    font-size: 1.36rem;
    line-height: 1.18;
}

html body .content-shell-dashboard .wellness-status-result-warning {
    color: #a06a60;
}

html body .content-shell-dashboard .wellness-support-context {
    max-width: 42ch;
    margin: 0;
}

html body .content-shell-dashboard .wellness-insight-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

html body .content-shell-dashboard .wellness-insight-strip span {
    min-width: 0;
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(216, 226, 240, 0.82);
    background: rgba(255, 255, 255, 0.78);
}

html body .content-shell-dashboard .wellness-insight-strip strong {
    color: #263f5b;
    font-size: 0.9rem;
    font-weight: 760;
    line-height: 1.15;
}

html body .content-shell-dashboard .wellness-insight-strip small {
    color: #7c8da3;
    font-size: 0.68rem;
    font-weight: 720;
    line-height: 1.2;
    text-transform: uppercase;
}

html body .content-shell-dashboard .wellness-consistency-meter {
    display: grid;
    gap: 9px;
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(216, 226, 240, 0.82);
    background: #f7fbff;
}

html body .content-shell-dashboard .wellness-meter-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #667b94;
    font-size: 0.82rem;
    font-weight: 720;
}

html body .content-shell-dashboard .wellness-meter-head strong {
    color: #334b66;
    font-weight: 760;
}

html body .content-shell-dashboard .wellness-meter-track {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7eef7;
}

html body .content-shell-dashboard .wellness-meter-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6ba7a3 0%, #7d95cf 100%);
}

html body .content-shell-dashboard .wellness-status-visual {
    align-content: stretch;
    gap: 16px;
    padding: 22px;
    border-radius: 26px;
    background:
        radial-gradient(circle at 84% 18%, rgba(125, 149, 207, 0.13), transparent 32%),
        linear-gradient(180deg, #fbfdff 0%, #ffffff 100%);
}

html body .content-shell-dashboard .wellness-timeline {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0;
    padding: 18px 12px 12px;
    border-radius: 22px;
    border: 1px solid rgba(216, 226, 240, 0.82);
    background: rgba(255, 255, 255, 0.78);
}

html body .content-shell-dashboard .wellness-timeline-day {
    display: grid;
    justify-items: center;
    gap: 9px;
    position: relative;
    min-width: 0;
}

html body .content-shell-dashboard .wellness-timeline-day::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 0;
    right: 0;
    height: 2px;
    background: #dce6f2;
    z-index: 0;
}

html body .content-shell-dashboard .wellness-timeline-day:first-child::before {
    left: 50%;
}

html body .content-shell-dashboard .wellness-timeline-day:last-child::before {
    right: 50%;
}

html body .content-shell-dashboard .wellness-timeline-node {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    background: #ffffff;
    border: 2px solid #b8c8db;
    box-shadow: 0 0 0 4px #ffffff;
}

html body .content-shell-dashboard .wellness-timeline-day.is-complete .wellness-timeline-node {
    background: #75a7eb;
    border-color: #75a7eb;
}

html body .content-shell-dashboard .wellness-rhythm-bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
    gap: 8px;
    min-height: 74px;
    padding: 14px;
    border-radius: 20px;
    background: #f7fbff;
    border: 1px solid rgba(216, 226, 240, 0.82);
}

html body .content-shell-dashboard .wellness-rhythm-bars span {
    display: block;
    min-height: 18px;
    border-radius: 999px 999px 8px 8px;
    background: #d7e2ee;
}

html body .content-shell-dashboard .wellness-rhythm-bars span:nth-child(1) { height: 44px; }
html body .content-shell-dashboard .wellness-rhythm-bars span:nth-child(2) { height: 52px; }
html body .content-shell-dashboard .wellness-rhythm-bars span:nth-child(3) { height: 48px; }
html body .content-shell-dashboard .wellness-rhythm-bars span:nth-child(4) { height: 58px; }
html body .content-shell-dashboard .wellness-rhythm-bars span:nth-child(5) { height: 50px; }
html body .content-shell-dashboard .wellness-rhythm-bars span:nth-child(6) { height: 34px; }
html body .content-shell-dashboard .wellness-rhythm-bars span:nth-child(7) { height: 28px; }

html body .content-shell-dashboard .wellness-rhythm-bars span.is-complete {
    background: linear-gradient(180deg, #7da8ef 0%, #6ba7a3 100%);
}

html body .content-shell-dashboard .wellness-rhythm-bars span.is-missing {
    opacity: 0.55;
    background: repeating-linear-gradient(
        45deg,
        #d7e2ee,
        #d7e2ee 5px,
        #edf3f8 5px,
        #edf3f8 10px
    );
}

html body .content-shell-dashboard .wellness-insight-strip-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.theme-dark .settings-password-modal-card,
body.theme-dark .settings-password-method-primary,
body.theme-dark .settings-password-method-secondary,
body.theme-dark .settings-password-method-backup,
body.theme-dark .settings-pin-backup-region,
body.theme-dark .settings-recovery-region {
    background: #17253a !important;
    border-color: rgba(129, 153, 190, 0.28) !important;
    color: #e8eef8 !important;
}

body.theme-dark .settings-password-method strong,
body.theme-dark .settings-password-method span:last-child,
body.theme-dark .settings-recovery-copy > span,
body.theme-dark .settings-recovery-copy p,
body.theme-dark .settings-forgot-trigger,
body.theme-dark .settings-backup-reveal {
    color: #d8e3f3 !important;
}

body.theme-dark .content-shell-dashboard .page-head h1,
body.theme-dark .content-shell-dashboard .wellness-card-title-wrap h3,
body.theme-dark .content-shell-dashboard .feature-card h3,
body.theme-dark .content-shell-dashboard .panel-card h3,
body.theme-dark .content-shell-dashboard .wellness-status-result,
body.theme-dark .content-shell-dashboard .wellness-insight-strip strong,
body.theme-dark .content-shell-dashboard .wellness-meter-head strong,
body.theme-dark .content-shell-dashboard .wellness-score-ring span {
    color: #f3f7ff !important;
}

body.theme-dark .content-shell-dashboard .page-head p,
body.theme-dark .content-shell-dashboard .wellness-support-context,
body.theme-dark .content-shell-dashboard .wellness-compact-note,
body.theme-dark .content-shell-dashboard .wellness-data-helper,
body.theme-dark .content-shell-dashboard .wellness-checkin-label,
body.theme-dark .content-shell-dashboard .wellness-insight-strip small,
body.theme-dark .content-shell-dashboard .wellness-meter-head,
body.theme-dark .content-shell-dashboard .wellness-score-ring small,
body.theme-dark .content-shell-dashboard .feature-card p,
body.theme-dark .content-shell-dashboard .panel-card p {
    color: #b8c8de !important;
}

body.theme-dark .content-shell-dashboard .wellness-prediction-card,
body.theme-dark .content-shell-dashboard .wellness-status-copy,
body.theme-dark .content-shell-dashboard .wellness-status-visual,
body.theme-dark .content-shell-dashboard .feature-card,
body.theme-dark .content-shell-dashboard .panel-card:not(.wellness-prediction-card) {
    background: linear-gradient(180deg, #17253a 0%, #142238 100%) !important;
    border-color: rgba(129, 153, 190, 0.28) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24) !important;
}

body.theme-dark .content-shell-dashboard .wellness-insight-strip span,
body.theme-dark .content-shell-dashboard .wellness-consistency-meter,
body.theme-dark .content-shell-dashboard .wellness-timeline,
body.theme-dark .content-shell-dashboard .wellness-rhythm-bars,
body.theme-dark .content-shell-dashboard .wellness-status-badge,
body.theme-dark .content-shell-dashboard .mini-tag,
body.theme-dark .content-shell-dashboard .med-status-badge {
    background: rgba(20, 34, 56, 0.92) !important;
    border-color: rgba(129, 153, 190, 0.26) !important;
    color: #d8e3f3 !important;
}

body.theme-dark .content-shell-dashboard .wellness-score-ring {
    background:
        radial-gradient(circle at center, #142238 0 57%, transparent 58%),
        conic-gradient(var(--wellness-ring-color) var(--wellness-score), #2a3d59 0) !important;
    box-shadow: inset 0 0 0 1px rgba(129, 153, 190, 0.25), 0 16px 34px rgba(0, 0, 0, 0.2) !important;
}

body.theme-dark .content-shell-dashboard .wellness-meter-track,
body.theme-dark .content-shell-dashboard .wellness-timeline-day::before {
    background: #2a3d59 !important;
}

body.theme-dark .content-shell-dashboard .wellness-timeline-node {
    background: #142238 !important;
    border-color: #5c718d !important;
    box-shadow: 0 0 0 4px #17253a !important;
}

body.theme-dark .content-shell-dashboard .wellness-timeline-day.is-complete .wellness-timeline-node {
    background: #82aaf0 !important;
    border-color: #82aaf0 !important;
}

@media (max-width: 900px) {
    html body .content-shell-dashboard .wellness-status-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    html body .content-shell-dashboard .wellness-prediction-card {
        padding: 18px;
        gap: 15px;
    }

    html body .content-shell-dashboard .wellness-status-copy,
    html body .content-shell-dashboard .wellness-status-visual {
        padding: 15px;
        border-radius: 20px;
    }

    html body .content-shell-dashboard .wellness-intelligence-top {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    html body .content-shell-dashboard .wellness-score-ring {
        width: 82px;
        height: 82px;
    }

    html body .content-shell-dashboard .wellness-score-ring span {
        font-size: 1.05rem;
    }

    html body .content-shell-dashboard .wellness-score-ring small {
        margin-bottom: 18px;
        font-size: 0.58rem;
    }

    html body .content-shell-dashboard .wellness-insight-strip {
        grid-template-columns: 1fr;
    }

    html body .content-shell-dashboard .wellness-status-result {
        font-size: 1.15rem;
    }

    html body .content-shell-dashboard .wellness-timeline {
        padding: 14px 8px 10px;
    }

    html body .content-shell-dashboard .wellness-rhythm-bars {
        min-height: 56px;
        gap: 6px;
        padding: 10px;
    }
}

html body .content-shell-dashboard {
    max-width: 1160px;
}

html body .content-shell-dashboard .page-head {
    margin-bottom: 28px;
}

html body .content-shell-dashboard .page-head h1 {
    font-weight: 760;
    letter-spacing: 0;
}

html body .content-shell-dashboard .page-head p {
    color: #647893;
    line-height: 1.58;
}

html body .content-shell-dashboard .overview-wellness-grid {
    margin: 0 0 26px;
    padding: 0;
}

html body .content-shell-dashboard .overview-top-grid,
html body .content-shell-dashboard .overview-bottom-grid {
    gap: 22px;
    margin-bottom: 28px;
}

html body .content-shell-dashboard .wellness-prediction-card {
    display: grid;
    gap: 0;
    padding: 28px;
    border: 1px solid rgba(204, 217, 235, 0.82);
    border-radius: 28px;
    background: linear-gradient(145deg, #ffffff 0%, #f9fbff 100%);
    box-shadow: 0 18px 42px rgba(27, 47, 78, 0.065);
}

html body .content-shell-dashboard .wellness-prediction-card::before,
html body .content-shell-dashboard .wellness-prediction-card::after {
    display: none;
}

html body .content-shell-dashboard .wellness-card-header {
    display: flex;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(221, 230, 243, 0.86);
}

html body .content-shell-dashboard .wellness-card-title-wrap h3 {
    font-size: 1.08rem;
    font-weight: 740;
    color: #152944;
}

html body .content-shell-dashboard .wellness-status-badge {
    padding: 7px 11px;
    border-radius: 999px;
    background: #f8fbff;
    border: 1px solid rgba(211, 222, 239, 0.9);
    color: #627894;
    font-size: 0.76rem;
    font-weight: 650;
    box-shadow: none;
}

html body .content-shell-dashboard .wellness-status-row {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(285px, 0.92fr);
    align-items: stretch;
    gap: 22px;
    margin-top: 22px;
}

html body .content-shell-dashboard .wellness-status-copy {
    max-width: none;
    min-height: 100%;
    padding: 4px 0;
    display: grid;
    align-content: center;
    gap: 10px;
}

html body .content-shell-dashboard .wellness-trend-label {
    margin: 0;
    color: #74869e;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

html body .content-shell-dashboard .wellness-status-result {
    margin: 0;
    color: #2d4664;
    font-size: 1.78rem;
    line-height: 1.12;
    font-weight: 720;
}

html body .content-shell-dashboard .wellness-status-result-warning {
    color: #9d5d62;
}

html body .content-shell-dashboard .wellness-status-result-success {
    color: #24734b;
}

html body .content-shell-dashboard .wellness-status-result-info {
    color: #3767a8;
}

html body .content-shell-dashboard .wellness-support-context {
    margin: -2px 0 2px;
    color: #71839a;
    font-size: 0.86rem;
    line-height: 1.48;
}

html body .content-shell-dashboard .wellness-summary-lines {
    gap: 8px;
    margin-top: 2px;
    color: #5f738c;
    font-size: 0.9rem;
    font-weight: 540;
    line-height: 1.56;
}

html body .content-shell-dashboard .wellness-mini-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

html body .content-shell-dashboard .wellness-mini-metrics span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 7px 10px;
    border-radius: 999px;
    background: #f7faff;
    border: 1px solid rgba(216, 226, 240, 0.88);
    color: #60758f;
    font-size: 0.76rem;
    font-weight: 650;
}

html body .content-shell-dashboard .wellness-compact-note {
    margin-top: 2px;
    color: #8291a5;
    font-size: 0.78rem;
    line-height: 1.48;
    font-weight: 520;
}

html body .content-shell-dashboard .wellness-status-visual {
    width: 100%;
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(216, 226, 240, 0.9);
    border-radius: 22px;
    background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
    box-shadow: none;
}

html body .content-shell-dashboard .wellness-visual-meta {
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(224, 232, 243, 0.88);
}

html body .content-shell-dashboard .wellness-visual-label,
html body .content-shell-dashboard .wellness-visual-soft-label {
    color: #788aa1;
    font-size: 0.68rem;
    font-weight: 720;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

html body .content-shell-dashboard .wellness-visual-soft-label {
    color: #9aa8ba;
    font-weight: 650;
}

html body .content-shell-dashboard .wellness-checkin-trend {
    gap: 11px;
    margin-top: 16px;
}

html body .content-shell-dashboard .wellness-checkin-day {
    gap: 8px;
}

html body .content-shell-dashboard .wellness-checkin-dot {
    width: 12px;
    height: 12px;
    border-width: 2px;
    box-shadow: none;
    opacity: 0.82;
}

html body .content-shell-dashboard .wellness-checkin-label {
    color: #8494a8;
    font-size: 0.62rem;
    font-weight: 720;
}

html body .content-shell-dashboard .wellness-data-helper {
    margin-top: 13px;
    color: #8291a5;
    font-size: 0.78rem;
    line-height: 1.46;
    font-weight: 520;
}

html body .content-shell-dashboard .feature-card,
html body .content-shell-dashboard .panel-card {
    padding: 24px;
    border: 1px solid rgba(204, 217, 235, 0.78);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 16px 36px rgba(29, 48, 78, 0.055);
}

html body .content-shell-dashboard .feature-card {
    min-height: 168px;
    gap: 12px;
}

html body .content-shell-dashboard .feature-card-top,
html body .content-shell-dashboard .panel-head {
    gap: 14px;
}

html body .content-shell-dashboard .feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
}

html body .content-shell-dashboard .feature-card h3,
html body .content-shell-dashboard .panel-card h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 730;
    line-height: 1.32;
}

html body .content-shell-dashboard .feature-card p,
html body .content-shell-dashboard .panel-card p {
    color: #637893;
    line-height: 1.58;
}

html body .content-shell-dashboard .mini-tag,
html body .content-shell-dashboard .med-status-badge {
    padding: 6px 10px;
    border: 1px solid rgba(216, 226, 240, 0.88);
    border-radius: 999px;
    background: #f8fbff;
    color: #627894;
    font-size: 0.78rem;
    font-weight: 650;
    box-shadow: none;
}

html body .content-shell-dashboard .metric-row {
    gap: 8px;
}

html body .content-shell-dashboard .metric-row span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #f7faff;
    color: #546b87;
    font-size: 0.82rem;
}

html body .content-shell-dashboard .cycle-focus-card,
html body .content-shell-dashboard .appointment-item {
    border: 1px solid rgba(216, 226, 240, 0.82);
    box-shadow: none;
}

html body .content-shell-dashboard .cycle-focus-card {
    padding: 24px;
    background: #fff9fb;
}

html body .content-shell-dashboard .appointment-item {
    padding: 16px;
    background: #fbfdff;
}

body.theme-dark .content-shell-dashboard .wellness-prediction-card,
body.theme-dark .content-shell-dashboard .wellness-status-visual,
body.theme-dark .content-shell-dashboard .feature-card,
body.theme-dark .content-shell-dashboard .panel-card,
body.theme-dark .content-shell-dashboard .appointment-item {
    background: #152033;
    border-color: rgba(129, 153, 190, 0.22);
}

@media (max-width: 900px) {
    html body .content-shell-dashboard .wellness-status-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    html body .content-shell-dashboard .wellness-status-copy {
        align-content: start;
    }
}

@media (max-width: 720px) {
    html body .content-shell-dashboard .page-head {
        margin-bottom: 18px;
    }

    html body .content-shell-dashboard .overview-wellness-grid,
    html body .content-shell-dashboard .overview-top-grid,
    html body .content-shell-dashboard .overview-bottom-grid {
        gap: 14px;
        margin-bottom: 18px;
    }

    html body .content-shell-dashboard .wellness-prediction-card,
    html body .content-shell-dashboard .feature-card,
    html body .content-shell-dashboard .panel-card {
        padding: 18px;
        border-radius: 20px;
    }

    html body .content-shell-dashboard .wellness-card-header {
        display: grid;
        gap: 10px;
        padding-bottom: 14px;
    }

    html body .content-shell-dashboard .wellness-status-row {
        margin-top: 16px;
    }

    html body .content-shell-dashboard .wellness-status-result {
        font-size: 1.45rem;
    }

    html body .content-shell-dashboard .wellness-summary-lines {
        font-size: 0.84rem;
    }

    html body .content-shell-dashboard .wellness-mini-metrics {
        gap: 6px;
    }

    html body .content-shell-dashboard .wellness-mini-metrics span {
        min-height: 28px;
        padding: 6px 9px;
        font-size: 0.72rem;
    }

    html body .content-shell-dashboard .wellness-status-visual {
        padding: 14px;
        border-radius: 18px;
    }

    html body .content-shell-dashboard .wellness-checkin-trend {
        gap: 7px;
        margin-top: 12px;
    }

    html body .content-shell-dashboard .feature-card {
        min-height: 0;
    }

    html body .content-shell-dashboard .feature-icon {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }
}

.content-shell-dashboard .page-head {
    margin-bottom: 34px;
}

.content-shell-dashboard .overview-wellness-grid,
.content-shell-dashboard .overview-top-grid,
.content-shell-dashboard .overview-bottom-grid {
    gap: 26px;
    margin-bottom: 34px;
}

.content-shell-dashboard .panel-card,
.content-shell-dashboard .feature-card,
.content-shell-dashboard .wellness-prediction-card {
    border-width: 1px;
    border-color: rgba(203, 216, 235, 0.76);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 18px 42px rgba(29, 48, 78, 0.06);
}

.content-shell-dashboard .feature-card,
.content-shell-dashboard .panel-card {
    padding: 28px;
}

.content-shell-dashboard .wellness-prediction-card {
    width: 100%;
    padding: 34px;
    border-radius: 30px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
}

.content-shell-dashboard .wellness-prediction-card::before,
.content-shell-dashboard .wellness-prediction-card::after {
    display: none;
}

.content-shell-dashboard .wellness-card-header {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(220, 229, 242, 0.78);
}

.content-shell-dashboard .wellness-status-row {
    gap: 30px;
    margin-top: 24px;
}

.content-shell-dashboard .wellness-status-visual,
.content-shell-dashboard .appointment-item,
.content-shell-dashboard .cycle-focus-card {
    border-width: 1px;
    box-shadow: none;
}

.content-shell-dashboard .feature-card h3,
.content-shell-dashboard .panel-card h3,
.content-shell-dashboard .wellness-card-title-wrap h3 {
    margin: 0;
    font-weight: 760;
    line-height: 1.28;
}

.content-shell-dashboard .feature-card p,
.content-shell-dashboard .panel-card p,
.content-shell-dashboard .wellness-summary-lines {
    line-height: 1.68;
    font-weight: 540;
}

.content-shell-dashboard .mini-tag,
.content-shell-dashboard .wellness-status-badge,
.content-shell-dashboard .med-status-badge {
    background: #f8fbff;
    border: 1px solid rgba(211, 222, 239, 0.78);
    box-shadow: none;
    font-weight: 650;
}

@media (max-width: 900px) {
    .content-shell-dashboard .wellness-status-row {
        display: grid;
    }

    .content-shell-dashboard .wellness-status-visual {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 720px) {
    .content-shell-dashboard .overview-wellness-grid,
    .content-shell-dashboard .overview-top-grid,
    .content-shell-dashboard .overview-bottom-grid {
        gap: 18px;
        margin-bottom: 22px;
    }

    .content-shell-dashboard .feature-card,
    .content-shell-dashboard .panel-card,
    .content-shell-dashboard .wellness-prediction-card {
        padding: 20px;
        border-radius: 22px;
    }
}

html body .content-shell-dashboard .page-head {
    margin-bottom: 34px;
}

html body .content-shell-dashboard .overview-wellness-grid,
html body .content-shell-dashboard .overview-top-grid,
html body .content-shell-dashboard .overview-bottom-grid {
    gap: 26px;
    margin-bottom: 34px;
}

html body .content-shell-dashboard .panel-card,
html body .content-shell-dashboard .feature-card,
html body .content-shell-dashboard .wellness-prediction-card {
    border-width: 1px;
    border-color: rgba(203, 216, 235, 0.76);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 18px 42px rgba(29, 48, 78, 0.06);
}

html body .content-shell-dashboard .feature-card,
html body .content-shell-dashboard .panel-card {
    padding: 28px;
}

html body .content-shell-dashboard .wellness-prediction-card {
    width: 100%;
    padding: 34px;
    border-radius: 30px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
}

html body .content-shell-dashboard .wellness-prediction-card::before,
html body .content-shell-dashboard .wellness-prediction-card::after {
    display: none;
}

html body .content-shell-dashboard .wellness-card-header {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(220, 229, 242, 0.78);
}

html body .content-shell-dashboard .wellness-status-row {
    gap: 30px;
    margin-top: 24px;
}

html body .content-shell-dashboard .wellness-status-visual,
html body .content-shell-dashboard .appointment-item,
html body .content-shell-dashboard .cycle-focus-card {
    border-width: 1px;
    box-shadow: none;
}

html body .content-shell-dashboard .feature-card h3,
html body .content-shell-dashboard .panel-card h3,
html body .content-shell-dashboard .wellness-card-title-wrap h3 {
    margin: 0;
    font-weight: 760;
    line-height: 1.28;
}

html body .content-shell-dashboard .feature-card p,
html body .content-shell-dashboard .panel-card p,
html body .content-shell-dashboard .wellness-summary-lines {
    line-height: 1.68;
    font-weight: 540;
}

html body .content-shell-dashboard .mini-tag,
html body .content-shell-dashboard .wellness-status-badge,
html body .content-shell-dashboard .med-status-badge {
    background: #f8fbff;
    border: 1px solid rgba(211, 222, 239, 0.78);
    box-shadow: none;
    font-weight: 650;
}

.content-shell-dashboard {
    max-width: 1180px;
}

.content-shell-dashboard .page-head {
    margin-bottom: 34px;
    align-items: flex-start;
}

.content-shell-dashboard .page-head h1 {
    margin-bottom: 8px;
    letter-spacing: 0;
    font-weight: 780;
}

.content-shell-dashboard .page-head p {
    max-width: 640px;
    color: #667a97;
    line-height: 1.65;
}

.content-shell-dashboard .overview-wellness-grid,
.content-shell-dashboard .overview-top-grid,
.content-shell-dashboard .overview-bottom-grid {
    gap: 26px;
    margin-bottom: 34px;
}

.content-shell-dashboard .panel-card,
.content-shell-dashboard .feature-card {
    border: 1px solid rgba(203, 216, 235, 0.76);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 42px rgba(29, 48, 78, 0.06);
}

.content-shell-dashboard .feature-card {
    min-height: 190px;
    padding: 26px;
    display: grid;
    align-content: start;
    gap: 14px;
}

.content-shell-dashboard .panel-card {
    padding: 28px;
}

.content-shell-dashboard .feature-card-top,
.content-shell-dashboard .panel-head,
.content-shell-dashboard .wellness-card-header {
    gap: 18px;
}

.content-shell-dashboard .feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    box-shadow: none;
}

.content-shell-dashboard .mini-tag,
.content-shell-dashboard .wellness-status-badge,
.content-shell-dashboard .med-status-badge {
    border: 1px solid rgba(211, 222, 239, 0.78);
    background: #f8fbff;
    color: #657998;
    box-shadow: none;
    font-weight: 650;
}

.content-shell-dashboard .feature-card h3,
.content-shell-dashboard .panel-card h3,
.content-shell-dashboard .wellness-card-title-wrap h3 {
    margin: 0;
    color: #142746;
    font-weight: 760;
    line-height: 1.28;
}

.content-shell-dashboard .feature-card p,
.content-shell-dashboard .panel-card p {
    color: #637996;
    line-height: 1.68;
}

.content-shell-dashboard .wellness-prediction-card {
    width: 100%;
    padding: 32px;
    border: 1px solid rgba(199, 214, 234, 0.82);
    border-radius: 30px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 20px 48px rgba(27, 47, 78, 0.07);
}

.content-shell-dashboard .wellness-prediction-card::before,
.content-shell-dashboard .wellness-prediction-card::after {
    display: none;
}

.content-shell-dashboard .wellness-card-header {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(220, 229, 242, 0.78);
}

.content-shell-dashboard .wellness-status-row {
    gap: 30px;
    margin-top: 24px;
    align-items: stretch;
}

.content-shell-dashboard .wellness-status-copy {
    max-width: 660px;
    display: grid;
    align-content: start;
    gap: 12px;
}

.content-shell-dashboard .wellness-trend-label {
    margin: 0;
    color: #7588a3;
    font-size: 0.76rem;
    font-weight: 720;
}

.content-shell-dashboard .wellness-status-result {
    font-size: 2.15rem;
    color: #1b3558;
    font-weight: 780;
}

.content-shell-dashboard .wellness-summary-lines {
    gap: 10px;
    margin-top: 2px;
    color: #5d7391;
    font-weight: 560;
    line-height: 1.62;
}

.content-shell-dashboard .wellness-compact-note,
.content-shell-dashboard .wellness-data-helper {
    color: #7d8fa8;
    font-weight: 520;
    line-height: 1.6;
}

.content-shell-dashboard .wellness-status-visual {
    width: min(300px, 34%);
    min-width: 240px;
    padding: 20px;
    border: 1px solid rgba(213, 224, 240, 0.84);
    border-radius: 24px;
    background: #fbfdff;
    box-shadow: none;
}

.content-shell-dashboard .wellness-checkin-trend {
    gap: 12px;
}

.content-shell-dashboard .wellness-checkin-dot {
    width: 12px;
    height: 12px;
    box-shadow: none;
}

.content-shell-dashboard .wellness-section-label,
.content-shell-dashboard .wellness-factor-list,
.content-shell-dashboard .wellness-recommendation-box {
    margin-top: 18px;
}

.content-shell-dashboard .med-progress-breakdown.compact {
    gap: 10px;
    margin-top: 6px;
}

.content-shell-dashboard .metric-row {
    gap: 10px;
    margin-top: 4px;
}

.content-shell-dashboard .metric-row span {
    padding: 8px 11px;
    border-radius: 999px;
    background: #f7faff;
    color: #516989;
    font-weight: 650;
}

.content-shell-dashboard .thin-progress {
    margin-top: 8px;
    height: 7px;
    background: #edf3fa;
}

.content-shell-dashboard .cycle-panel {
    border-color: rgba(203, 216, 235, 0.76);
}

.content-shell-dashboard .cycle-focus-card {
    margin-top: 20px;
    padding: 28px;
    border: 1px solid rgba(229, 215, 225, 0.88);
    border-radius: 26px;
    background: #fff9fb;
    box-shadow: none;
}

.content-shell-dashboard .cycle-day-ring {
    width: 76px;
    height: 76px;
    border-width: 2px;
    border-color: #f4b6c7;
    background: #ffffff;
    color: #d84d75;
}

.content-shell-dashboard .appointment-stack {
    gap: 16px;
    margin-top: 20px;
}

.content-shell-dashboard .appointment-item {
    padding: 18px;
    border: 1px solid rgba(213, 224, 240, 0.78);
    border-radius: 20px;
    background: #fbfdff;
    box-shadow: none;
}

.content-shell-dashboard .appointment-icon {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: #f3f7fc;
}

body.theme-dark .content-shell-dashboard .panel-card,
body.theme-dark .content-shell-dashboard .feature-card,
body.theme-dark .content-shell-dashboard .wellness-prediction-card,
body.theme-dark .content-shell-dashboard .wellness-status-visual,
body.theme-dark .content-shell-dashboard .appointment-item {
    background: #152033;
    border-color: rgba(129, 153, 190, 0.2);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

@media (max-width: 900px) {
    .content-shell-dashboard .wellness-status-row {
        display: grid;
    }

    .content-shell-dashboard .wellness-status-visual {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 720px) {
    .content-shell-dashboard .page-head {
        margin-bottom: 24px;
    }

    .content-shell-dashboard .overview-wellness-grid,
    .content-shell-dashboard .overview-top-grid,
    .content-shell-dashboard .overview-bottom-grid {
        gap: 18px;
        margin-bottom: 22px;
    }

    .content-shell-dashboard .feature-card,
    .content-shell-dashboard .panel-card,
    .content-shell-dashboard .wellness-prediction-card {
        padding: 20px;
        border-radius: 22px;
    }

    .content-shell-dashboard .wellness-status-result {
        font-size: 1.8rem;
    }

    .content-shell-dashboard .wellness-card-header {
        display: grid;
        padding-bottom: 16px;
    }
}

.offline-page {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 79, 135, 0.14), transparent 34%),
        linear-gradient(135deg, #fff7fb 0%, #eef5ff 100%);
    color: #071f4f;
    font-family: "Plus Jakarta Sans", Arial, sans-serif;
}

.offline-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.offline-card {
    width: min(100%, 560px);
    padding: 34px;
    border: 1px solid rgba(255, 79, 135, 0.24);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 60px rgba(31, 61, 116, 0.16);
    text-align: center;
}

.offline-logo {
    width: 84px;
    height: 84px;
    border-radius: 22px;
    box-shadow: 0 14px 30px rgba(255, 79, 135, 0.2);
}

.offline-card h1 {
    margin: 14px 0 10px;
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: 0;
}

.offline-card p {
    margin: 0 auto 22px;
    color: #5570a3;
    line-height: 1.6;
}

.offline-list {
    display: grid;
    gap: 10px;
    margin: 0 0 24px;
    text-align: left;
}

.offline-list span {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f7faff;
    color: #385686;
}

.offline-card button {
    border: 0;
    border-radius: 999px;
    padding: 13px 24px;
    background: linear-gradient(135deg, #ff4f87, #ff7aaa);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(255, 79, 135, 0.24);
}

.med-schedule-list .clean-med-card.schedule-card {
    min-height: 0 !important;
    height: auto !important;
    justify-content: flex-start !important;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
}

.med-schedule-list .clean-med-card .schedule-left {
    flex: 1 1 auto;
    min-width: 0;
}

.med-schedule-list .clean-med-card .schedule-right {
    flex: 0 0 auto;
    margin-left: auto;
}

@media (max-width: 1080px) {
    .med-schedule-list .clean-med-card.schedule-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .med-schedule-list .clean-med-card .schedule-left,
    .med-schedule-list .clean-med-card .schedule-right {
        flex: 0 0 auto;
        width: 100%;
        margin-left: 0;
    }

    .med-schedule-list .clean-med-card .schedule-right {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
}

@media (max-width: 720px) {
    .med-schedule-list .clean-med-card.schedule-card {
        padding: 12px;
        gap: 10px;
    }

    .med-schedule-list .clean-med-card .schedule-right {
        flex-direction: column;
        align-items: stretch;
    }

    .med-schedule-list .clean-med-card .time-label {
        align-self: flex-start;
    }

    .med-schedule-list .clean-med-card .med-action-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .med-schedule-list .clean-med-card .med-action-row .inline-action,
    .med-schedule-list .clean-med-card .med-delete-button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .med-schedule-list .clean-med-card .med-action-row {
        grid-template-columns: 1fr;
    }
}

.med-schedule-list .clean-med-card.schedule-card {
    min-height: 0 !important;
    height: auto !important;
    justify-content: flex-start !important;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
}

.med-schedule-list .clean-med-card .schedule-left {
    flex: 1 1 auto;
    min-width: 0;
}

.med-schedule-list .clean-med-card .schedule-right {
    flex: 0 0 auto;
    margin-left: auto;
}

@media (max-width: 1080px) {
    .med-schedule-list .clean-med-card.schedule-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .med-schedule-list .clean-med-card .schedule-left,
    .med-schedule-list .clean-med-card .schedule-right {
        flex: 0 0 auto;
        width: 100%;
        margin-left: 0;
    }

    .med-schedule-list .clean-med-card .schedule-right {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
}

@media (max-width: 720px) {
    .med-schedule-list .clean-med-card.schedule-card {
        padding: 12px;
        gap: 10px;
    }

    .med-schedule-list .clean-med-card .schedule-right {
        flex-direction: column;
        align-items: stretch;
    }

    .med-schedule-list .clean-med-card .time-label {
        align-self: flex-start;
    }

    .med-schedule-list .clean-med-card .med-action-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .med-schedule-list .clean-med-card .med-action-row .inline-action,
    .med-schedule-list .clean-med-card .med-delete-button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .med-schedule-list .clean-med-card .med-action-row {
        grid-template-columns: 1fr;
    }
}

.med-schedule-list {
    gap: 14px;
}

.clean-med-card.schedule-card {
    min-height: 0;
    height: auto;
    align-items: center;
    padding: 16px 18px;
}

.clean-med-card .schedule-left {
    flex: 1 1 auto;
    min-width: 0;
}

.clean-med-card .schedule-right {
    flex: 0 1 auto;
}

.clean-med-card .med-action-row {
    gap: 8px;
}

.clean-med-card .med-action-row .inline-action {
    min-height: 36px;
}

@media (max-width: 1080px) {
    .clean-med-card.schedule-card {
        align-items: stretch;
        gap: 14px;
    }

    .clean-med-card .schedule-left {
        flex: 0 1 auto;
    }

    .clean-med-card .schedule-right {
        flex: 0 1 auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
}

@media (max-width: 720px) {
    .clean-med-card.schedule-card {
        padding: 14px;
        gap: 12px;
    }

    .clean-med-card .schedule-left {
        align-items: flex-start;
    }

    .clean-med-card .schedule-right {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .clean-med-card .time-label {
        align-self: flex-start;
    }

    .clean-med-card .med-action-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .clean-med-card .med-action-row form {
        min-width: 0;
    }

    .clean-med-card .med-action-row .inline-action,
    .clean-med-card .med-delete-button {
        width: 100%;
        min-height: 38px;
    }
}

@media (max-width: 420px) {
    .clean-med-card.schedule-card {
        padding: 12px;
    }

    .clean-med-card .med-action-row {
        grid-template-columns: 1fr;
    }
}

.med-title-row,
.med-action-row,
.med-progress-breakdown {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.med-title-row h3 {
    margin: 0;
}

.med-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 5px 10px;
    border: 1px solid rgba(144, 165, 202, 0.24);
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0;
    white-space: nowrap;
}

.med-status-message {
    color: var(--muted);
}

.med-status-success {
    background: rgba(63, 185, 80, 0.14);
    border-color: rgba(63, 185, 80, 0.34);
    color: #74d68b;
}

.med-status-info {
    background: rgba(70, 135, 255, 0.14);
    border-color: rgba(70, 135, 255, 0.34);
    color: #9ab9ff;
}

.med-status-warning {
    background: rgba(255, 206, 91, 0.14);
    border-color: rgba(255, 206, 91, 0.38);
    color: #ffd978;
}

.med-status-danger {
    background: rgba(255, 92, 130, 0.14);
    border-color: rgba(255, 92, 130, 0.34);
    color: #ff9bb4;
}

.med-status-muted,
.med-status-neutral {
    background: rgba(159, 176, 207, 0.12);
    border-color: rgba(159, 176, 207, 0.24);
    color: var(--muted);
}

.med-action-row form {
    margin: 0;
}

.med-action-primary {
    background: #eaf2ff;
    color: #1d5cff;
    border-color: #bcd4ff;
}

.med-schedule-list {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

.clean-med-card.schedule-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    min-width: 0;
}

.clean-med-card .schedule-left {
    align-items: flex-start;
    flex: 1 1 320px;
    min-width: 0;
}

.clean-med-card .schedule-left > div {
    min-width: 0;
}

.clean-med-card .med-title-row {
    align-items: center;
    gap: 8px 10px;
}

.clean-med-card .med-title-row h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.15;
}

.clean-med-card p {
    margin-top: 6px;
    font-size: 0.92rem;
    line-height: 1.4;
}

.clean-med-card .med-status-message {
    margin-top: 8px;
    font-size: 0.84rem;
    line-height: 1.35;
}

.clean-med-card .schedule-right {
    flex: 0 0 auto;
    min-width: min(100%, 260px);
    align-items: flex-end;
    gap: 10px;
}

.clean-med-card .time-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(144, 165, 202, 0.1);
    white-space: nowrap;
    font-size: 0.95rem;
}

.clean-med-card .med-action-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    max-width: 360px;
}

.clean-med-card .med-action-row form {
    margin: 0;
}

.clean-med-card .med-action-row .inline-action {
    min-height: 36px;
    padding: 8px 11px;
    border-radius: 11px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.clean-med-card .med-delete-button {
    flex: 0 0 auto;
}

.meds-progress-panel {
    align-items: center;
    gap: 18px;
}

.meds-progress-panel .progress-copy {
    min-width: 0;
}

@media (min-width: 1180px) {
    .clean-med-card .schedule-right {
        min-width: 360px;
    }

    .clean-med-card .med-action-row {
        max-width: 420px;
    }
}

@media (max-width: 1080px) {
    .clean-med-card.schedule-card {
        flex-direction: column;
        align-items: stretch;
    }

    .clean-med-card .schedule-left {
        width: 100%;
    }

    .clean-med-card .schedule-right {
        width: 100%;
        min-width: 0;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .clean-med-card .med-action-row {
        max-width: none;
        justify-content: flex-end;
    }

    .clean-med-card .time-label {
        flex: 0 0 auto;
    }
}

@media (max-width: 720px) {
    .meds-progress-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .meds-progress-panel .progress-circle {
        align-self: flex-start;
        width: 76px;
        height: 76px;
        flex-basis: 76px;
        font-size: 0.95rem;
    }

    .clean-med-card.schedule-card {
        padding: 14px;
        border-radius: 18px;
        gap: 13px;
    }

    .clean-med-card .schedule-left {
        gap: 12px;
    }

    .clean-med-card .check-badge {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .clean-med-card .med-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .clean-med-card .med-status-badge {
        min-height: 24px;
        padding: 4px 9px;
        font-size: 0.72rem;
    }

    .clean-med-card .schedule-right {
        flex-direction: column;
        align-items: stretch;
    }

    .clean-med-card .time-label {
        align-self: flex-start;
    }

    .clean-med-card .med-action-row {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .clean-med-card .med-action-row form {
        min-width: 0;
    }

    .clean-med-card .med-action-row .inline-action,
    .clean-med-card .med-delete-button {
        width: 100%;
        min-height: 38px;
    }

    .clean-med-card .med-delete-button {
        border-radius: 11px;
    }

    .med-adherence-banner {
        padding: 14px;
        border-radius: 16px;
    }
}

@media (max-width: 420px) {
    .clean-med-card .med-action-row {
        grid-template-columns: 1fr;
    }

    .clean-med-card .med-title-row h3 {
        font-size: 1rem;
    }

    .clean-med-card p {
        font-size: 0.86rem;
    }

    .med-progress-breakdown .med-status-badge {
        width: 100%;
        justify-content: flex-start;
        white-space: normal;
    }
}

html[data-theme="dark"] {
    color-scheme: dark;
}

body.theme-dark {
    --bg: #0f1729;
    --sidebar: #131d31;
    --card: #162238;
    --surface: #162238;
    --surface-soft: #1a2742;
    --surface-subtle: #122038;
    --surface-muted: #1a2742;
    --ink: #f3f7ff;
    --muted: #9fb0cf;
    --text-soft: #bfd0ee;
    --text-soft-strong: #aab9d5;
    --text-tertiary: #9fb0cf;
    --line: #263654;
    --line-strong: #31456a;
    --pink-soft: rgba(255, 79, 122, 0.12);
    --blue-soft: rgba(50, 123, 246, 0.14);
    --green-soft: rgba(34, 197, 94, 0.14);
    --purple-soft: rgba(139, 92, 246, 0.16);
    --mobile-control-border: var(--line);
    --mobile-control-ink: var(--ink);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    width: 100%;
    min-height: 100vh;
    font-family: "Plus Jakarta Sans", sans-serif;
    background: var(--bg);
    color: var(--ink);
    overflow-x: hidden;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
    max-width: 100%;
}

.app-shell,
.main-content,
.content-shell,
.page-head,
.overview-wellness-grid,
.overview-top-grid,
.overview-bottom-grid,
.lifestyle-input-grid,
.lifestyle-summary-grid,
.appointments-layout,
.appointments-col,
.calendar-layout,
.calendar-main,
.calendar-side,
.mental-layout,
.panel-card,
.feature-card,
.schedule-card,
.appt-card,
.history-card,
.clean-med-card,
.lifestyle-input-card,
.lifestyle-summary-card,
.mood-check-card,
.mood-trends-card,
.settings-section,
.profile-section,
.modal-card {
    min-width: 0;
}

.content-shell > * {
    max-width: 100%;
}

:where(.panel-card, .feature-card, .schedule-card, .appt-card, .history-card, .clean-med-card, .lifestyle-input-card, .lifestyle-summary-card, .appointment-item, .feedback-preview-card, .profile-detail-card, .settings-mini-block, .modal-card, .flash, .empty-state) {
    max-width: 100%;
}

:where(.panel-card, .feature-card, .schedule-card, .appt-card, .history-card, .clean-med-card, .lifestyle-input-card, .lifestyle-summary-card, .appointment-item, .feedback-preview-card, .profile-detail-card, .settings-mini-block, .modal-card, .flash, .empty-state) :where(p, h1, h2, h3, h4, strong, span, li, small, div) {
    overflow-wrap: break-word;
}

:where(.appt-note-box, .history-note, .history-primary-meta, .history-follow-up, .cycle-detail-item p, .clean-med-card p, .feedback-preview-card, .profile-detail-card strong, .flash, .tip-item, .summary-description, .appointment-item p, .appointment-item strong) {
    overflow-wrap: anywhere;
    word-break: break-word;
}

body,
.sidebar,
.mobile-topbar,
.mobile-menu-header,
.mobile-menu-panel,
.bottom-nav,
.flash,
.outline-button,
.outline-wide,
.inline-action,
.smart-prompt-card,
.appointment-item,
.settings-mini-block,
.prediction-box,
.lifestyle-summary-card,
.appt-card,
.history-card,
.clean-med-card,
.calendar-cell,
.cycle-stat-card,
.cycle-info-warning,
.modal-card,
.reminder-toggle,
.auth-copy,
.auth-card,
.auth-mock-card,
.profile-detail-card,
.profile-avatar,
.profile-handle,
.profile-section-copy,
.profile-section-label {
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

body.theme-dark .mobile-menu-header,
body.theme-dark .mobile-menu-panel,
body.theme-dark .bottom-nav,
body.theme-dark .feature-card,
body.theme-dark .panel-card,
body.theme-dark .schedule-card,
body.theme-dark .appt-card,
body.theme-dark .history-card,
body.theme-dark .lifestyle-input-card,
body.theme-dark .feedback-preview-card,
body.theme-dark .empty-state,
body.theme-dark .appointment-item,
body.theme-dark .stat-card,
body.theme-dark .mini-list-row,
body.theme-dark .settings-mini-block,
body.theme-dark .settings-check span,
body.theme-dark .prediction-box,
body.theme-dark .insight-chip,
body.theme-dark .recommend-chip {
    background: #162238;
    color: var(--ink);
}

body.theme-dark .feature-card,
body.theme-dark .panel-card,
body.theme-dark .schedule-card,
body.theme-dark .appt-card,
body.theme-dark .history-card,
body.theme-dark .lifestyle-input-card,
body.theme-dark .feedback-preview-card,
body.theme-dark .empty-state {
    border-color: var(--line);
}

body.theme-dark .nav-list a:hover,
body.theme-dark .logout-link:hover,
body.theme-dark .bottom-nav a:hover {
    background: #1a2742;
}

body.theme-dark .mini-tag,
body.theme-dark .day-pill,
body.theme-dark .metric-pill,
body.theme-dark .outline-button {
    background: #1a2742;
    border-color: var(--line);
    color: var(--ink);
}

body.theme-dark .flash {
    border-color: var(--line);
}

body.theme-dark input,
body.theme-dark textarea,
body.theme-dark select {
    background: #0f1729;
    color: var(--ink);
    border-color: var(--line);
}

body.theme-dark .danger-zone {
    background: rgba(255, 79, 122, 0.08);
    border-color: rgba(255, 191, 208, 0.3);
}

body.theme-dark .mobile-topbar {
    background: var(--surface);
    border-color: var(--line);
}

body.theme-dark .mobile-menu-toggle,
body.theme-dark .mobile-menu-close {
    background: var(--surface);
    border-color: var(--mobile-control-border);
    color: var(--mobile-control-ink);
}

body.theme-dark .mobile-menu-overlay {
    background: rgba(6, 10, 20, 0.56);
}

body.theme-dark .cycle-focus-card {
    background: rgba(255, 79, 122, 0.1);
    border-color: rgba(255, 191, 208, 0.26);
}

body.theme-dark .cycle-focus-link:hover .cycle-focus-card,
body.theme-dark .cycle-focus-link:focus-visible .cycle-focus-card {
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.24);
    border-color: rgba(255, 191, 208, 0.4);
}

body.theme-dark .cycle-day-ring {
    background: #122038;
    border-color: rgba(255, 157, 180, 0.6);
}

body.theme-dark .cycle-focus-caption {
    color: #d5bdd7;
}

body.theme-dark .wellness-prediction-card {
    background:
        radial-gradient(circle at top right, rgba(74, 125, 219, 0.1) 0, transparent 30%),
        linear-gradient(145deg, rgba(22, 34, 56, 0.98), rgba(15, 23, 41, 0.96) 58%, rgba(18, 32, 56, 0.94));
    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.theme-dark .wellness-prediction-card::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 32%);
}

body.theme-dark .wellness-factor-chip {
    background: rgba(15, 23, 41, 0.78);
    border-color: rgba(159, 176, 207, 0.18);
    color: var(--ink);
}

body.theme-dark .wellness-recommendation-box {
    background: rgba(15, 23, 41, 0.56);
    border-color: rgba(159, 176, 207, 0.16);
}

body.theme-dark .wellness-status-explanation,
body.theme-dark .wellness-confidence-label,
body.theme-dark .wellness-data-completeness,
body.theme-dark .wellness-data-helper,
body.theme-dark .wellness-disclaimer,
body.theme-dark .wellness-summary-lines,
body.theme-dark .wellness-compact-note,
body.theme-dark .wellness-recommendation-copy p {
    color: #cbd9f1;
}

body.theme-dark .wellness-section-label,
body.theme-dark .wellness-visual-label {
    color: #9fb2d2;
}

body.theme-dark .wellness-mini-label {
    color: #b7c8e4;
}

body.theme-dark .wellness-status-visual {
    background:
        linear-gradient(180deg, rgba(23, 36, 60, 0.96), rgba(16, 27, 47, 0.92)),
        rgba(18, 31, 53, 0.92);
    border-color: rgba(143, 164, 199, 0.22);
    box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.theme-dark .wellness-status-badge {
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.theme-dark .wellness-status-badge-success {
    background: rgba(52, 179, 107, 0.14);
    border-color: rgba(52, 179, 107, 0.28);
    color: #96e7b8;
}

body.theme-dark .wellness-status-badge-warning {
    background: rgba(224, 102, 102, 0.14);
    border-color: rgba(224, 102, 102, 0.3);
    color: #ffb0b0;
}

body.theme-dark .wellness-status-badge-info {
    background: rgba(74, 125, 219, 0.16);
    border-color: rgba(126, 169, 235, 0.3);
    color: #a9c6ff;
}

body.theme-dark .wellness-trend-label {
    color: #9dbdff;
}

body.theme-dark .wellness-checkin-dot {
    background: #79a7ff;
    border-color: rgba(159, 190, 255, 0.28);
    box-shadow: 0 0 0 3px rgba(74, 125, 219, 0.14);
}

body.theme-dark .wellness-checkin-day-missing .wellness-checkin-dot {
    background: transparent;
    border-color: rgba(169, 188, 220, 0.42);
    box-shadow: none;
    opacity: 0.8;
}

body.theme-dark .wellness-checkin-label {
    color: #b7c8e4;
}

body.theme-dark .wellness-checkin-day-missing .wellness-checkin-label {
    color: #7f91ad;
}

body.theme-dark .mood-check-card,
body.theme-dark .mood-trends-card {
    border-color: rgba(127, 145, 175, 0.24);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
    background:
        radial-gradient(circle at top right, rgba(49, 67, 102, 0.4), rgba(18, 32, 56, 0.98) 58%),
        #162238;
}

body.theme-dark .mood-choice,
body.theme-dark .mood-chart-card,
body.theme-dark .stress-value,
body.theme-dark .sleep-mood-insight-icon {
    background: #122038;
    border-color: var(--line);
}

body.theme-dark .mood-choice:hover {
    border-color: #48638e;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.22);
}

body.theme-dark .mood-choice.warm.active {
    border-color: rgba(241, 205, 75, 0.42);
    background: rgba(241, 205, 75, 0.14);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

body.theme-dark .mood-choice.good.active {
    border-color: rgba(185, 221, 200, 0.36);
    background: rgba(65, 164, 111, 0.14);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

body.theme-dark .mood-choice.muted.active {
    border-color: rgba(217, 223, 234, 0.28);
    background: rgba(120, 140, 175, 0.14);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

body.theme-dark .mood-face,
body.theme-dark .mood-label,
body.theme-dark .mental-kicker,
body.theme-dark .stress-subcopy,
body.theme-dark .stress-scale,
body.theme-dark .chart-legend,
body.theme-dark .mood-tip-panel p,
body.theme-dark .sleep-mood-insight-card p,
body.theme-dark .sleep-mood-insight-meta,
body.theme-dark .auth-subtitle,
body.theme-dark .auth-footer-link,
body.theme-dark .auth-input-icon {
    color: var(--text-tertiary);
}

body.theme-dark .chart-grid line {
    stroke: #334767;
}

body.theme-dark .chart-y-labels text,
body.theme-dark .chart-x-label {
    fill: var(--text-tertiary);
}

body.theme-dark .chart-point {
    fill: #122038;
}

body.theme-dark .stress-slider {
    background: #31456a;
}

body.theme-dark .mood-tip-panel,
body.theme-dark .sleep-mood-insight-card {
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

body.theme-dark .mood-tip-panel {
    border-color: rgba(103, 177, 158, 0.26);
    background: linear-gradient(135deg, rgba(23, 55, 61, 0.95) 0%, rgba(18, 32, 56, 0.98) 100%);
}

body.theme-dark .mood-tip-panel h3 {
    color: #d4efe8;
}

body.theme-dark .sleep-mood-insight-card {
    border-color: rgba(159, 176, 207, 0.18);
    background: linear-gradient(135deg, rgba(24, 38, 64, 0.98) 0%, rgba(18, 32, 56, 0.96) 100%);
}

body.theme-dark .sleep-mood-insight-card-warning {
    border-color: rgba(240, 208, 200, 0.22);
    background: linear-gradient(135deg, rgba(65, 39, 32, 0.94) 0%, rgba(24, 24, 38, 0.96) 100%);
}

body.theme-dark .sleep-mood-insight-card-success {
    border-color: rgba(207, 230, 217, 0.2);
    background: linear-gradient(135deg, rgba(21, 52, 40, 0.94) 0%, rgba(18, 32, 56, 0.96) 100%);
}

body.theme-dark .sleep-mood-insight-card h3 {
    color: var(--ink);
}

body.theme-dark .alert-card {
    background: rgba(255, 79, 122, 0.08);
    border-color: rgba(255, 188, 200, 0.26);
}

body.theme-dark .alert-card.warning {
    background: rgba(255, 185, 92, 0.1);
    border-color: rgba(255, 216, 159, 0.28);
}

body.theme-dark .alert-card.success {
    background: rgba(42, 201, 131, 0.1);
    border-color: rgba(138, 228, 187, 0.28);
}

body.theme-dark .alert-card.neutral {
    background: rgba(74, 125, 219, 0.1);
    border-color: rgba(202, 220, 245, 0.22);
}

body.theme-dark .pattern-card {
    background: #162238;
    border-color: #31456a;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.2);
}

body.theme-dark .pattern-card p {
    color: var(--text-tertiary);
}

body.theme-dark .pattern-card.indigo {
    background: rgba(91, 93, 240, 0.08);
    border-color: rgba(153, 162, 255, 0.24);
}

body.theme-dark .pattern-card.purple {
    background: rgba(138, 43, 255, 0.08);
    border-color: rgba(197, 173, 255, 0.24);
}

body.theme-dark .pattern-card.orange {
    background: rgba(241, 135, 0, 0.08);
    border-color: rgba(255, 216, 159, 0.24);
}

body.theme-dark .pattern-card.green {
    background: rgba(7, 163, 107, 0.08);
    border-color: rgba(138, 228, 187, 0.24);
}

body.theme-dark .pattern-card.indigo h3 {
    color: #a5abff;
}

body.theme-dark .pattern-card.purple h3 {
    color: #c7adff;
}

body.theme-dark .pattern-card.orange h3 {
    color: #ffbe6c;
}

body.theme-dark .pattern-card.green h3 {
    color: #7fddb0;
}

body.theme-dark .alert-badge {
    background: #122038;
}

body.theme-dark .recommend-chip {
    border-color: var(--line);
}

body.theme-dark .lifestyle-summary-section {
    border-color: var(--line);
    background:
        radial-gradient(circle at top right, rgba(49, 67, 102, 0.3), rgba(18, 32, 56, 0.98) 58%),
        #162238;
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.24);
}

body.theme-dark .lifestyle-summary-card {
    background: linear-gradient(180deg, rgba(22, 34, 56, 0.98) 0%, rgba(18, 32, 56, 0.94) 100%);
    border-color: rgba(159, 176, 207, 0.16);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
}

body.theme-dark .lifestyle-summary-card-neutral {
    border-color: rgba(159, 176, 207, 0.16);
}

body.theme-dark .summary-description,
body.theme-dark .summary-action-detail,
body.theme-dark .tap-note,
body.theme-dark .feedback-preview-copy,
body.theme-dark .tip-item {
    color: var(--text-tertiary);
}

body.theme-dark .summary-divider {
    background: linear-gradient(90deg, rgba(79, 103, 142, 0.45), rgba(79, 103, 142, 0.14));
}

body.theme-dark .summary-recommendation-label {
    color: #93a8ca;
}

body.theme-dark .summary-action-title {
    color: var(--ink);
}

body.theme-dark .summary-badge-hydration,
body.theme-dark .summary-badge-sleep {
    background: rgba(34, 197, 94, 0.12);
    color: #8de0ab;
    border-color: rgba(141, 224, 171, 0.2);
    box-shadow: none;
}

body.theme-dark .summary-badge-activity {
    background: rgba(255, 185, 92, 0.14);
    color: #ffcf75;
    border-color: rgba(255, 207, 117, 0.2);
    box-shadow: none;
}

body.theme-dark .summary-badge-meal {
    background: rgba(255, 138, 92, 0.14);
    color: #ffbe9f;
    border-color: rgba(255, 190, 159, 0.2);
    box-shadow: none;
}

body.theme-dark .summary-badge-neutral {
    background: rgba(120, 140, 175, 0.14);
    color: #b8c7df;
    border-color: rgba(184, 199, 223, 0.16);
    box-shadow: none;
}

body.theme-dark .summary-action-card-hydration {
    background: linear-gradient(180deg, rgba(26, 55, 89, 0.88), rgba(18, 32, 56, 0.96));
    border-color: rgba(113, 167, 232, 0.26);
}

body.theme-dark .summary-action-card-sleep {
    background: linear-gradient(180deg, rgba(48, 39, 94, 0.88), rgba(18, 32, 56, 0.96));
    border-color: rgba(176, 160, 255, 0.24);
}

body.theme-dark .summary-action-card-activity {
    background: linear-gradient(180deg, rgba(84, 61, 21, 0.88), rgba(32, 28, 24, 0.96));
    border-color: rgba(255, 207, 117, 0.22);
}

body.theme-dark .summary-action-card-meal {
    background: linear-gradient(180deg, rgba(88, 47, 25, 0.88), rgba(32, 27, 24, 0.96));
    border-color: rgba(255, 190, 159, 0.22);
}

body.theme-dark .summary-action-card-neutral {
    background: linear-gradient(180deg, rgba(33, 48, 76, 0.88), rgba(18, 32, 56, 0.96));
    border-color: rgba(159, 176, 207, 0.18);
}

body.theme-dark .glass {
    background: #122038;
    border-color: #31456a;
    box-shadow: none;
}

body.theme-dark .glass.filled {
    background: #7ba7df;
    border-color: #3d7be7;
}

body.theme-dark .glass:hover {
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.18);
}

body.theme-dark .history-button {
    background: linear-gradient(180deg, rgba(26, 39, 66, 0.98) 0%, rgba(18, 32, 56, 0.98) 100%);
    border-color: rgba(124, 148, 202, 0.24);
    color: #a7c2ff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

body.theme-dark .history-button:hover {
    background: linear-gradient(180deg, rgba(34, 49, 81, 0.98) 0%, rgba(22, 34, 56, 0.98) 100%);
}

body.theme-dark .feedback-preview-card {
    background: rgba(22, 34, 56, 0.92);
    border-color: rgba(159, 176, 207, 0.16);
}

body.theme-dark .feedback-preview-tag {
    background: rgba(50, 123, 246, 0.14);
    color: #92b7ff;
}

body.theme-dark .feedback-chip-success {
    background: rgba(17, 122, 82, 0.16);
    color: #8fe0b8;
}

body.theme-dark .feedback-chip-warning {
    background: rgba(181, 91, 20, 0.18);
    color: #ffcb9c;
}

body.theme-dark .feedback-chip-info {
    background: rgba(49, 94, 168, 0.18);
    color: #a7c2ff;
}

body.theme-dark .tips-panel {
    background: rgba(255, 79, 122, 0.08);
    border-color: rgba(255, 204, 216, 0.24);
}

body.theme-dark .tip-item {
    background: rgba(15, 23, 41, 0.48);
    border-color: rgba(255, 213, 224, 0.18);
}

body.theme-dark .auth-page {
    background:
        radial-gradient(circle at top left, rgba(255, 79, 122, 0.18), transparent 34%),
        radial-gradient(circle at bottom right, rgba(50, 123, 246, 0.18), transparent 34%),
        linear-gradient(180deg, #0b1222 0%, #10192d 100%);
}

body.theme-dark .auth-copy {
    background: linear-gradient(180deg, #162238 0%, #10192d 100%);
}

body.theme-dark .auth-mock-card {
    border-color: var(--line);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

body.theme-dark .auth-input-wrap {
    background: #0f1729;
    border: 1px solid transparent;
}

body.theme-dark .auth-mock-card h1 {
    color: var(--ink);
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
    color: #7f93b4;
}

body.theme-dark .thin-progress,
body.theme-dark .wide-progress {
    background: #31456a;
}

body.theme-dark .progress-circle {
    background: #122038;
    border-color: #546a91;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.theme-dark .check-badge {
    background: #122038;
    border-color: #48638e;
}

body.theme-dark .subtle-dot {
    background: #7f93b4;
}

body.theme-dark .time-label,
body.theme-dark .prediction-label,
body.theme-dark .status-line,
body.theme-dark .pcos-note,
body.theme-dark .legend-note,
body.theme-dark .calendar-weekdays,
body.theme-dark .cycle-detail-label {
    color: var(--text-tertiary);
}

body.theme-dark .clean-med-card {
    background: #162238;
    border-color: #31456a;
}

body.theme-dark .med-delete-button {
    background: rgba(255, 79, 122, 0.12);
    border-color: rgba(255, 159, 185, 0.28);
    color: #ff9db9;
}

body.theme-dark .clean-med-card.current {
    background: rgba(50, 123, 246, 0.08);
    border-color: rgba(92, 151, 255, 0.56);
}

body.theme-dark .clean-med-card.done {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(159, 176, 207, 0.18);
}

body.theme-dark .med-adherence-banner {
    background: rgba(255, 185, 92, 0.1);
    border-color: rgba(255, 212, 95, 0.32);
    color: #ffcf75;
}

body.theme-dark .inline-action {
    background: #1a2742;
    border: 1px solid var(--line);
    color: #7fb0ff;
}

body.theme-dark .inline-action.muted {
    background: #162238;
    color: var(--text-soft-strong);
}

body.theme-dark .inline-action.danger-light {
    background: rgba(255, 79, 122, 0.12);
    color: #ff9db9;
    border-color: rgba(255, 159, 185, 0.28);
}

body.theme-dark .schedule-button {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

body.theme-dark .reminder-toggle {
    background: #122038;
    border-color: var(--line);
}

body.theme-dark .outline-wide {
    background: #1a2742;
    color: var(--ink);
    border-color: var(--line);
}

body.theme-dark .doctor-tag {
    background: rgba(21, 169, 157, 0.12);
    border-color: rgba(109, 230, 212, 0.3);
    color: #8ce7d8;
}

body.theme-dark .appt-date-block span,
body.theme-dark .appt-inline-meta,
body.theme-dark .appt-detail-row,
body.theme-dark .appt-note-label,
body.theme-dark .history-specialty {
    color: var(--text-tertiary);
}

body.theme-dark .history-primary-meta,
body.theme-dark .history-meta-divider,
body.theme-dark .history-label {
    color: var(--text-tertiary);
}

body.theme-dark .appt-note-box {
    border-color: rgba(255, 212, 95, 0.34);
    background: rgba(255, 212, 95, 0.12);
    color: var(--ink);
}

body.theme-dark .history-note {
    border-color: #31456a;
    background: #162238;
    color: var(--ink);
    word-break: break-all;
}

body.theme-dark .history-follow-up strong {
    color: var(--ink);
}

body.theme-dark .appt-detail-row strong {
    color: var(--ink);
}

body.theme-dark .history-summary,
body.theme-dark .history-link {
    color: #2ed4c3;
}

body.theme-dark .calendar-nav button,
body.theme-dark .calendar-nav-link {
    background: #162238;
    color: var(--text-soft);
    border-color: var(--line);
}

body.theme-dark .calendar-cell {
    background: #122038;
    border-color: #31456a;
    color: var(--ink);
    box-shadow: none;
}

body.theme-dark .calendar-cell.period {
    background: rgba(255, 79, 122, 0.12);
    border-color: rgba(255, 154, 176, 0.45);
}

body.theme-dark .calendar-cell.period.period-start {
    background:
        radial-gradient(circle at 28% 24%, rgba(255, 203, 218, 0.22), transparent 34%),
        linear-gradient(180deg, rgba(255, 90, 126, 0.34), rgba(255, 69, 112, 0.24));
    border-color: rgba(255, 140, 164, 0.95);
    box-shadow:
        inset 0 0 0 1px rgba(255, 220, 230, 0.12),
        0 0 0 1px rgba(255, 117, 149, 0.25),
        0 12px 26px rgba(255, 73, 118, 0.2);
}

body.theme-dark .calendar-cell.fertile {
    background: rgba(74, 125, 219, 0.14);
    border-color: rgba(124, 182, 255, 0.42);
}

body.theme-dark .calendar-cell.ovulation {
    background: rgba(151, 40, 255, 0.14);
    border-color: rgba(197, 138, 255, 0.42);
}

body.theme-dark .calendar-cell.luteal {
    background: rgba(255, 210, 93, 0.12);
    border-color: rgba(255, 210, 93, 0.38);
}

body.theme-dark .calendar-cell.today {
    box-shadow: inset 0 0 0 2px rgba(226, 235, 251, 0.38);
}

body.theme-dark .calendar-cell.selected {
    border-color: #ff5c86;
    box-shadow: inset 0 0 0 2px #ff5c86, 0 16px 30px rgba(0, 0, 0, 0.24);
}

body.theme-dark .calendar-cell.period.period-start.today {
    box-shadow:
        inset 0 0 0 2px rgba(226, 235, 251, 0.34),
        0 0 0 1px rgba(255, 117, 149, 0.24),
        0 12px 26px rgba(255, 73, 118, 0.2);
}

body.theme-dark .calendar-cell.period.period-start.selected {
    border-color: #ff7b99;
    box-shadow:
        inset 0 0 0 2px #ff7b99,
        0 0 0 1px rgba(255, 123, 153, 0.28),
        0 16px 30px rgba(0, 0, 0, 0.26);
}

body.theme-dark .calendar-cell.empty {
    background: transparent;
    border-color: transparent;
}

body.theme-dark .glyph-flower::after {
    background: #122038;
}

body.theme-dark .cycle-stat-card {
    background: #122038;
    border-color: var(--line);
}

body.theme-dark .cycle-detail-item {
    border-bottom-color: var(--line);
}

body.theme-dark .cycle-info-warning {
    background: rgba(255, 79, 122, 0.08);
    border-color: rgba(255, 154, 176, 0.28);
    color: #ffd7e4;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.14);
}

body.theme-dark .warning-icon {
    border-color: rgba(255, 107, 140, 0.44);
}

body.theme-dark .modal-backdrop {
    background: rgba(6, 10, 20, 0.72);
}

body.theme-dark .modal-card {
    background: #162238;
    border: 1px solid var(--line);
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

body.theme-dark .modal-card p {
    color: var(--muted);
}

body.theme-dark .modal-close {
    color: var(--text-tertiary);
}

body.theme-dark .symptom-pill {
    background: #122038;
    border-color: var(--line);
    color: var(--ink);
}

body.theme-dark .symptom-pill.active {
    background: rgba(217, 3, 104, 0.12);
    border-color: rgba(255, 114, 170, 0.42);
    color: #ff8eb6;
}

body.menu-open {
    overflow: hidden;
}

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

svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.app-shell {
    display: grid;
    grid-template-columns: 256px minmax(0, 1fr);
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
}

.sidebar {
    background: var(--sidebar);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    min-height: 0;
    overflow: hidden;
    position: sticky;
    top: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 24px 20px;
    border-bottom: 1px solid var(--line);
}

.brand h1 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--pink);
    background: var(--pink-soft);
}

.mobile-topbar,
.mobile-menu-overlay {
    display: none;
}

.nav-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 18px 16px;
}

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

.nav-list a,
.logout-link,
.bottom-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    color: var(--text-soft);
    font-weight: 500;
    transition: 0.18s ease;
}

.logout-link,
.mobile-logout-link {
    appearance: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
    width: auto;
}

.nav-list a.active {
    background: var(--pink-soft);
    color: var(--pink);
    border: 1px solid var(--pink-border);
}

.nav-list a:hover,
.logout-link:hover,
.bottom-nav a:hover {
    background: var(--surface-soft);
}

.nav-divider {
    height: 1px;
    background: var(--line);
    margin: 14px 0;
}

.logout-link {
    flex: 0 0 auto;
    margin: auto 16px 20px;
    border: 1px solid transparent;
}

.nav-icon {
    width: 18px;
    height: 18px;
    display: inline-block;
    position: relative;
    flex: 0 0 18px;
}

.nav-grid::before {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    left: 1px;
    top: 1px;
    border: 1.8px solid currentColor;
    border-radius: 2px;
    box-shadow:
        9px 0 0 -1px currentColor,
        0 9px 0 -1px currentColor,
        9px 9px 0 -1px currentColor;
}

.nav-bell::before {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    top: 2px;
    bottom: 4px;
    border: 1.8px solid currentColor;
    border-top-left-radius: 9px;
    border-top-right-radius: 9px;
    border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
}

.nav-bell::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    left: 6px;
    bottom: 0;
}

.nav-pill {
    transform: rotate(-45deg);
    border: 1.8px solid currentColor;
    border-radius: 999px;
}

.nav-wave::before {
    content: "";
    position: absolute;
    inset: 7px 0;
    border-top: 1.8px solid currentColor;
    transform: skewX(-28deg);
}

.nav-wave::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 12px;
    border-right: 1.8px solid currentColor;
    border-left: 1.8px solid currentColor;
}

.nav-user::before {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    border: 1.8px solid currentColor;
    border-radius: 50%;
    left: 5px;
    top: 1px;
}

.nav-user::after {
    content: "";
    position: absolute;
    left: 3px;
    right: 3px;
    bottom: 1px;
    height: 7px;
    border: 1.8px solid currentColor;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom: 0;
}

.nav-mood::before,
.nav-mood::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1.8px solid currentColor;
}

.nav-mood::before {
    width: 6px;
    height: 6px;
    left: 2px;
    top: 5px;
    box-shadow: 8px 0 0 0 currentColor;
}

.nav-mood::after {
    left: 2px;
    right: 2px;
    bottom: 2px;
    height: 8px;
    border-top: 0;
}

.nav-calendar::before {
    content: "";
    position: absolute;
    inset: 3px 1px 1px;
    border: 1.8px solid currentColor;
    border-radius: 5px;
}

.nav-calendar::after {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    top: 7px;
    border-top: 1.8px solid currentColor;
}

.nav-clock::before {
    content: "";
    position: absolute;
    inset: 1px;
    border: 1.8px solid currentColor;
    border-radius: 50%;
}

.nav-clock::after {
    content: "";
    position: absolute;
    width: 1.8px;
    height: 6px;
    background: currentColor;
    left: 8px;
    top: 4px;
    box-shadow: 3px 3px 0 0 currentColor;
    transform-origin: bottom;
}

.nav-gear::before,
.nav-sliders::before,
.nav-exit::before {
    content: "";
    position: absolute;
    inset: 2px;
    border: 1.8px solid currentColor;
    border-radius: 50%;
}

.nav-sliders::before {
    inset: 0;
    border: 0;
    border-left: 1.8px solid currentColor;
    border-right: 1.8px solid currentColor;
    border-radius: 0;
}

.nav-sliders::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    top: 4px;
    left: 2px;
    box-shadow: 8px 6px 0 0 currentColor, 0 10px 0 0 currentColor;
}

.nav-exit::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    right: 0;
    top: 5px;
    border-top: 1.8px solid currentColor;
    border-right: 1.8px solid currentColor;
    transform: rotate(45deg);
}

.main-content {
    padding: 28px 36px 40px;
    min-width: 0;
    max-width: 100%;
}

.content-shell {
    width: min(100%, 1180px);
    margin: 0 auto;
    min-width: 0;
}

@media (min-width: 1081px) {
    body:has(> .app-shell) {
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
    }

    body:has(> .app-shell) .app-shell {
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
    }

    body:has(> .app-shell) .main-content {
        height: 100vh;
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }
}

@media (min-width: 1081px) and (max-height: 720px) {
    .brand {
        gap: 10px;
        padding: 10px 14px;
    }

    .brand-mark {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .nav-scroll {
        padding: 8px 12px;
    }

    .nav-list {
        gap: 4px;
    }

    .nav-list a,
    .logout-link {
        gap: 10px;
        padding: 8px 10px;
        border-radius: 12px;
    }

    .nav-divider {
        margin: 6px 0;
    }

    .logout-link {
        margin: auto 12px 8px;
    }
}

.flash-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.flash {
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
}

.flash.success { border-color: #bde8cb; }
.flash.danger { border-color: #ffc4d3; }
.flash.warning { border-color: #ffe1ac; }
.flash.info { border-color: #c8d9ff; }

.page-head,
.feature-card-top,
.panel-head,
.food-row,
.schedule-card,
.overview-bottom-grid,
.overview-top-grid,
.lifestyle-grid,
.mini-health-card,
.progress-panel,
.subsection-title,
.row-actions {
    display: flex;
}

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

.page-head > div,
.panel-head > div,
.feature-card-top > div,
.schedule-left > div,
.appt-top > div,
.appointment-item > div,
.lifestyle-card-head > div,
.lifestyle-summary-copy,
.summary-action-row > div,
.mobile-brand {
    min-width: 0;
}

.page-head h1 {
    margin: 0;
    font-size: 1.72rem;
    line-height: 1.15;
    font-weight: 800;
}

.page-head p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 1.05rem;
}

.title-icon,
.feature-icon,
.section-icon,
.appointment-icon,
.check-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.title-icon {
    width: 34px;
    height: 34px;
    margin-right: 10px;
    vertical-align: -7px;
    border-radius: 12px;
}

.day-pill,
.mini-tag,
.metric-pill,
.outline-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    font-weight: 600;
}

.day-pill {
    padding: 10px 18px;
    border: 1px solid var(--pink-border);
    color: var(--pink);
    background: var(--pink-soft);
    white-space: nowrap;
}

.day-pill-link {
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.day-pill-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(255, 74, 122, 0.12);
}

.overview-top-grid {
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.smart-prompts-panel,
.alerts-prompt-panel {
    margin-bottom: 22px;
}

.smart-prompt-list,
.alerts-prompt-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.smart-prompt-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--surface);
    border: 2px solid var(--line);
    box-shadow: var(--shadow);
}

.smart-prompt-card.high {
    border-color: #ffc3d0;
    background: var(--pink-soft);
}

.smart-prompt-card.medium {
    border-color: #d6e2f3;
    background: var(--surface-subtle);
}

.smart-prompt-card.low {
    border-color: #dce7f5;
    background: var(--surface);
}

.smart-prompt-copy strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ink);
}

.smart-prompt-copy p {
    margin: 0;
    color: var(--muted);
}

.smart-prompt-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.smart-prompt-actions > * {
    width: 100%;
}

.smart-prompt-actions form {
    width: 100%;
}

.smart-prompt-actions .inline-action {
    width: 100%;
    justify-content: center;
}


.alerts-summary-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.risk-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid transparent;
}

.risk-pill.low {
    background: #effbf4;
    color: #18935d;
    border-color: #bde5cf;
}

.risk-pill.medium {
    background: #fff8e8;
    color: #bb7a00;
    border-color: #ffe0a2;
}

.risk-pill.high {
    background: #fff0f3;
    color: #df2f58;
    border-color: #ffc1cf;
}

.overview-top-grid > * {
    flex: 1 1 280px;
    min-width: min(100%, 260px);
}

.feature-card,
.panel-card,
.schedule-card {
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}

.feature-card {
    padding: 20px;
    min-height: 176px;
}

.feature-card-top,
.panel-head {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.blue { background: var(--blue-soft); color: var(--blue); }
.green { background: var(--green-soft); color: var(--green); }
.purple { background: var(--purple-soft); color: var(--purple); }
.teal { background: #ecfeff; color: #0f766e; }

.mini-tag {
    padding: 7px 12px;
    background: #f3f6fa;
    color: #4d6590;
    font-size: 0.85rem;
}

.feature-card h3,
.panel-card h3,
.schedule-card h3 {
    margin: 18px 0 8px;
    font-size: 1.05rem;
}

.feature-card p,
.panel-card p,
.schedule-card p,
.subsection-title h2 {
    margin: 0;
    color: var(--muted);
}

.metric-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 10px;
    color: #4c628d;
    font-weight: 500;
}

.thin-progress,
.wide-progress {
    width: 100%;
    background: #edf2f8;
    border-radius: 999px;
    overflow: hidden;
}

.thin-progress {
    margin-top: 18px;
    height: 8px;
}

.wide-progress {
    margin-top: 12px;
    height: 12px;
}

.thin-progress span,
.wide-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--blue);
}

.overview-bottom-grid {
    gap: 20px;
    align-items: stretch;
    flex-wrap: wrap;
}

.overview-bottom-grid > * {
    flex: 1 1 420px;
    min-width: min(100%, 320px);
}

.overview-top-grid > .feature-card,
.overview-bottom-grid > .panel-card {
    min-height: 0;
}

.panel-card {
    padding: 20px;
}

.panel-head h3,
.subsection-title h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
}

.panel-head a {
    color: var(--pink);
    font-weight: 700;
    text-decoration: none;
}

.section-icon {
    display: none;
}

.pink { background: #ffe7ee; color: var(--pink); }
.slate { background: #eef4ff; color: #748fbb; }
.indigo { background: #eff0ff; color: #5b5df0; }
.red { background: #fff0f1; color: #ff5b67; }
.orange { background: #fff4eb; color: #ff7a1a; }

.cycle-panel {
    border-color: #ffc9d4;
}

.cycle-focus-card {
    margin-top: 16px;
    background: #fff2f4;
    border: 1px solid #ffd8df;
    border-radius: 22px;
    padding: 22px 24px 24px;
    text-align: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cycle-focus-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.cycle-focus-link:focus-visible {
    outline: none;
}

.cycle-focus-link:hover .cycle-focus-card,
.cycle-focus-link:focus-visible .cycle-focus-card {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(255, 111, 145, 0.12);
    border-color: #ffcad5;
}

.cycle-day-ring {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    margin: 0 auto 16px;
    border: 4px solid #ff9db4;
    color: var(--pink);
    font-size: 1.15rem;
    font-weight: 800;
    display: grid;
    place-items: center;
    background: #fff;
}

.cycle-focus-card h4 {
    margin: 0 0 8px;
    font-size: 0.98rem;
    color: var(--ink);
}

.cycle-focus-card p {
    max-width: 30ch;
    margin: 0 auto;
    font-size: 0.9rem;
    color: var(--text-soft);
}

.cycle-focus-caption {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #7c6586;
}

.appointment-stack {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.overview-wellness-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.wellness-prediction-card {
    border-width: 1px;
    padding: 26px 28px;
    box-shadow: 0 14px 36px rgba(28, 45, 86, 0.08);
    height: 100%;
}

.wellness-prediction-card-success {
    border-color: #bfe9cf;
    background: linear-gradient(180deg, #ffffff 0%, #f4fff8 100%);
}

.wellness-prediction-card-moderate {
    border-color: #ffe1a6;
    background: linear-gradient(180deg, #ffffff 0%, #fffaf0 100%);
}

.wellness-prediction-card-warning {
    border-color: #ffc8c8;
    background: linear-gradient(180deg, #ffffff 0%, #fff5f5 100%);
}

.wellness-prediction-card-info {
    border-color: #cfe0ff;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
}

.wellness-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.wellness-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wellness-card-title-wrap h3 {
    margin: 0;
}

.wellness-status-row {
    margin-top: 2px;
}

.wellness-status-copy {
    max-width: 720px;
    min-width: 0;
}

.wellness-kicker {
    margin: 16px 0 10px;
    color: #4f6a97;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.wellness-status-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #446086;
}

.wellness-status-result {
    margin: 8px 0 0;
    font-size: 1.85rem;
    line-height: 1.08;
    font-weight: 800;
}

.wellness-status-result-success {
    color: #159947;
}

.wellness-status-result-moderate {
    color: #b87410;
}

.wellness-status-result-warning {
    color: #cf3348;
}

.wellness-status-result-info {
    color: var(--ink);
}

.wellness-status-explanation {
    margin-top: 12px;
    max-width: 700px;
    color: var(--muted);
}

.wellness-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 800;
    white-space: nowrap;
    border: 1px solid transparent;
}

.wellness-status-badge-success {
    background: #ecfbf2;
    color: #159947;
    border-color: #bfe9cf;
}

.wellness-status-badge-moderate {
    background: #fff4dd;
    color: #b87410;
    border-color: #ffe1a6;
}

.wellness-status-badge-warning {
    background: #fff0f0;
    color: #cf3348;
    border-color: #ffc8c8;
}

.wellness-status-badge-info {
    background: #eef5ff;
    color: #3567bf;
    border-color: #cfe0ff;
}

.wellness-section-label {
    margin-top: 18px;
    color: #4f6a97;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.wellness-factor-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.wellness-factor-chip {
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
    color: #40557d;
    font-size: 0.92rem;
    font-weight: 600;
}

.wellness-recommendation-box {
    margin-top: 10px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(16, 34, 70, 0.05);
    border: 1px solid rgba(16, 34, 70, 0.1);
    color: var(--ink);
    font-weight: 600;
}

.overview-wellness-grid {
    margin-bottom: 22px;
}

.wellness-prediction-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 24px;
    padding: 20px 22px 18px 30px;
    border-color: var(--wellness-border, rgba(120, 156, 230, 0.5));
    background:
        radial-gradient(circle at top right, var(--wellness-orb, rgba(74, 125, 219, 0.12)) 0, transparent 32%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), var(--wellness-surface, #f4f8ff) 58%, rgba(255, 255, 255, 0.96));
    box-shadow:
        0 16px 34px rgba(18, 34, 62, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --wellness-accent: #4a7ddb;
    --wellness-accent-strong: #2556b8;
    --wellness-border: rgba(120, 156, 230, 0.36);
    --wellness-orb: rgba(74, 125, 219, 0.12);
    --wellness-surface: #f2f6ff;
    --wellness-chip-glow: rgba(74, 125, 219, 0.14);
    --wellness-indicator-bg: rgba(236, 243, 255, 0.95);
    --wellness-indicator-border: rgba(74, 125, 219, 0.18);
}

.wellness-prediction-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 26%);
    pointer-events: none;
}

.wellness-prediction-card::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 12px;
    bottom: 12px;
    width: 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), var(--wellness-accent));
    opacity: 0.76;
    pointer-events: none;
}

.wellness-prediction-card-success {
    --wellness-accent: #34b36b;
    --wellness-accent-strong: #0f8a46;
    --wellness-border: rgba(83, 186, 118, 0.34);
    --wellness-orb: rgba(52, 179, 107, 0.18);
    --wellness-surface: #f2fbf5;
    --wellness-chip-glow: rgba(52, 179, 107, 0.14);
    --wellness-indicator-bg: rgba(236, 250, 241, 0.96);
    --wellness-indicator-border: rgba(52, 179, 107, 0.18);
}

.wellness-prediction-card-moderate {
    --wellness-accent: #d9992f;
    --wellness-accent-strong: #b87510;
    --wellness-border: rgba(226, 174, 89, 0.34);
    --wellness-orb: rgba(217, 153, 47, 0.18);
    --wellness-surface: #fff7ec;
    --wellness-chip-glow: rgba(217, 153, 47, 0.14);
    --wellness-indicator-bg: rgba(255, 247, 230, 0.96);
    --wellness-indicator-border: rgba(217, 153, 47, 0.18);
}

.wellness-prediction-card-warning {
    --wellness-accent: #e06666;
    --wellness-accent-strong: #ca3746;
    --wellness-border: rgba(224, 102, 102, 0.34);
    --wellness-orb: rgba(224, 102, 102, 0.18);
    --wellness-surface: #fff4f5;
    --wellness-chip-glow: rgba(224, 102, 102, 0.14);
    --wellness-indicator-bg: rgba(255, 241, 242, 0.96);
    --wellness-indicator-border: rgba(224, 102, 102, 0.18);
}

.wellness-prediction-card-info {
    --wellness-accent: #4a7ddb;
    --wellness-accent-strong: #2e61c6;
    --wellness-border: rgba(120, 156, 230, 0.34);
    --wellness-orb: rgba(74, 125, 219, 0.2);
    --wellness-surface: #f2f6ff;
    --wellness-chip-glow: rgba(74, 125, 219, 0.14);
    --wellness-indicator-bg: rgba(236, 243, 255, 0.96);
    --wellness-indicator-border: rgba(74, 125, 219, 0.18);
}

.wellness-card-header {
    align-items: center;
    gap: 12px;
}

.wellness-card-title-wrap {
    gap: 16px;
    min-width: 0;
}

.wellness-card-title-wrap h3 {
    font-size: 1.18rem;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.wellness-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    color: var(--wellness-accent-strong);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), var(--wellness-indicator-bg));
    border: 1px solid var(--wellness-indicator-border);
    box-shadow:
        0 16px 28px rgba(31, 56, 98, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
    flex: none;
}

.wellness-card-icon svg {
    width: 28px;
    height: 28px;
}

.wellness-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 10px;
}

.wellness-status-copy {
    flex: 1;
}

.wellness-kicker {
    margin: 0 0 8px;
    color: var(--wellness-accent-strong);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.wellness-status-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6e85a5;
}

.wellness-status-result-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
}

.wellness-result-indicator {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    flex: none;
    color: var(--wellness-accent-strong);
    background: var(--wellness-indicator-bg);
    border: 1px solid var(--wellness-indicator-border);
    box-shadow:
        0 14px 28px rgba(31, 56, 98, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.wellness-result-indicator svg {
    width: 26px;
    height: 26px;
}

.wellness-status-result {
    margin: 0;
    font-size: 2.25rem;
    line-height: 1;
    letter-spacing: 0;
    font-weight: 850;
}

.wellness-status-result-success {
    color: #0f8a46;
}

.wellness-status-result-warning {
    color: #ca3746;
}

.wellness-status-result-info {
    color: #2e61c6;
}

.wellness-trend-label {
    margin: 0 0 8px;
    color: var(--wellness-accent-strong);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.wellness-summary-lines {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    color: #5c7491;
    font-size: 0.9rem;
    font-weight: 650;
    line-height: 1.35;
}

.wellness-compact-note {
    margin: 12px 0 0;
    color: #7d90ad;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
}

.wellness-status-explanation {
    margin-top: 8px;
    max-width: 500px;
    color: #56708f;
    font-size: 0.92rem;
    line-height: 1.45;
}

.wellness-ml-note {
    margin-top: 12px;
    max-width: 620px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(74, 102, 146, 0.12);
    color: #617893;
    font-size: 0.91rem;
    line-height: 1.62;
}

.wellness-status-badge {
    gap: 7px;
    padding: 8px 11px;
    font-size: 0.78rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 8px 16px rgba(23, 41, 73, 0.05);
}

.wellness-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: currentColor;
    flex: none;
}

.wellness-status-badge-success {
    background: rgba(236, 251, 242, 0.95);
    color: #0f8a46;
    border-color: rgba(52, 179, 107, 0.24);
}

.wellness-status-badge-moderate {
    background: rgba(255, 244, 221, 0.95);
    border-color: rgba(217, 153, 47, 0.24);
}

.wellness-status-badge-warning {
    background: rgba(255, 240, 240, 0.95);
    color: #ca3746;
    border-color: rgba(224, 102, 102, 0.24);
}

.wellness-status-badge-info {
    background: rgba(238, 245, 255, 0.96);
    color: #2e61c6;
    border-color: rgba(74, 125, 219, 0.24);
}

.wellness-status-visual {
    width: min(220px, 28%);
    min-width: min(190px, 100%);
    align-self: center;
    padding: 12px 12px 10px;
    border-radius: 18px;
    border: 1px solid var(--wellness-indicator-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 247, 253, 0.78)),
        var(--wellness-indicator-bg);
    box-shadow:
        0 10px 20px rgba(26, 43, 74, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.wellness-visual-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.wellness-visual-label {
    color: #7a90af;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.wellness-visual-value {
    color: var(--wellness-accent-strong);
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.wellness-mini-trend {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    margin-top: 10px;
    height: 58px;
    min-width: 0;
}

.wellness-mini-bar {
    flex: 1;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), var(--wellness-accent));
    box-shadow: 0 6px 12px var(--wellness-chip-glow);
    opacity: 0.9;
}

.wellness-mini-trend-success .wellness-mini-bar:nth-child(1) { height: 30%; }
.wellness-mini-trend-success .wellness-mini-bar:nth-child(2) { height: 38%; }
.wellness-mini-trend-success .wellness-mini-bar:nth-child(3) { height: 48%; }
.wellness-mini-trend-success .wellness-mini-bar:nth-child(4) { height: 58%; }
.wellness-mini-trend-success .wellness-mini-bar:nth-child(5) { height: 72%; }
.wellness-mini-trend-success .wellness-mini-bar:nth-child(6) { height: 86%; }

.wellness-mini-trend-warning .wellness-mini-bar:nth-child(1) { height: 84%; }
.wellness-mini-trend-warning .wellness-mini-bar:nth-child(2) { height: 72%; }
.wellness-mini-trend-warning .wellness-mini-bar:nth-child(3) { height: 58%; }
.wellness-mini-trend-warning .wellness-mini-bar:nth-child(4) { height: 46%; }
.wellness-mini-trend-warning .wellness-mini-bar:nth-child(5) { height: 36%; }
.wellness-mini-trend-warning .wellness-mini-bar:nth-child(6) { height: 28%; }

.wellness-mini-trend-info .wellness-mini-bar:nth-child(1) { height: 50%; }
.wellness-mini-trend-info .wellness-mini-bar:nth-child(2) { height: 54%; }
.wellness-mini-trend-info .wellness-mini-bar:nth-child(3) { height: 52%; }
.wellness-mini-trend-info .wellness-mini-bar:nth-child(4) { height: 55%; }
.wellness-mini-trend-info .wellness-mini-bar:nth-child(5) { height: 53%; }
.wellness-mini-trend-info .wellness-mini-bar:nth-child(6) { height: 56%; }

.wellness-mini-trend-moderate .wellness-mini-bar:nth-child(1) { height: 42%; }
.wellness-mini-trend-moderate .wellness-mini-bar:nth-child(2) { height: 50%; }
.wellness-mini-trend-moderate .wellness-mini-bar:nth-child(3) { height: 58%; }
.wellness-mini-trend-moderate .wellness-mini-bar:nth-child(4) { height: 54%; }
.wellness-mini-trend-moderate .wellness-mini-bar:nth-child(5) { height: 46%; }
.wellness-mini-trend-moderate .wellness-mini-bar:nth-child(6) { height: 40%; }

.wellness-section-label {
    margin-top: 14px;
    color: #6a81a6;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
}

.wellness-factor-list {
    gap: 8px;
    margin-top: 8px;
}

.wellness-factor-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(102, 126, 163, 0.14);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 6px 14px rgba(31, 48, 84, 0.06);
    color: #37506f;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.35;
}

.wellness-factor-chip::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--wellness-accent);
    box-shadow: 0 0 0 4px var(--wellness-chip-glow);
    flex: none;
}

.wellness-recommendation-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(242, 246, 255, 0.9));
    border: 1px solid rgba(86, 111, 150, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.86),
        0 8px 20px rgba(24, 39, 68, 0.06);
}

.wellness-recommendation-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    flex: none;
    color: var(--wellness-accent-strong);
    background: var(--wellness-indicator-bg);
    border: 1px solid var(--wellness-indicator-border);
}

.wellness-recommendation-icon svg {
    width: 24px;
    height: 24px;
}

.wellness-recommendation-copy {
    display: grid;
    gap: 6px;
}

.wellness-recommendation-tag {
    color: var(--wellness-accent-strong);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.wellness-recommendation-copy p {
    margin: 0;
    color: #24364e;
    font-weight: 700;
    line-height: 1.7;
}

.overview-wellness-grid {
    justify-items: center;
    margin: 6px 0 24px;
    padding: 0 8px;
}

.wellness-prediction-card {
    width: min(100%, 940px);
    padding: 18px 20px 16px 28px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(96, 148, 228, 0.09) 0, transparent 28%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.96) 58%, rgba(255, 255, 255, 0.94));
    box-shadow:
        0 14px 30px rgba(21, 37, 66, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.wellness-prediction-card::after {
    left: 10px;
    top: 12px;
    bottom: 12px;
    width: 4px;
    opacity: 0.72;
}

.wellness-card-header {
    align-items: flex-start;
    gap: 12px;
}

.wellness-card-title-wrap {
    gap: 0;
}

.wellness-card-title-wrap h3 {
    font-size: 1.16rem;
    line-height: 1.14;
}

.wellness-kicker {
    margin-bottom: 6px;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
}

.wellness-status-badge {
    align-self: flex-start;
    padding: 8px 12px;
    font-size: 0.84rem;
    line-height: 1;
}

.wellness-status-dot {
    width: 8px;
    height: 8px;
}

.wellness-status-row {
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}

.wellness-status-copy {
    max-width: 500px;
}

.wellness-status-result {
    font-size: 2.2rem;
    line-height: 1;
}

.wellness-status-explanation {
    margin-top: 7px;
    max-width: 420px;
    color: #5c7491;
    font-size: 0.9rem;
    line-height: 1.42;
}

.wellness-confidence-label {
    margin: 7px 0 0;
    color: #2f4f79;
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.wellness-data-completeness,
.wellness-data-helper {
    margin: 4px 0 0;
    color: #5c7491;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.35;
}

.wellness-data-helper {
    color: #7d90ad;
    font-weight: 600;
}

.wellness-disclaimer {
    margin: 8px 0 0;
    max-width: 620px;
    color: #627993;
    font-size: 0.78rem;
    line-height: 1.45;
}

.wellness-status-visual {
    width: min(216px, 28%);
    min-width: 188px;
    padding: 11px 12px 10px;
    border-radius: 18px;
}

.wellness-visual-meta {
    justify-content: flex-start;
}

.wellness-visual-label {
    font-size: 0.66rem;
    letter-spacing: 0.14em;
}

.wellness-checkin-trend {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
    min-width: 0;
}

.wellness-checkin-day {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 7px;
}

.wellness-checkin-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: var(--wellness-accent);
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 10px var(--wellness-chip-glow);
}

.wellness-checkin-day-missing .wellness-checkin-dot {
    background: transparent;
    border-color: rgba(125, 144, 173, 0.55);
    box-shadow: none;
    opacity: 0.72;
}

.wellness-checkin-label {
    color: #7d90ad;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.wellness-checkin-day-missing .wellness-checkin-label {
    color: #9aa8ba;
}

.wellness-mini-trend {
    gap: 7px;
    margin-top: 10px;
    height: auto;
    align-items: end;
}

.wellness-mini-point {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.wellness-mini-bar-track {
    width: 100%;
    height: 54px;
    display: flex;
    align-items: flex-end;
    border-radius: 999px;
    padding: 0;
    background: linear-gradient(180deg, rgba(222, 231, 247, 0.46), rgba(239, 244, 252, 0.88));
    overflow: hidden;
}

.wellness-mini-bar {
    width: 100%;
    min-height: 22%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(126, 169, 235, 0.72), var(--wellness-accent));
    box-shadow: 0 5px 10px rgba(74, 125, 219, 0.1);
}

.wellness-mini-bar-track-missing {
    border: 1px dashed rgba(125, 144, 173, 0.46);
    background: rgba(239, 244, 252, 0.54);
}

.wellness-mini-bar-missing {
    min-height: 0;
    border: 1px dashed rgba(125, 144, 173, 0.52);
    background: transparent;
    box-shadow: none;
    opacity: 0.72;
}

.wellness-mini-point-missing .wellness-mini-label {
    color: #9aa8ba;
}

.wellness-mini-label {
    color: #7d90ad;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.wellness-mini-trend-success .wellness-mini-bar,
.wellness-mini-trend-warning .wellness-mini-bar,
.wellness-mini-trend-info .wellness-mini-bar,
.wellness-mini-trend-moderate .wellness-mini-bar {
    height: auto;
}

.wellness-section-label {
    margin-top: 12px;
    font-size: 0.66rem;
    letter-spacing: 0.14em;
}

.wellness-factor-list {
    gap: 8px;
    margin-top: 8px;
}

.wellness-factor-chip {
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.28;
}

.wellness-factor-chip::before {
    width: 6px;
    height: 6px;
}

.wellness-recommendation-box {
    gap: 0;
    margin-top: 8px;
    padding: 11px 13px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(250, 252, 255, 0.94), rgba(240, 246, 255, 0.92));
}

.wellness-recommendation-copy {
    gap: 4px;
}

.wellness-recommendation-tag {
    font-size: 0.68rem;
    letter-spacing: 0.14em;
}

.wellness-recommendation-copy p {
    color: #2a3f5f;
    font-size: 0.88rem;
    line-height: 1.42;
}

@media (max-width: 900px) {
    .overview-wellness-grid {
        padding: 0 4px;
    }

    .wellness-prediction-card {
        width: 100%;
        padding: 20px 18px 18px 24px;
    }

    .wellness-prediction-card::after {
        left: 10px;
        top: 12px;
        bottom: 12px;
    }

    .wellness-status-row {
        flex-direction: column;
        align-items: stretch;
    }

    .wellness-status-copy,
    .wellness-status-explanation {
        max-width: none;
    }

    .wellness-status-visual {
        width: 100%;
        min-width: 0;
    }

    .wellness-mini-bar-track {
        height: 62px;
    }
}

.appointment-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-subtle);
}

.appointment-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f3f7ff;
    color: #7a91ba;
}

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

.appointment-item p {
    color: var(--text-tertiary);
}

.profile-layout {
    display: grid;
    gap: 22px;
}

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

.profile-hero-main {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.profile-avatar {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pink-soft), var(--blue-soft));
    border: 3px solid var(--line);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: grid;
    place-items: center;
    color: var(--pink);
    font-size: 2rem;
    font-weight: 800;
}

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

.profile-hero-copy h2 {
    margin: 0 0 6px;
    font-size: 1.5rem;
}

.profile-handle {
    color: var(--text-soft);
    font-weight: 700;
    margin-bottom: 10px;
}

.profile-section {
    display: grid;
    gap: 16px;
}

.profile-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

.profile-card-grid > .panel-card {
    height: 100%;
}

.profile-card-grid > .profile-section {
    grid-template-rows: auto 1fr;
}

.profile-meta-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.profile-meta-list-personal {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.profile-meta-list-personal .profile-detail-card {
    min-height: 88px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.profile-meta-list-personal .status-line {
    display: block;
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.profile-meta-list-personal .profile-detail-card strong {
    margin-top: 0;
    font-size: 0.98rem;
    line-height: 1.3;
    overflow-wrap: break-word;
    word-break: normal;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: #f4f7fb;
    border: 1px solid var(--line);
    color: #365277;
    font-weight: 600;
}

.tag-chip.goal {
    background: #fff4f7;
    border-color: #ffd2df;
    color: #d73b6f;
}

.tag-chip.muted {
    color: var(--muted);
}

.tag-chip small {
    margin-left: 6px;
    color: #6f82a5;
    font-weight: 800;
}

.profile-symptom-tags {
    align-content: start;
}

.profile-section-copy {
    margin: 6px 0 0;
    color: var(--text-tertiary);
}

.profile-section-label {
    margin: 0 0 6px;
    color: var(--text-soft-strong);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.profile-detail-stack {
    display: grid;
    gap: 14px;
}

.profile-detail-stack-compact {
    gap: 10px;
}

.profile-detail-card {
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-subtle);
    color: var(--ink);
    min-width: 0;
}

.profile-cycle-summary {
    align-self: stretch;
    width: 100%;
}

.profile-cycle-summary .profile-detail-card {
    padding: 13px 15px;
    border-radius: 16px;
    background: var(--surface-soft);
}

.profile-cycle-summary .profile-detail-card strong {
    margin-top: 6px;
}

.profile-detail-card strong {
    display: block;
    margin-top: 8px;
    color: var(--ink);
    line-height: 1.5;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
}

.profile-detail-card-wide strong {
    max-width: 48ch;
}

.profile-modal-card .form-grid {
    gap: 18px;
}

.stat-helper {
    margin: 8px 0 0;
    color: #7b8ea9;
    font-size: 0.84rem;
    line-height: 1.45;
}

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

.mini-list-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fbfdff;
}

.mini-list-row span {
    color: var(--muted);
}

.mini-list-row.empty {
    flex-direction: column;
}

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

.stat-card-link {
    text-decoration: none;
}

.stat-card {
    height: 100%;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fbfdff;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card-link:hover .stat-card {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 1rem;
    color: var(--ink);
}

.settings-layout {
    display: grid;
    gap: 22px;
}

.theme-helper {
    margin: -8px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.theme-helper.is-success {
    color: var(--green);
}

.theme-helper.is-error {
    color: var(--pink);
}

.notification-helper:empty {
    display: none;
}

.notification-actions {
    margin-top: 2px;
}

.settings-copy {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.settings-section {
    display: grid;
    gap: 18px;
}

.settings-check-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.settings-check {
    position: relative;
}

.settings-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.settings-check span {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fbfdff;
    color: #365277;
    font-weight: 600;
    cursor: pointer;
}

.settings-check input:checked + span {
    background: #fff3f6;
    border-color: var(--pink-border);
    color: var(--pink);
}

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

.settings-mini-block {
    display: grid;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-subtle);
}

.settings-toggle-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #365277;
    font-weight: 600;
}

.settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

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

.settings-password-card-copy {
    display: grid;
    gap: 6px;
}

.settings-password-card h4 {
    margin: 0;
    color: var(--ink);
}

.settings-password-card p {
    margin: 0;
    color: var(--text-soft-strong);
    line-height: 1.5;
}

.settings-password-modal-card {
    width: min(560px, 100%);
}

.settings-password-modal-head {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
    padding-right: 28px;
}

.settings-password-modal-head h2 {
    margin: 0;
}

.settings-password-modal-head p {
    margin: 0;
    line-height: 1.55;
}

.settings-password-flow {
    display: grid;
    gap: 18px;
}

.settings-password-panel {
    display: none;
    gap: 14px;
}

.settings-password-panel.is-active {
    display: grid;
    animation: authStepReveal 0.28s ease both;
}

.settings-password-method-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.settings-password-method {
    border: 1px solid rgba(129, 34, 243, 0.16);
    background: linear-gradient(180deg, #fcf8ff 0%, #f7f2ff 100%);
    border-radius: 18px;
    padding: 18px 16px;
    display: grid;
    gap: 10px;
    text-align: left;
    color: #20365f;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.settings-password-method:hover {
    transform: translateY(-1px);
    border-color: rgba(129, 34, 243, 0.28);
    box-shadow: 0 12px 24px rgba(122, 81, 188, 0.12);
}

.settings-password-method:focus-visible {
    outline: 2px solid rgba(129, 34, 243, 0.28);
    outline-offset: 2px;
}

.settings-password-method strong {
    color: var(--ink);
    font-size: 1rem;
}

.settings-password-method span:last-child {
    color: #587196;
    font-size: 0.92rem;
    line-height: 1.5;
}

.settings-password-method-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #f03291 0%, #8f22f6 100%);
    position: relative;
    box-shadow: 0 10px 20px rgba(143, 34, 246, 0.2);
}

.settings-password-method-icon.lock::before {
    content: "";
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 10px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 4px;
}

.settings-password-method-icon.lock::after {
    content: "";
    position: absolute;
    left: 14px;
    top: 8px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-bottom: 0;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.settings-password-method-icon.mail::before,
.settings-password-method-icon.mail::after {
    content: "";
    position: absolute;
    left: 9px;
    right: 9px;
    border: 2px solid #fff;
}

.settings-password-method-icon.mail::before {
    top: 12px;
    bottom: 12px;
    border-radius: 6px;
}

.settings-password-method-icon.mail::after {
    top: 15px;
    height: 12px;
    border-top: 0;
    border-left: 0;
    border-radius: 2px;
    transform: skewY(-24deg) rotate(45deg);
    transform-origin: center;
}

.settings-password-method-icon.pin::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 9px;
    width: 16px;
    height: 24px;
    border: 2px solid #fff;
    border-radius: 10px;
}

.settings-password-method-icon.pin::after {
    content: "";
    position: absolute;
    left: 19px;
    top: 17px;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 7px 0 #fff;
}

.settings-password-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.settings-password-actions .auth-gradient-button,
.settings-password-actions .auth-secondary-button,
.settings-password-actions .auth-text-button {
    margin-top: 0;
}

.settings-password-actions .auth-gradient-button {
    width: auto;
    min-width: 220px;
}

.settings-password-actions .auth-secondary-button,
.settings-password-actions .auth-text-button {
    width: auto;
}

.settings-password-actions-stack {
    display: grid;
    gap: 10px;
}

.settings-password-actions-stack .auth-gradient-button,
.settings-password-actions-stack .auth-secondary-button,
.settings-password-actions-stack .auth-text-button {
    width: 100%;
}

.danger-zone {
    padding: 18px;
    border: 1px solid #ffd5de;
    border-radius: 18px;
    background: #fff7f9;
}

.danger-zone h4 {
    margin: 0 0 8px;
}

.danger-zone p,
.settings-mini-block p {
    margin: 0;
    color: var(--text-soft-strong);
    line-height: 1.5;
}

.with-action {
    align-items: center;
}

.dark-button,
.inline-action,
.ghost-button,
input,
textarea,
select,
button {
    font: inherit;
}

.dark-button {
    background: var(--navy);
    color: #fff;
    border: 0;
    border-radius: 16px;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer;
}

.period-log-button {
    gap: 10px;
    font-size: 0.98rem;
}

.progress-panel {
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
}

.progress-copy {
    flex: 1;
}

.progress-copy h3 {
    margin: 0 0 10px;
}

.progress-circle {
    width: 98px;
    height: 98px;
    border-radius: 50%;
    border: 4px solid #d8e6fb;
    color: var(--blue);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    font-weight: 800;
    flex: 0 0 98px;
}

.subsection-title {
    align-items: center;
    margin: 10px 0 16px;
}

.subsection-title h2 {
    margin: 0;
    font-size: 1.05rem;
}

.med-schedule-list {
    display: grid;
    gap: 14px;
    margin-bottom: 22px;
}

.meds-progress-panel {
    margin-bottom: 26px;
}

.schedule-card {
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    min-width: 0;
}

.schedule-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1;
}

.check-badge {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #bfd3f3;
    color: transparent;
    background: #fff;
}

.check-badge.is-done {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    font-weight: 800;
}

.med-check {
    cursor: pointer;
}

.struck {
    text-decoration: line-through;
}

.subtle-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #a2b4ce;
    margin: 0 8px;
}

.schedule-right {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-direction: column;
    flex-shrink: 0;
}

.schedule-left p,
.clean-med-card p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.time-label {
    color: #90a5ca;
    font-weight: 600;
}

.med-delete-form {
    margin: 0;
}

.med-delete-button {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--pink-border);
    background: var(--pink-soft);
    color: var(--pink);
    cursor: pointer;
}

.med-delete-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(255, 79, 122, 0.14);
}

.med-delete-button svg {
    width: 16px;
    height: 16px;
    display: block;
}

.clean-med-card {
    background: #fff;
    border: 2px solid #dde7f4;
    border-radius: 22px;
}

.clean-med-card.schedule-card {
    min-height: 0 !important;
    height: auto !important;
    justify-content: flex-start !important;
}

.clean-med-card .schedule-left {
    flex: 1 1 auto !important;
}

.clean-med-card .schedule-right {
    flex: 0 0 auto !important;
}

.clean-med-card.current {
    border-color: #bcd4ff;
}

.clean-med-card.done {
    background: #fbfdff;
}

.highlight-time {
    color: #1d5cff;
    font-weight: 800;
}

.med-adherence-banner {
    margin-top: 12px;
    padding: 18px 20px;
    border-radius: 20px;
    border: 2px solid #ffd45f;
    background: #fff9e9;
    color: #b26200;
    line-height: 1.55;
}

.medication-modal {
    width: min(760px, 100%);
}

.meds-submit {
    background: #265cf1;
}

.row-actions {
    gap: 8px;
}

.inline-action {
    border: 0;
    background: #edf4ff;
    color: var(--blue);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 700;
}

.inline-action.muted {
    background: #f3f6fa;
    color: #7a8eaf;
}

.inline-action.danger-light {
    background: #fff4f6;
    color: #c93a5f;
    border: 1px solid #ffc8d4;
}

.form-panel {
    margin-top: 22px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.two-up-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
}

.full-span {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 600;
    color: var(--ink);
}

input,
textarea,
select {
    width: 100%;
    border: 2px solid var(--line);
    background: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    color: var(--ink);
}

.compact-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.compact-check input {
    width: auto;
}

.lifestyle-grid {
    gap: 18px;
    margin-bottom: 22px;
}

.water-panel {
    flex: 1.1;
}

.mini-panels {
    flex: 1;
    display: grid;
    gap: 18px;
}

.glass-row {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.glass {
    width: 40px;
    height: 58px;
    border-radius: 10px 10px 14px 14px;
    border: 2px solid #d7e1f0;
    background: #f8fbff;
    cursor: pointer;
}

.glass.filled {
    background: #8bb8f0;
    border-color: var(--blue);
}

.glass:hover {
    transform: translateY(-1px);
}

.tap-note {
    margin-top: 16px;
    text-align: center;
    color: #a2859a;
}

.mini-health-card {
    justify-content: space-between;
    align-items: center;
}

.mini-panel-copy {
    flex: 1;
}

.metric-pill {
    padding: 14px 18px;
    border: 2px solid var(--line);
    min-width: 92px;
    justify-content: center;
    color: var(--ink);
    background: #fafcff;
    font-size: 1.6rem;
    font-weight: 800;
}

.inline-metric-form,
.exercise-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.metric-input,
.exercise-input {
    width: 92px;
    min-width: 92px;
    border-radius: 18px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    padding: 12px 12px;
}

.exercise-input {
    width: 110px;
    min-width: 110px;
    font-size: 1rem;
    font-weight: 700;
}

.exercise-input-wide {
    width: 160px;
    min-width: 160px;
    text-align: left;
}

.exercise-select,
.food-select {
    border-radius: 18px;
    border: 2px solid var(--line);
    background: #fff;
    padding: 12px 14px;
    font-weight: 700;
    color: var(--ink);
}

.metric-suffix {
    color: var(--muted);
    font-weight: 700;
}

.metric-save {
    border: 0;
    background: var(--navy);
    color: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    font-weight: 700;
}

.metric-pill span {
    font-size: 1rem;
    color: var(--muted);
    font-weight: 600;
}

.outline-button {
    padding: 14px 20px;
    border: 2px solid var(--line);
    color: var(--ink);
    background: var(--surface);
}

.food-panel,
.tips-panel {
    margin-bottom: 22px;
}

.lifestyle-section {
    margin-bottom: 22px;
}

.lifestyle-summary-section {
    padding: 26px 28px 28px;
    border-color: #dce6f5;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.95), rgba(244, 247, 254, 0.98) 58%),
        #ffffff;
    box-shadow: 0 18px 40px rgba(27, 42, 76, 0.08);
}

.lifestyle-summary-section .panel-head {
    margin-bottom: 18px;
}

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

.lifestyle-summary-grid {
    gap: 12px;
    margin-top: 0;
}

.lifestyle-input-card,
.lifestyle-summary-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 20px;
    min-height: 220px;
    min-width: 0;
}

.lifestyle-summary-card {
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 10px 22px rgba(28, 33, 54, 0.06);
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}

.lifestyle-summary-card-neutral {
    border-color: #e8edf6;
}

.lifestyle-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.lifestyle-card-head h4 {
    margin: 0;
    font-size: 1.02rem;
}

.lifestyle-summary-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
}

.lifestyle-summary-copy h4 {
    margin: 0;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.lifestyle-summary-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.lifestyle-summary-icon::before {
    font-size: 1rem;
    font-weight: 800;
}

.lifestyle-summary-icon-drop {
    background: linear-gradient(180deg, #dff4ff 0%, #bfe2ff 100%);
    color: #1877c9;
}

.lifestyle-summary-icon-drop::before {
    content: "💧";
}

.lifestyle-summary-icon-moon {
    background: linear-gradient(180deg, #ebe8ff 0%, #d9d4ff 100%);
    color: #6557d2;
}

.lifestyle-summary-icon-moon::before {
    content: "☾";
}

.lifestyle-summary-icon-pulse {
    background: linear-gradient(180deg, #fff4cf 0%, #ffe39a 100%);
    color: #b07a00;
}

.lifestyle-summary-icon-pulse::before {
    content: "↗";
}

.lifestyle-summary-icon-meal {
    background: linear-gradient(180deg, #ffe6da 0%, #ffd2bc 100%);
    color: #ca5d1b;
}

.lifestyle-summary-icon-meal::before {
    content: "◔";
}

.summary-kicker {
    margin: 0;
    color: #7f88a3;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.summary-badge-hydration,
.summary-badge-sleep {
    background: #ecf9ef;
    color: #1f8a56;
    border-color: #dcefdc;
}

.summary-badge-activity {
    background: #fff2db;
    color: #cb8a16;
    border-color: #ffe3aa;
}

.summary-badge-meal {
    background: #ffece2;
    color: #cf6b2a;
    border-color: #ffd7c4;
}

.summary-badge-neutral {
    background: #eff3f9;
    color: #7082a8;
    border-color: #dde6f2;
}

.lifestyle-inline-form {
    margin-top: 26px;
}

.lifestyle-stack-form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

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

.lifestyle-stack-form input[type="text"],
.lifestyle-stack-form .food-select,
.lifestyle-stack-form .exercise-input,
.lifestyle-stack-form .exercise-select {
    width: 100%;
    min-width: 0;
}

.lifestyle-submit {
    width: 100%;
    justify-content: center;
}

.summary-description {
    margin: 8px 0 0 46px;
    color: #6f7894;
    font-size: 0.92rem;
    line-height: 1.35;
}

.summary-divider {
    height: 1px;
    margin: 16px 0 12px;
    background: linear-gradient(90deg, rgba(214, 223, 240, 0.55), rgba(214, 223, 240, 0.2));
}

.summary-action-card {
    margin-top: auto;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid transparent;
}

.summary-action-card-hydration {
    background: linear-gradient(180deg, rgba(239, 247, 255, 0.92), rgba(247, 251, 255, 0.98));
    border-color: #dce9fb;
}

.summary-action-card-sleep {
    background: linear-gradient(180deg, rgba(244, 241, 255, 0.92), rgba(250, 248, 255, 0.98));
    border-color: #e3defa;
}

.summary-action-card-activity {
    background: linear-gradient(180deg, rgba(255, 246, 221, 0.92), rgba(255, 251, 239, 0.98));
    border-color: #ffe5b3;
}

.summary-action-card-meal {
    background: linear-gradient(180deg, rgba(255, 240, 233, 0.92), rgba(255, 247, 243, 0.98));
    border-color: #ffd8c8;
}

.summary-action-card-neutral {
    background: linear-gradient(180deg, rgba(244, 247, 252, 0.92), rgba(249, 251, 255, 0.98));
    border-color: #e0e7f2;
}

.summary-recommendation-label {
    display: inline-block;
    margin-bottom: 10px;
    color: #8c94ae;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.summary-action-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.summary-action-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 12px;
    box-shadow: none;
}

.summary-action-icon::before {
    font-size: 0.9rem;
}

.summary-action-title {
    margin: 0;
    color: #344164;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.35;
}

.summary-action-detail {
    margin: 3px 0 0;
    color: #6f7894;
    font-size: 0.88rem;
    line-height: 1.35;
}

.lifestyle-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 14px;
    flex-wrap: wrap;
}

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

.history-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 162px;
    padding: 10px 16px;
    border-radius: 14px;
    border: 1px solid rgba(124, 148, 202, 0.18);
    background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
    color: #3b5da0;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(36, 55, 99, 0.05);
}

.history-button:hover {
    background: linear-gradient(180deg, #ffffff 0%, #edf3ff 100%);
}

.history-button-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.history-button-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.lifestyle-log-panel {
    margin-bottom: 22px;
}

.lifestyle-log-panel .panel-card {
    box-shadow: none;
}

.lifestyle-log-food {
    margin-top: 22px;
}

.alerts-layout,
.calendar-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.mental-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.mental-layout > * {
    flex: 1 1 0;
}

.mood-check-card,
.mood-trends-card {
    padding: 24px 28px;
    border: 1px solid rgba(127, 145, 175, 0.12);
    box-shadow: 0 18px 36px rgba(31, 45, 82, 0.08);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.94), rgba(247, 250, 255, 0.98) 58%),
        #ffffff;
}

.mood-check-card {
    align-self: flex-start;
}

.mood-check-card h3,
.mood-trends-card h3,
.mood-tip-panel h3 {
    margin: 0 0 20px;
    font-size: 1.08rem;
    letter-spacing: -0.01em;
}

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

.mental-kicker {
    margin: 0 0 6px;
    color: #7b879d;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mood-form {
    display: grid;
    gap: 16px;
}

.mood-choice-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.mood-choice {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 82px;
    border: 1px solid #d7deea;
    border-radius: 14px;
    padding: 10px 6px 8px;
    background: #fff;
    text-align: center;
    cursor: pointer;
    transition: 0.18s ease;
    box-shadow: none;
}

.mood-choice:hover {
    transform: translateY(-1px);
    border-color: #c6d2e4;
    box-shadow: 0 8px 16px rgba(45, 67, 112, 0.06);
}

.mood-choice.active {
    border-width: 1px;
}

.mood-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mood-face {
    display: block;
    width: 28px;
    height: 28px;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    border: 2px solid currentColor;
    margin-bottom: 0;
    color: #8a9bb7;
}

.mood-face-eyes::before,
.mood-face-eyes::after,
.mood-face-mouth {
    content: "";
    position: absolute;
}

.mood-face-eyes::before,
.mood-face-eyes::after {
    top: 8px;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
}

.mood-face-eyes::before {
    left: 7px;
}

.mood-face-eyes::after {
    right: 7px;
}

.mood-face-mouth {
    left: 50%;
    transform: translateX(-50%);
}

.mood-face-awful .mood-face-mouth {
    bottom: 4px;
    width: 12px;
    height: 6px;
    border-top: 2px solid currentColor;
    border-radius: 12px 12px 0 0;
}

.mood-face-bad .mood-face-mouth,
.mood-face-okay .mood-face-mouth {
    bottom: 8px;
    width: 10px;
    border-top: 2px solid currentColor;
}

.mood-face-good .mood-face-mouth {
    bottom: 6px;
    width: 12px;
    height: 6px;
    border-bottom: 2px solid currentColor;
    border-radius: 0 0 12px 12px;
}

.mood-face-great .mood-face-mouth {
    bottom: 4px;
    width: 14px;
    height: 8px;
    border-bottom: 2px solid currentColor;
    border-radius: 0 0 14px 14px;
}

.mood-face-great::after {
    content: "";
    position: absolute;
    right: -2px;
    top: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: inset -3px 0 0 currentColor;
}

.mood-label {
    display: block;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.15;
    color: #5a7196;
}

.mood-choice.warm.active {
    border-color: #f1cd4b;
    background: #fffaf0;
    box-shadow: 0 8px 16px rgba(233, 192, 79, 0.12);
}

.mood-choice.warm.active .mood-face,
.mood-choice.warm.active .mood-label {
    color: #b78700;
}

.mood-choice.good.active {
    border-color: #b9ddc8;
    background: #f5fbf7;
    box-shadow: 0 8px 16px rgba(65, 164, 111, 0.1);
}

.mood-choice.good.active .mood-face,
.mood-choice.good.active .mood-label {
    color: #188154;
}

.mood-choice.muted.active {
    border-color: #d9dfea;
    background: #f9fbfe;
    box-shadow: 0 8px 16px rgba(92, 113, 150, 0.08);
}

.mood-choice.muted.active .mood-face,
.mood-choice.muted.active .mood-label {
    color: #6b7e9a;
}

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

.stress-head h4 {
    margin: 0;
    font-size: 1rem;
}

.stress-subcopy {
    margin: 6px 0 0;
    color: #8693aa;
    font-size: 0.82rem;
    font-weight: 500;
}

.stress-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 4px 9px;
    border-radius: 8px;
    border: 1px solid #e3e8f4;
    background: #f7f9fc;
    color: #51647f;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: none;
}

.stress-slider-wrap {
    display: grid;
    gap: 8px;
    padding: 8px 0 0;
    border-radius: 0;
    background: transparent;
    border: 0;
}

.stress-slider {
    appearance: none;
    -webkit-appearance: none;
    height: 6px;
    border: 0;
    padding: 0;
    border-radius: 999px;
    background: #dfe4ec;
}

.stress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #b547f4;
    border: 0;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(181, 71, 244, 0.3);
}

.stress-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #b547f4;
    border: 0;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(181, 71, 244, 0.3);
}

.stress-scale {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #7f8ea9;
    font-weight: 600;
    font-size: 0.78rem;
}

.mood-save-button {
    width: 100%;
    padding: 12px 18px;
    font-size: 0.96rem;
    border: 0;
    border-radius: 16px;
    background: #18233f;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 14px 24px rgba(24, 35, 63, 0.16);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.mood-save-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 32px rgba(36, 59, 99, 0.26);
    filter: brightness(1.02);
}

.mood-save-button:active {
    transform: translateY(0);
    box-shadow: 0 10px 18px rgba(36, 59, 99, 0.18);
}

.mood-trends-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mental-trend-icon {
    width: 22px;
    height: 22px;
    display: inline-block;
    position: relative;
    color: #7b8eae;
}

.mental-trend-icon::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 2px;
    background: currentColor;
    box-shadow: 14px 0 0 currentColor;
}

.mental-trend-icon::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 2px;
    width: 12px;
    height: 16px;
    border-left: 2px solid currentColor;
    border-right: 2px solid transparent;
    border-top: 2px solid transparent;
    border-bottom: 2px solid transparent;
    transform: skewX(-18deg);
    box-shadow: inset -2px -6px 0 -4px currentColor;
}

.mood-chart-card {
    border: 1px solid #e3ebf6;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 249, 254, 0.98) 100%);
    border-radius: 20px;
    padding: 14px 16px 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    overflow: hidden;
}

.mood-chart {
    width: 100%;
    height: clamp(210px, 24vw, 300px);
    display: block;
}

.chart-grid line {
    stroke: #dce6f3;
    stroke-width: 1;
    stroke-dasharray: 3 6;
}

.chart-y-labels text,
.chart-x-label {
    fill: #6a7f9f;
    font-size: 14px;
    font-family: "Plus Jakarta Sans", sans-serif;
}

.chart-x-label {
    text-anchor: middle;
}

.chart-line {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 8px 12px rgba(26, 35, 58, 0.08));
}

.mood-line {
    stroke: #21a366;
}

.stress-line {
    stroke: #d85b53;
}

.chart-point {
    fill: #fff;
    stroke-width: 3;
}

.mood-point {
    stroke: #21a366;
}

.stress-point {
    stroke: #d85b53;
}

.chart-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 14px;
    font-weight: 800;
    color: #516987;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.legend-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
}

.legend-swatch.mood {
    background: #21a366;
}

.legend-swatch.stress {
    background: #d85b53;
}

.mood-tip-panel {
    display: flex;
    gap: 18px;
    margin-top: 24px;
    padding: 30px;
    border-radius: 24px;
    border: 1px solid #cfe2dc;
    background: linear-gradient(135deg, #f4faf7 0%, #eef7f3 100%);
    box-shadow: 0 18px 36px rgba(45, 84, 70, 0.09);
}

.sleep-mood-insight-card {
    display: flex;
    gap: 18px;
    margin-top: 24px;
    padding: 26px 28px;
    border-radius: 24px;
    border: 1px solid #dfe7f3;
    background: linear-gradient(135deg, #f7faff 0%, #f2f6fc 100%);
    box-shadow: 0 16px 34px rgba(39, 56, 92, 0.08);
}

.sleep-mood-insight-card-warning {
    border-color: #f0d0c8;
    background: linear-gradient(135deg, #fff8f4 0%, #fff1ec 100%);
}

.sleep-mood-insight-card-success {
    border-color: #cfe6d9;
    background: linear-gradient(135deg, #f3fbf7 0%, #ebf8f1 100%);
}

.sleep-mood-insight-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #dde6f2;
    flex: 0 0 56px;
    position: relative;
}

.sleep-mood-insight-icon::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 14px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #7389ac;
    box-shadow: 18px 0 0 #7389ac;
}

.sleep-mood-insight-icon::after {
    content: "";
    position: absolute;
    left: 16px;
    bottom: 14px;
    width: 22px;
    height: 10px;
    border-bottom: 2px solid #7389ac;
    border-radius: 0 0 18px 18px;
}

.sleep-mood-insight-card-warning .sleep-mood-insight-icon {
    border-color: #f0d6d0;
}

.sleep-mood-insight-card-warning .sleep-mood-insight-icon::before,
.sleep-mood-insight-card-warning .sleep-mood-insight-icon::after {
    background: #c56d57;
    box-shadow: 18px 0 0 #c56d57;
    border-color: #c56d57;
}

.sleep-mood-insight-card-success .sleep-mood-insight-icon {
    border-color: #cfe7d7;
}

.sleep-mood-insight-card-success .sleep-mood-insight-icon::before,
.sleep-mood-insight-card-success .sleep-mood-insight-icon::after {
    background: #2f8f63;
    box-shadow: 18px 0 0 #2f8f63;
    border-color: #2f8f63;
}

.sleep-mood-insight-card h3 {
    margin: 0 0 10px;
    color: #27344b;
}

.sleep-mood-insight-card p {
    margin: 0;
    color: #50627e;
    line-height: 1.55;
}

.sleep-mood-insight-meta {
    margin-top: 12px;
    color: #7f8da5;
    font-size: 0.9rem;
    font-weight: 700;
}

.mood-tip-panel p {
    margin: 0 0 14px;
    color: #365a54;
    font-size: 1rem;
    line-height: 1.55;
}

.mood-tip-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid #d7ebe3;
    display: grid;
    place-items: center;
    flex: 0 0 56px;
}

.tip-bulb {
    width: 22px;
    height: 22px;
    position: relative;
    display: inline-block;
    border: 2px solid #f6b320;
    border-radius: 50%;
    background: #ffe9a5;
}

.tip-bulb::before {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: -7px;
    height: 7px;
    border-radius: 0 0 6px 6px;
    background: #f6b320;
}

.tip-bulb::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 10px;
    background: #f6b320;
    left: 50%;
    top: 5px;
    transform: translateX(-50%);
    box-shadow: -5px 2px 0 -1px #f6b320, 5px 2px 0 -1px #f6b320;
}

.tip-bulb-purple {
    border-color: #2b8f63;
    background: #dff5e9;
}

.tip-bulb-purple::before,
.tip-bulb-purple::after {
    background: #2b8f63;
    box-shadow: -5px 2px 0 -1px #2b8f63, 5px 2px 0 -1px #2b8f63;
}

.mood-tip-panel h3 {
    color: #214f46;
    margin-bottom: 12px;
}

.mood-tip-list {
    margin: 0;
    padding-left: 20px;
    color: #486560;
}

.mood-tip-list li + li {
    margin-top: 10px;
}

.appointments-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: flex-start;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.appointments-layout-single {
    display: block;
}

.appointments-col {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.appointments-col-full {
    width: 100%;
}

.content-shell-appointments {
    width: 100%;
    margin: 0;
}

.appointments-section-head {
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
}

.section-copy {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.section-toggle {
    border: 0;
    background: #eef5ff;
    color: var(--blue);
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.appt-card-stack {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.appt-card,
.history-card {
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 20px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.appointment-record-card {
    display: grid;
    gap: 14px;
}

.appt-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    min-width: 0;
}

.appt-top > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.appt-top h3,
.history-card h3 {
    margin: 0 0 8px;
}

.appointment-record-card .appt-top h3 {
    margin-bottom: 0;
}

.doctor-tag {
    display: inline-flex;
    padding: 7px 12px;
    border-radius: 12px;
    background: #ebfffb;
    border: 1px solid #8ce7d8;
    color: #0eaa94;
    font-weight: 700;
    font-size: 0.84rem;
}

.appt-date-block {
    text-align: right;
    display: grid;
    gap: 6px;
    flex: 0 0 auto;
    max-width: 44%;
}

.appt-date-block span {
    color: #5f78a1;
}

.appt-description-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.appt-detail-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    color: #5f78a1;
    font-weight: 600;
    min-width: 0;
}

.appt-detail-row span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
}

.appt-detail-row strong {
    color: #425b82;
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.appt-inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 16px 0 12px;
    color: #5f78a1;
    font-weight: 600;
    min-width: 0;
}

.appt-inline-meta > *,
.history-primary-meta > * {
    min-width: 0;
    max-width: 100%;
}

.appt-meta-line {
    margin: 16px 0 12px;
    color: #5f78a1;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    border: 1px solid transparent;
}

.status-pill.info {
    background: #edf4ff;
    border-color: #cfe0ff;
    color: #265cf1;
}

.status-pill.success {
    background: #eafbf3;
    border-color: #b9ebcf;
    color: #1f9b5f;
}

.status-pill.warning {
    background: #fff1e8;
    border-color: #ffc6a7;
    color: #c44d1c;
}

.status-pill.muted {
    background: #f3f6fa;
    border-color: #d8e2f0;
    color: #6d809f;
}

.appt-note-box,
.history-note {
    border: 1px solid #efe2aa;
    background: #fff9e6;
    color: #4e5f7f;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: pre-wrap;
    max-width: 100%;
    min-width: 0;
}

.history-note {
    border-color: var(--line);
    background: #fbfdff;
    word-break: break-all;
}

.appt-note-block {
    display: grid;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
}

.appt-note-block .appt-note-box {
    margin-bottom: 0;
}

.appt-note-label {
    color: #7c8fad;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.history-specialty {
    margin: 0;
    color: #6d809f;
    font-weight: 600;
}

.history-meta {
    margin: 16px 0 14px;
    display: grid;
    gap: 10px;
}

.history-primary-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #5f78a1;
    font-weight: 700;
    min-width: 0;
}

.history-meta-divider {
    color: #93a6c5;
}

.history-follow-up {
    display: grid;
    gap: 4px;
}

.history-label {
    color: #7c8fad;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.history-follow-up strong {
    font-size: 0.96rem;
}

.history-note-block {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    min-width: 0;
    max-width: 100%;
}

.history-note-block .history-note {
    margin-bottom: 0;
}

.history-summary {
    color: #15a99d;
    font-weight: 700;
}

.appt-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: stretch;
}

.appt-actions > * {
    flex: 1 1 140px;
}

.appt-actions form {
    display: flex;
}

.appt-actions .outline-wide,
.appt-actions .dark-button,
.appt-actions .inline-action {
    width: 100%;
    min-height: 44px;
}

.appt-actions .inline-action {
    justify-content: center;
    display: inline-flex;
}

.history-link {
    color: #15a99d;
    font-weight: 700;
}

.appointment-modal {
    width: min(760px, 100%);
}

.reminder-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 2px solid var(--line);
    border-radius: 16px;
    background: #fbfdff;
}

.reminder-toggle input {
    width: 22px;
    height: 22px;
}

.schedule-button {
    background: #ff5a0a;
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 700;
    cursor: pointer;
}

.alerts-column {
    flex: 0.72;
}

.alerts-column.wide {
    flex: 1.28;
}

.pattern-stack,
.alert-stack {
    display: grid;
    gap: 16px;
}

.pattern-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: #fff;
    border: 2px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.pattern-card h3 {
    margin: 0 0 6px;
    font-size: 1rem;
}

.pattern-card p {
    color: #6b83aa;
}

.pattern-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    flex: 0 0 46px;
    position: relative;
}

.pattern-icon.indigo { background: #eef1ff; }
.pattern-icon.purple { background: #f4eeff; }
.pattern-icon.orange { background: #fff3e7; }
.pattern-icon.green { background: #e8f7ef; }

.pattern-icon.indigo::before,
.pattern-icon.purple::before,
.pattern-icon.orange::before,
.pattern-icon.green::before {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    font-weight: 800;
}

.pattern-icon.indigo::before { content: "Z"; color: #5b5df0; }
.pattern-icon.purple::before { content: "!"; color: #8a2bff; }
.pattern-icon.orange::before { content: "~"; color: #f18700; }
.pattern-icon.green::before { content: "+"; color: #07a36b; }

.pattern-card.green {
    border-color: #cdeedc;
}

.alert-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #fff3f4;
    border: 2px solid #ffbcc8;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.alert-card.warning {
    background: #fff8ee;
    border-color: #ffd89f;
}

.alert-card.success {
    background: #ebfbf3;
    border-color: #8ae4bb;
}

.alert-card.neutral {
    background: #f7faff;
    border-color: #cadcf5;
}

.alert-icon-col {
    width: 42px;
    display: flex;
    justify-content: center;
}

.alert-badge {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 2px solid #ff446b;
    position: relative;
    margin-top: 8px;
    background: #fff;
}

.alert-badge::before {
    content: "!";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ff204f;
    font-weight: 800;
}

.alert-badge.warning {
    border-color: #ffb85c;
}

.alert-badge.warning::before {
    content: "~";
    color: #f18700;
}

.alert-badge.success {
    border-color: #2ac983;
}

.alert-badge.success::before {
    content: "+";
    color: #07a36b;
}

.alert-badge.neutral {
    border-color: #88a8d8;
}

.alert-badge.neutral::before {
    content: "i";
    color: #5079b5;
}

.alert-content h3 {
    margin: 4px 0 10px;
    color: #ff204f;
    font-size: 1rem;
}

.alert-card.warning .alert-content h3 {
    color: #d07a00;
}

.alert-card.success .alert-content h3 {
    color: #049a67;
}

.alert-card.neutral .alert-content h3 {
    color: #335f9d;
}

.recommend-chip {
    margin-top: 14px;
    background: var(--surface);
    border: 2px solid #d9e3ef;
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--ink);
}

.calendar-board {
    order: 2;
    flex: 1.7;
    padding: 20px;
}

.calendar-main {
    flex: 1;
    display: grid;
    gap: 16px;
    min-width: 0;
}

.calendar-top {
    order: 1;
}

.calendar-under {
    order: 3;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
}

.calendar-under .cycle-info-warning {
    grid-column: 1 / -1;
}

.calendar-side {
    flex: 0 0 320px;
    display: grid;
    gap: 14px;
    align-content: start;
}

.calendar-side .side-focus {
    display: grid;
}

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

.calendar-head h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.month-icon {
    width: 22px;
    height: 22px;
    position: relative;
    flex: 0 0 22px;
    color: #7186ab;
}

.month-icon::before {
    content: "";
    position: absolute;
    inset: 3px 1px 1px;
    border: 2px solid currentColor;
    border-radius: 5px;
}

.month-icon::after {
    content: "";
    position: absolute;
    left: 5px;
    right: 5px;
    top: 8px;
    border-top: 2px solid currentColor;
}

.calendar-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.calendar-nav button,
.calendar-nav-link {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 2px solid var(--line);
    background: #fff;
    color: #7188af;
    cursor: pointer;
    font-size: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    line-height: 1;
}

.calendar-nav button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 12px;
    padding: 0;
    color: #5b749a;
    text-align: center;
    font-size: 0.92rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    align-items: stretch;
}

.calendar-cell {
    min-height: 92px;
    border-radius: 18px;
    border: 2px solid var(--line);
    background: #fff;
    padding: 12px 10px 10px;
    text-align: left;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.calendar-cell:hover {
    transform: translateY(-1px);
}

.calendar-cell:focus-visible {
    outline: 3px solid rgba(255, 61, 127, 0.22);
    outline-offset: 2px;
}

.calendar-cell.empty {
    background: transparent;
    border-color: transparent;
    cursor: default;
}

.calendar-cell.period {
    border-color: #ff9ab0;
    background: #fff3f6;
}

.calendar-cell.period.period-start {
    border-color: #ff5f7c;
    background:
        radial-gradient(circle at 28% 24%, rgba(255, 245, 248, 0.95), transparent 34%),
        linear-gradient(180deg, #ffd5df 0%, #ffb8c9 100%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.85),
        0 0 0 1px rgba(255, 95, 124, 0.18),
        0 14px 28px rgba(255, 95, 124, 0.18);
}

.calendar-cell.period.period-start .calendar-number {
    color: #8f183a;
}

.calendar-cell.period.period-start .glyph-drop {
    transform: scale(1.08);
}

.calendar-cell.fertile {
    border-color: #7cb6ff;
    background: #e8f2ff;
}

.calendar-cell.ovulation {
    border-color: #c58aff;
    background: #f5ebff;
}

.calendar-cell.luteal {
    border-color: #ffd25d;
    background: #fff9e8;
}

.calendar-cell.today {
    box-shadow: inset 0 0 0 2px #1f234f;
}

.calendar-cell.selected {
    border-color: #ff5c86;
    box-shadow: inset 0 0 0 2px #ff5c86, 0 14px 24px rgba(255, 92, 134, 0.12);
}

.calendar-cell.period.period-start.today {
    box-shadow:
        inset 0 0 0 2px #1f234f,
        0 0 0 1px rgba(255, 95, 124, 0.16),
        0 14px 28px rgba(255, 95, 124, 0.16);
}

.calendar-cell.period.period-start.selected {
    border-color: #ff5c86;
    box-shadow:
        inset 0 0 0 2px #ff5c86,
        0 0 0 1px rgba(255, 95, 124, 0.24),
        0 16px 28px rgba(255, 95, 124, 0.18);
}

.calendar-number {
    display: block;
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 0.92rem;
}

.calendar-glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
}

.glyph-drop,
.glyph-sun,
.glyph-flower {
    display: inline-block;
    position: relative;
}

.glyph-drop {
    width: 11px;
    height: 15px;
    border: 2px solid #ff2d63;
    border-radius: 10px 10px 10px 10px / 12px 12px 8px 8px;
    transform: rotate(45deg);
}

.glyph-sun {
    width: 18px;
    height: 18px;
}

.glyph-sun::before,
.glyph-sun::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.glyph-sun::before {
    inset: 4px;
    border: 2px solid #9728ff;
}

.glyph-sun::after {
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    background:
        radial-gradient(circle, transparent 43%, #9728ff 44%, #9728ff 51%, transparent 52%),
        conic-gradient(from 0deg, #9728ff 0deg 10deg, transparent 10deg 45deg, #9728ff 45deg 55deg, transparent 55deg 90deg, #9728ff 90deg 100deg, transparent 100deg 135deg, #9728ff 135deg 145deg, transparent 145deg 180deg, #9728ff 180deg 190deg, transparent 190deg 225deg, #9728ff 225deg 235deg, transparent 235deg 270deg, #9728ff 270deg 280deg, transparent 280deg 315deg, #9728ff 315deg 325deg, transparent 325deg 360deg);
}

.glyph-flower {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5b8fff;
}

.glyph-flower::before,
.glyph-flower::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #76adff;
}

.glyph-flower::before {
    left: -7px;
    top: 0;
    box-shadow: 14px 0 0 #76adff, 7px -7px 0 #76adff, 7px 7px 0 #76adff;
}

.glyph-flower::after {
    width: 5px;
    height: 5px;
    background: #ffffff;
    left: 1px;
    top: 1px;
    box-shadow: none;
}

.ovulation-ring {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    border: 4px solid #e5c7ff;
    margin: 0 auto 16px;
    position: relative;
}

.ovulation-ring::before {
    content: "";
    position: absolute;
    inset: 31px;
    border-radius: 50%;
    border: 3px solid #9728ff;
}

.ovulation-ring::after {
    content: "";
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    border: 0;
    background:
        conic-gradient(from 0deg, #9728ff 0deg 8deg, transparent 8deg 45deg, #9728ff 45deg 53deg, transparent 53deg 90deg, #9728ff 90deg 98deg, transparent 98deg 135deg, #9728ff 135deg 143deg, transparent 143deg 180deg, #9728ff 180deg 188deg, transparent 188deg 225deg, #9728ff 225deg 233deg, transparent 233deg 270deg, #9728ff 270deg 278deg, transparent 278deg 315deg, #9728ff 315deg 323deg, transparent 323deg 360deg);
    -webkit-mask: radial-gradient(circle, transparent 0 23px, #000 23px);
            mask: radial-gradient(circle, transparent 0 23px, #000 23px);
}

.side-focus {
    padding: 22px;
}

.side-focus h3,
.legend-card h3,
.day-summary h3,
.modal-card h2 {
    margin: 0 0 12px;
}

.side-focus h3 {
    font-size: 1rem;
}

.side-focus p {
    font-size: 0.88rem;
    line-height: 1.55;
}

.cycle-insights-card {
    position: relative;
    display: grid;
    gap: 10px;
    overflow: hidden;
    padding: 12px 14px;
    border-color: rgba(202, 216, 235, 0.9);
    background:
        radial-gradient(circle at top left, rgba(255, 118, 164, 0.1), transparent 31%),
        radial-gradient(circle at top right, rgba(120, 162, 255, 0.09), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 255, 0.98) 100%);
    box-shadow: 0 12px 26px rgba(31, 45, 82, 0.07);
}

.cycle-insights-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 79, 122, 0.5), rgba(50, 123, 246, 0));
}

.cycle-insights-card > * {
    position: relative;
    z-index: 1;
}

.cycle-insights-header {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

.cycle-insights-header .ovulation-ring {
    width: 36px;
    height: 36px;
    margin: 0;
    border-width: 2px;
    border-color: rgba(226, 196, 255, 0.9);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(244, 237, 255, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.cycle-insights-header .ovulation-ring::before {
    inset: 12px;
    border-width: 2px;
}

.cycle-insights-header .ovulation-ring::after {
    inset: 6px;
    -webkit-mask: radial-gradient(circle, transparent 0 9px, #000 9px);
            mask: radial-gradient(circle, transparent 0 9px, #000 9px);
}

.cycle-insights-kicker {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 79, 122, 0.12);
    color: #c53f76;
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cycle-insights-heading h3 {
    margin: 6px 0 0;
    font-size: 0.96rem;
    letter-spacing: 0;
}

.cycle-insights-summary {
    margin-top: 3px;
    max-width: 46ch;
    color: var(--text-soft-strong);
    font-size: 0.78rem;
    line-height: 1.35;
}

.cycle-insights-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.prediction-box {
    border: 1px solid rgba(123, 149, 192, 0.28);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(238, 245, 255, 0.98));
    padding: 10px 12px;
    text-align: left;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.prediction-box-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}

.prediction-label,
.status-line {
    display: block;
    color: #6a84ab;
    font-weight: 700;
    font-size: 0.86rem;
    letter-spacing: 0.04em;
}

.prediction-label,
.cycle-insights-card .status-line {
    font-weight: 800;
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.prediction-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(50, 123, 246, 0.1);
    color: #2f63bd;
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.forecast-delayed .prediction-badge {
    background: rgba(255, 181, 76, 0.16);
    color: #a96400;
}

.forecast-unavailable .prediction-badge {
    background: rgba(123, 149, 192, 0.14);
    color: #5e6f8f;
}

.cycle-insights-prediction.forecast-delayed {
    border-color: rgba(255, 181, 76, 0.38);
}

.cycle-insights-prediction.forecast-unavailable {
    border-color: rgba(123, 149, 192, 0.32);
}

.prediction-box strong {
    display: block;
    margin-top: 0;
    max-width: none;
    font-size: clamp(0.9rem, 1vw, 1rem);
    line-height: 1.18;
    letter-spacing: 0;
    color: var(--ink);
}

.prediction-status {
    margin-top: 8px;
    font-size: 0.77rem;
    line-height: 1.38;
    color: var(--text-soft-strong);
}

.cycle-insights-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 7px;
    align-content: start;
}

.insight-chip {
    display: grid;
    align-content: start;
    gap: 4px;
    border: 1px solid rgba(202, 216, 235, 0.86);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    padding: 9px 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.insight-chip strong {
    display: block;
    margin-top: 0;
    font-size: 0.82rem;
    color: var(--ink);
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.insight-support {
    color: var(--text-tertiary);
    font-size: 0.72rem;
    line-height: 1.28;
}

.cycle-metric-chip {
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 2px;
    min-height: 66px;
}

.cycle-metric-chip .cycle-metric-icon {
    grid-row: 1 / span 3;
}

.cycle-metric-chip .status-line,
.cycle-metric-chip strong,
.cycle-metric-chip .insight-support {
    grid-column: 2;
}

.cycle-metric-icon {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    position: relative;
    background: rgba(255, 79, 122, 0.12);
    border: 1px solid rgba(255, 79, 122, 0.24);
    color: #ff4f7a;
}

.cycle-metric-icon::before,
.cycle-metric-icon::after {
    content: "";
    position: absolute;
}

.cycle-metric-next::before {
    inset: 5px 4px 4px;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.cycle-metric-next::after {
    left: 6px;
    right: 6px;
    top: 8px;
    border-top: 2px solid currentColor;
}

.cycle-metric-cycle::before {
    inset: 5px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.cycle-metric-cycle::after {
    width: 6px;
    height: 6px;
    right: 3px;
    top: 4px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
}

.cycle-metric-flow::before {
    width: 9px;
    height: 12px;
    left: 6px;
    top: 5px;
    border: 2px solid currentColor;
    border-radius: 10px 10px 10px 10px / 12px 12px 8px 8px;
    transform: rotate(45deg);
}

.cycle-metric-pattern::before {
    left: 5px;
    right: 5px;
    bottom: 5px;
    height: 9px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
}

.cycle-metric-pattern::after {
    left: 7px;
    right: 4px;
    top: 7px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: skewX(-22deg);
}

.cycle-metric-confidence::before {
    inset: 5px;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.cycle-metric-confidence::after {
    width: 7px;
    height: 4px;
    left: 7px;
    top: 8px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
}

.cycle-details-disclosure,
.pcos-note {
    margin: 0;
    padding: 9px 10px;
    border: 1px solid rgba(202, 216, 235, 0.82);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.62);
    font-size: 0.74rem;
    color: var(--text-soft-strong);
    line-height: 1.34;
}

.cycle-details-disclosure summary {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #c53f76;
    font-weight: 800;
}

.cycle-details-disclosure summary::-webkit-details-marker {
    display: none;
}

.cycle-details-disclosure summary::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}

.cycle-details-disclosure[open] summary::after {
    transform: rotate(225deg) translateY(-2px);
}

.cycle-details-disclosure p {
    margin: 8px 0 0;
}

body.theme-dark .cycle-insights-card {
    border-color: rgba(92, 117, 157, 0.54);
    background:
        radial-gradient(circle at top left, rgba(255, 116, 167, 0.11), transparent 32%),
        radial-gradient(circle at top right, rgba(113, 160, 255, 0.1), transparent 28%),
        linear-gradient(180deg, #18263f 0%, #132036 100%);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

body.theme-dark .cycle-insights-card::before {
    background: linear-gradient(90deg, rgba(255, 154, 186, 0.42), rgba(127, 176, 255, 0));
}

body.theme-dark .cycle-insights-header .ovulation-ring {
    border-color: rgba(228, 197, 255, 0.32);
    background: linear-gradient(180deg, rgba(29, 43, 70, 0.98), rgba(20, 33, 55, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 18px rgba(0, 0, 0, 0.14);
}

body.theme-dark .cycle-insights-kicker {
    background: rgba(255, 124, 173, 0.16);
    color: #ffb6cf;
}

body.theme-dark .cycle-insights-summary,
body.theme-dark .prediction-status {
    color: var(--text-tertiary);
}

body.theme-dark .cycle-insights-prediction {
    border-color: rgba(94, 129, 191, 0.42);
    background: linear-gradient(180deg, rgba(22, 35, 58, 0.98), rgba(16, 28, 48, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.theme-dark .prediction-badge {
    background: rgba(92, 151, 255, 0.16);
    color: #afcbff;
}

body.theme-dark .forecast-delayed .prediction-badge {
    background: rgba(255, 183, 77, 0.16);
    color: #ffd38a;
}

body.theme-dark .forecast-unavailable .prediction-badge {
    background: rgba(151, 168, 198, 0.14);
    color: #c5d1e8;
}

body.theme-dark .cycle-insights-prediction.forecast-delayed {
    border-color: rgba(255, 183, 77, 0.34);
}

body.theme-dark .cycle-insights-prediction.forecast-unavailable {
    border-color: rgba(151, 168, 198, 0.24);
}

body.theme-dark .insight-chip {
    border-color: rgba(97, 122, 163, 0.34);
    background: rgba(18, 32, 56, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.theme-dark .insight-support {
    color: var(--text-tertiary);
}

body.theme-dark .cycle-metric-icon {
    background: rgba(255, 124, 173, 0.14);
    border-color: rgba(255, 157, 194, 0.24);
    color: #ffb6cf;
}

body.theme-dark .cycle-details-disclosure {
    border-color: rgba(92, 117, 157, 0.44);
    background: rgba(18, 32, 56, 0.72);
    color: var(--text-tertiary);
}

body.theme-dark .cycle-details-disclosure summary {
    color: #ffb6cf;
}

body.theme-dark .pcos-note {
    border-color: rgba(92, 117, 157, 0.44);
    background: rgba(18, 32, 56, 0.84);
    color: var(--text-tertiary);
}

.legend-card-link {
    display: block;
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.legend-card-link::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 79, 122, 0.46), rgba(50, 123, 246, 0));
}

.legend-card-link:hover,
.legend-card-link:focus-visible {
    border-color: #ffc1cf;
    box-shadow: 0 12px 22px rgba(31, 45, 82, 0.08);
    transform: translateY(-2px);
}

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

.legend-card-head h3 {
    margin: 0;
}

.legend-card-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--pink);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.legend-card-arrow {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--pink-soft);
    border: 1px solid rgba(255, 79, 122, 0.22);
    position: relative;
    flex: 0 0 22px;
}

.legend-card-arrow::before {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    top: 7px;
    left: 6px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
}

.legend-card {
    padding: 16px;
    height: auto;
}

.legend-card h3 {
    font-size: 0.88rem;
    letter-spacing: 0.03em;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 9px;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
}

.legend-note {
    margin-top: 10px;
    font-size: 0.76rem;
    line-height: 1.35;
    color: #6a84ab;
}

.legend-cta {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(202, 216, 235, 0.72);
    color: #c53f76;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.45;
}

.legend-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 2px solid transparent;
}

.legend-dot.period { border-color: #ff88a4; background: #ffe9ef; }
.legend-dot.period-start {
    border-color: #ff5f7c;
    background: linear-gradient(180deg, #ffd5df, #ffb8c9);
    box-shadow: 0 0 0 1px rgba(255, 95, 124, 0.16), 0 6px 12px rgba(255, 95, 124, 0.16);
}
.legend-dot.fertile { border-color: #79b4ff; background: #eaf3ff; }
.legend-dot.ovulation { border-color: #cb9dff; background: #f6ecff; }
.legend-dot.luteal { border-color: #ffd25d; background: #fff7de; }

body.theme-dark .legend-card-link:hover,
body.theme-dark .legend-card-link:focus-visible {
    border-color: rgba(255, 157, 194, 0.34);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

body.theme-dark .legend-card-action {
    color: #ffb6cf;
}

body.theme-dark .legend-card-arrow {
    background: rgba(255, 79, 122, 0.12);
    border-color: rgba(255, 157, 194, 0.24);
}

body.theme-dark .legend-cta {
    border-color: rgba(92, 117, 157, 0.44);
    color: #ffb6cf;
}

.cycle-phases-shell {
    display: grid;
    gap: 22px;
}

.cycle-phases-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(250px, 0.8fr);
    gap: 22px;
    align-items: center;
    padding: 28px 30px;
    position: relative;
    overflow: hidden;
    border-color: rgba(202, 216, 235, 0.9);
    background:
        radial-gradient(circle at top left, rgba(255, 110, 154, 0.18), transparent 34%),
        radial-gradient(circle at bottom right, rgba(121, 180, 255, 0.16), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 255, 0.98) 100%);
    box-shadow: 0 18px 36px rgba(31, 45, 82, 0.08);
}

.cycle-phases-hero::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 79, 122, 0.5), rgba(50, 123, 246, 0));
}

.cycle-phases-hero > * {
    position: relative;
    z-index: 1;
}

.cycle-phases-kicker {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 79, 122, 0.12);
    color: #c53f76;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cycle-phases-hero h2 {
    margin: 12px 0 10px;
    max-width: 16ch;
    font-size: clamp(1.45rem, 3vw, 2.1rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--ink);
}

.cycle-phases-hero-copy {
    max-width: 58ch;
    color: var(--text-soft-strong);
    font-size: 0.98rem;
    line-height: 1.62;
}

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

.cycle-phase-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(202, 216, 235, 0.82);
    background: rgba(255, 255, 255, 0.76);
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.phase-pill-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid transparent;
    flex: 0 0 14px;
}

.phase-pill-dot.period {
    border-color: #ff617e;
    background: #ffe2ea;
}

.phase-pill-dot.follicular {
    border-color: #4b8eff;
    background: #e9f2ff;
}

.phase-pill-dot.ovulation {
    border-color: #a761ff;
    background: #f1e4ff;
}

.phase-pill-dot.luteal {
    border-color: #e6b118;
    background: #fff1bd;
}

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

.cycle-phase-card {
    position: relative;
    display: grid;
    gap: 16px;
    padding: 22px 22px 20px;
    overflow: hidden;
    border: 1px solid rgba(202, 216, 235, 0.88);
    box-shadow: 0 14px 30px rgba(31, 45, 82, 0.07);
}

.cycle-phase-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--phase-accent);
}

.cycle-phase-card.period {
    --phase-accent: #ff5f7c;
    --phase-soft: rgba(255, 95, 124, 0.12);
}

.cycle-phase-card.follicular {
    --phase-accent: #4d8dff;
    --phase-soft: rgba(77, 141, 255, 0.12);
}

.cycle-phase-card.ovulation {
    --phase-accent: #9e5cff;
    --phase-soft: rgba(158, 92, 255, 0.12);
}

.cycle-phase-card.luteal {
    --phase-accent: #e2b228;
    --phase-soft: rgba(226, 178, 40, 0.14);
}

.cycle-phase-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cycle-phase-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    position: relative;
    flex: 0 0 48px;
    background: var(--phase-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.cycle-phase-icon::before,
.cycle-phase-icon::after {
    content: "";
    position: absolute;
}

.cycle-phase-icon-period::before {
    width: 16px;
    height: 22px;
    top: 11px;
    left: 16px;
    border-radius: 16px 16px 16px 16px / 20px 20px 12px 12px;
    background: #ff5f7c;
    transform: rotate(45deg);
}

.cycle-phase-icon-follicular::before {
    width: 5px;
    height: 20px;
    left: 22px;
    top: 15px;
    border-radius: 999px;
    background: #4d8dff;
}

.cycle-phase-icon-follicular::after {
    width: 20px;
    height: 20px;
    left: 14px;
    top: 11px;
    border-radius: 50% 50% 50% 0;
    border: 3px solid #4d8dff;
    border-top-color: transparent;
    border-right-color: transparent;
    transform: rotate(135deg);
}

.cycle-phase-icon-ovulation::before {
    inset: 10px;
    border-radius: 50%;
    border: 3px solid #9e5cff;
}

.cycle-phase-icon-ovulation::after {
    inset: 18px;
    border-radius: 50%;
    background: #9e5cff;
}

.cycle-phase-icon-luteal::before {
    width: 22px;
    height: 22px;
    top: 13px;
    left: 13px;
    border-radius: 50%;
    background: #e2b228;
}

.cycle-phase-icon-luteal::after {
    width: 18px;
    height: 18px;
    top: 11px;
    left: 23px;
    border-radius: 50%;
    background: #ffffff;
}

.cycle-phase-eyebrow {
    display: block;
    color: var(--phase-accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cycle-phase-card h3 {
    margin: 6px 0 0;
    font-size: 1.12rem;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.cycle-phase-summary {
    color: var(--text-soft-strong);
    font-size: 0.94rem;
    line-height: 1.58;
}

.cycle-phase-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.cycle-phase-list li {
    position: relative;
    padding-left: 16px;
    color: var(--text-soft-strong);
    font-size: 0.9rem;
    line-height: 1.56;
}

.cycle-phase-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.46rem;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--phase-accent);
}

.cycle-phases-footer {
    padding: 18px 20px;
    border-style: dashed;
}

.cycle-phases-disclaimer {
    color: var(--text-soft-strong);
    font-size: 0.9rem;
    line-height: 1.56;
}

.cycle-phases-source {
    margin-top: 10px;
    color: var(--text-tertiary);
    font-size: 0.82rem;
}

.cycle-phases-source a {
    color: var(--pink);
    font-weight: 700;
}

body.theme-dark .cycle-phases-hero {
    border-color: rgba(92, 117, 157, 0.54);
    background:
        radial-gradient(circle at top left, rgba(255, 116, 167, 0.18), transparent 34%),
        radial-gradient(circle at bottom right, rgba(113, 160, 255, 0.16), transparent 30%),
        linear-gradient(180deg, #18263f 0%, #132036 100%);
    box-shadow: 0 22px 46px rgba(0, 0, 0, 0.28);
}

body.theme-dark .cycle-phases-kicker {
    background: rgba(255, 124, 173, 0.16);
    color: #ffb6cf;
}

body.theme-dark .cycle-phases-hero-copy,
body.theme-dark .cycle-phase-summary,
body.theme-dark .cycle-phase-list li,
body.theme-dark .cycle-phases-disclaimer {
    color: var(--text-tertiary);
}

body.theme-dark .cycle-phase-pill {
    border-color: rgba(97, 122, 163, 0.34);
    background: rgba(18, 32, 56, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.theme-dark .cycle-phase-card {
    border-color: rgba(97, 122, 163, 0.34);
    background: linear-gradient(180deg, rgba(23, 35, 58, 0.98), rgba(17, 29, 48, 0.98));
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.24);
}

body.theme-dark .cycle-phase-icon {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.theme-dark .cycle-phase-icon-luteal::after {
    background: #18263f;
}

body.theme-dark .cycle-phases-footer {
    border-color: rgba(97, 122, 163, 0.34);
    background: rgba(18, 32, 56, 0.78);
}

body.theme-dark .cycle-phases-source {
    color: var(--text-tertiary);
}

body.theme-dark .cycle-phases-source a {
    color: #ffb6cf;
}

.cycle-day-detail {
    display: grid;
    gap: 18px;
    align-content: start;
}

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

.cycle-stat-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: #f8fbff;
    border: 1px solid #e4ecf7;
}

.cycle-day-detail-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 1rem;
    color: var(--ink);
}

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

.cycle-detail-item {
    padding-bottom: 12px;
    border-bottom: 1px solid #e9eff7;
}

.cycle-detail-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.cycle-detail-label {
    display: block;
    margin-bottom: 6px;
    color: #5f7ca8;
    font-weight: 700;
    font-size: 0.9rem;
}

.cycle-detail-item p {
    margin: 0;
    color: var(--ink);
    line-height: 1.45;
}

.cycle-info-warning {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid #ffc3d0;
    background: #fff5f7;
    color: #c31a47;
    line-height: 1.35;
    box-shadow: 0 10px 22px rgba(31, 45, 82, 0.08);
    font-size: 0.84rem;
    font-weight: 700;
}

.cycle-info-warning span {
    display: block;
    margin-top: 2px;
    color: inherit;
    font-weight: 500;
    opacity: 0.82;
}

.warning-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ff6b8c;
    display: grid;
    place-items: center;
    font-weight: 800;
    flex: 0 0 24px;
}

.warning-icon::before {
    content: "i";
}

.cycle-flower-title {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: -2px;
    position: relative;
}

.cycle-flower-title::before,
.cycle-flower-title::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.cycle-flower-title::before {
    inset: 6px;
    background: #ff7cad;
    box-shadow:
        -6px 0 0 #ff95bc,
        6px 0 0 #ff95bc,
        0 -6px 0 #ff95bc,
        0 6px 0 #ff95bc,
        -4px -4px 0 #ffb3cd,
        4px -4px 0 #ffb3cd,
        -4px 4px 0 #ffb3cd,
        4px 4px 0 #ffb3cd;
}

.cycle-flower-title::after {
    inset: 9px;
    background: #ffe16f;
}

.button-drop-icon {
    width: 11px;
    height: 15px;
    display: inline-block;
    position: relative;
    transform: rotate(45deg);
    border: 2px solid currentColor;
    border-radius: 12px 12px 12px 12px / 14px 14px 10px 10px;
    margin-top: -2px;
}

.magenta-button {
    background: #d90368;
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 700;
    cursor: pointer;
}

.outline-wide {
    background: #fff;
    color: var(--ink);
    border: 2px solid var(--line);
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 600;
    cursor: pointer;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 40, 0.48);
    display: grid;
    place-items: center;
    padding: 18px;
    z-index: 60;
}

.modal-card {
    width: min(760px, 100%);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    position: relative;
    z-index: 2;
}

.modal-card p {
    margin: 0 0 14px;
}

.confirm-modal-card {
    width: min(520px, 100%);
}

.confirm-modal-card h2 {
    margin: 8px 0 10px;
    padding-right: 32px;
}

.confirm-modal-card p {
    margin: 0;
    line-height: 1.6;
    color: var(--muted);
}

.confirm-password-check {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    color: var(--ink);
    font-weight: 700;
}

.confirm-password-check[hidden] {
    display: none;
}

.confirm-modal-actions {
    justify-content: flex-end;
    margin-top: 20px;
}

.confirm-modal-actions .outline-wide,
.confirm-modal-actions .inline-action {
    min-width: 154px;
}

.modal-close {
    position: absolute;
    right: 16px;
    top: 12px;
    border: 0;
    background: transparent;
    color: #687a96;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 3;
}

.admin-note-login-modal {
    z-index: 90;
}

.admin-note-modal-card {
    width: min(520px, 92vw);
    border: 1px solid rgba(143, 183, 255, 0.26);
    background: linear-gradient(180deg, rgba(16, 31, 63, 0.98), rgba(11, 21, 45, 0.98));
    color: #e9f2ff;
    box-shadow: 0 22px 52px rgba(5, 12, 28, 0.42);
}

.admin-note-modal-card h2 {
    margin: 8px 32px 14px 0;
    color: #ffffff;
}

.admin-note-modal-list {
    display: grid;
    gap: 10px;
    max-height: 52vh;
    overflow-y: auto;
    padding-right: 2px;
}

.admin-note-modal-list article {
    border: 1px solid rgba(143, 183, 255, 0.18);
    border-radius: 14px;
    padding: 13px 14px;
    background: rgba(143, 183, 255, 0.08);
}

.admin-note-modal-list p {
    margin: 0;
    color: #dce8ff;
    line-height: 1.5;
}

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

.symptom-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    user-select: none;
}

.symptom-pill.active {
    border-color: #d90368;
    background: #fff1f7;
    color: #d90368;
}

.symptom-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.food-row {
    gap: 12px;
    margin-top: 16px;
}

.food-row input {
    flex: 1;
}

.food-row .food-select {
    min-width: 140px;
}

.feedback-grid {
    margin-bottom: 22px;
}

.feedback-preview-list,
.feedback-history-list {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.feedback-preview-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px 18px;
}

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

.feedback-meta {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.feedback-preview-tag {
    display: inline-flex;
    margin-top: 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef5ff;
    color: #315ea8;
    font-size: 0.82rem;
    font-weight: 800;
}

.feedback-preview-copy {
    margin: 10px 0 0;
    color: #6d5471;
    line-height: 1.5;
}

.feedback-history-card {
    gap: 8px;
}

.medication-history-card .feedback-preview-head {
    justify-content: flex-start;
    align-items: flex-start;
}

.medication-history-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.medication-history-card .feedback-preview-copy {
    margin-top: 8px;
}

.feedback-history-date {
    margin-top: 10px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.feedback-chip {
    display: inline-flex;
    margin-top: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
}

.feedback-chip-success {
    background: #e8fff2;
    color: #117a52;
}

.feedback-chip-warning {
    background: #fff1e4;
    color: #b55b14;
}

.feedback-chip-info {
    background: #eef5ff;
    color: #315ea8;
}

.feedback-copy {
    margin: 12px 0 0;
    color: var(--muted);
    font-weight: 600;
}

.tips-panel {
    background: #fff2f5;
    border-color: #ffccd8;
}

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

.tip-item {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ffd5e0;
    border-radius: 16px;
    padding: 14px 16px;
    color: #6d5471;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    text-align: left;
}

.admin-stat-grid,
.admin-detail-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 22px;
}

.admin-stat-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.admin-detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.admin-panel {
    padding: 22px;
}

.admin-table th {
    color: var(--ink);
    font-size: 0.82rem;
    text-transform: uppercase;
}

.admin-table-link {
    color: var(--pink);
    font-weight: 700;
    text-decoration: none;
}

.admin-search {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.admin-search input {
    flex: 1;
    min-width: 0;
}

.admin-search button {
    width: auto;
    padding-inline: 20px;
}

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

.admin-list-row {
    display: grid;
    gap: 4px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.admin-list-row:last-child {
    border-bottom: 0;
}

.admin-list-row strong {
    color: var(--ink);
}

.admin-list-row span {
    color: var(--muted);
}

.content-shell-admin-dashboard,
.content-shell-admin-users,
.content-shell-admin-user-detail,
.content-shell-admin-profile,
.content-shell-admin-settings {
    color: #e9f2ff;
}

.admin-hero {
    min-height: 168px;
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid rgba(126, 175, 255, 0.22);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(19, 34, 68, 0.96), rgba(10, 18, 38, 0.98)),
        radial-gradient(circle at 86% 18%, rgba(255, 79, 122, 0.18), transparent 32%);
    box-shadow: 0 18px 42px rgba(9, 19, 42, 0.18);
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.admin-hero.compact {
    min-height: 132px;
}

.admin-kicker,
.admin-card-head span {
    display: block;
    color: #8fb7ff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.admin-hero h1 {
    margin: 6px 0 8px;
    color: #ffffff;
    font-size: 2rem;
}

.admin-hero p {
    max-width: 620px;
    margin: 0;
    color: #a8bad8;
}

.admin-action {
    flex: 0 0 auto;
    padding: 11px 16px;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
    background: rgba(255, 79, 122, 0.9);
    box-shadow: 0 12px 26px rgba(255, 79, 122, 0.2);
}

.admin-action.secondary {
    background: rgba(143, 183, 255, 0.14);
    color: #dce8ff;
    box-shadow: none;
}

.admin-hero-actions,
.admin-profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

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

.admin-stat-grid.compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.admin-metric-card,
.admin-glass-card,
.admin-chart-card,
.admin-insight-card {
    border: 1px solid rgba(137, 176, 238, 0.2);
    background: linear-gradient(180deg, rgba(16, 31, 63, 0.95), rgba(11, 21, 45, 0.97));
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(9, 19, 42, 0.16);
}

.admin-metric-card {
    min-height: 150px;
    padding: 16px;
    display: grid;
    gap: 7px;
}

.admin-overview-card {
    height: 158px;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.admin-overview-card:hover,
.admin-glass-card:hover,
.admin-insight-card:hover {
    transform: translateY(-2px);
    border-color: rgba(143, 183, 255, 0.34);
    box-shadow: 0 18px 42px rgba(9, 19, 42, 0.22);
}

.admin-metric-card.mini {
    min-height: 108px;
}

.admin-metric-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
}

.admin-icon.blue { background: rgba(50, 123, 246, 0.18); color: #8bb8ff; }
.admin-icon.green { background: rgba(34, 197, 94, 0.16); color: #79e5a3; }
.admin-icon.purple { background: rgba(139, 92, 246, 0.18); color: #c5b4ff; }
.admin-icon.teal { background: rgba(20, 184, 166, 0.16); color: #7ee5d8; }

.admin-metric-card strong {
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
}

.admin-metric-card span {
    color: #d8e6ff;
    font-weight: 800;
}

.admin-metric-card small,
.admin-insight-card small,
.admin-feed-item small {
    color: #8ea4c9;
}

.admin-trend,
.admin-badge,
.admin-role-chip {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.72rem;
    font-weight: 800;
}

.admin-trend.up,
.admin-badge.verified {
    background: rgba(34, 197, 94, 0.16);
    color: #7ee5a5;
}

.admin-trend.calm {
    background: rgba(139, 92, 246, 0.18);
    color: #cab9ff;
}

.admin-badge.pending {
    background: rgba(245, 158, 11, 0.16);
    color: #ffd28a;
}

.admin-badge.active {
    background: rgba(34, 197, 94, 0.14);
    color: #7ee5a5;
}

.admin-badge.archived {
    background: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
}

.admin-role-chip {
    background: rgba(143, 183, 255, 0.14);
    color: #b7cdf5;
}

.admin-analytics-grid,
.admin-dashboard-grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-analytics-grid {
    grid-template-columns: 1.6fr 0.9fr;
}

.admin-analytics-grid.single {
    grid-template-columns: minmax(260px, 420px);
}

.admin-dashboard-grid {
    grid-template-columns: 1.15fr 0.85fr;
}

.admin-chart-card,
.admin-glass-card {
    padding: 18px;
}

.admin-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.admin-card-head.sticky {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-bottom: 12px;
    background: linear-gradient(180deg, rgba(16, 31, 63, 0.98), rgba(16, 31, 63, 0.86));
    backdrop-filter: blur(12px);
}

.admin-card-head h3 {
    margin: 4px 0 0;
    color: #ffffff;
    font-size: 1rem;
}

.admin-card-copy {
    margin: 7px 0 0;
    color: #9fb2d2;
    font-size: 0.84rem;
    font-weight: 600;
    text-transform: none;
}

.admin-card-head a {
    color: #ff91ad;
    font-weight: 800;
    text-decoration: none;
}

.admin-line-chart {
    height: 220px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
    padding-top: 20px;
}

.admin-line-point {
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto auto;
    gap: 7px;
    align-items: end;
    text-align: center;
}

.admin-line-bar,
.admin-spark-bars span {
    display: block;
    min-height: 10px;
    border-radius: 999px 999px 8px 8px;
    background: linear-gradient(180deg, #ff6d98, #4f8dff);
    box-shadow: 0 0 18px rgba(79, 141, 255, 0.26);
}

.admin-line-point em {
    color: #ffffff;
    font-style: normal;
    font-weight: 800;
}

.admin-line-point small {
    color: #8ea4c9;
}

.admin-donut {
    width: 172px;
    height: 172px;
    margin: 8px auto 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(#22c55e 0 34%, #8b5cf6 34% 58%, #327bf6 58% 78%, #14b8a6 78% 100%);
    position: relative;
}

.admin-donut::after {
    content: "";
    position: absolute;
    inset: 24px;
    border-radius: 50%;
    background: #101f3f;
}

.admin-donut strong,
.admin-donut span {
    position: relative;
    z-index: 1;
}

.admin-donut strong {
    color: #ffffff;
    font-size: 1.8rem;
}

.admin-donut span {
    margin-top: 38px;
    color: #8ea4c9;
    font-size: 0.75rem;
}

.admin-legend {
    display: grid;
    gap: 8px;
}

.admin-legend span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b9c9e6;
    font-size: 0.82rem;
}

.admin-legend i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.admin-legend i.green { background: #22c55e; }
.admin-legend i.purple { background: #8b5cf6; }
.admin-legend i.blue { background: #327bf6; }
.admin-legend i.teal { background: #14b8a6; }

.admin-insight-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.admin-insight-card {
    min-height: 118px;
    padding: 15px;
    display: grid;
    gap: 5px;
}

.admin-insight-card strong {
    color: #ffffff;
    font-size: 1.1rem;
}

.admin-insight-card p {
    margin: 0;
    color: #dce8ff;
    font-weight: 800;
}

.admin-insight-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #8fb7ff;
}

.admin-insight-card.green .admin-insight-dot { background: #22c55e; }
.admin-insight-card.blue .admin-insight-dot { background: #327bf6; }
.admin-insight-card.purple .admin-insight-dot { background: #8b5cf6; }
.admin-insight-card.teal .admin-insight-dot { background: #14b8a6; }

.admin-user-list,
.admin-feed-scroll,
.admin-scroll-list {
    overflow-y: auto;
    scrollbar-color: rgba(143, 183, 255, 0.38) transparent;
}

.admin-user-list,
.admin-feed-scroll {
    max-height: 328px;
}

.admin-user-row,
.admin-feed-item,
.admin-list-row {
    border-color: rgba(143, 183, 255, 0.16);
}

.admin-user-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    color: inherit;
    text-decoration: none;
}

.admin-user-row:hover,
.admin-table tbody tr:hover {
    background: rgba(143, 183, 255, 0.06);
}

.admin-avatar {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(255, 79, 122, 0.95), rgba(50, 123, 246, 0.95));
    color: #ffffff;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-avatar.small {
    width: 32px;
    height: 32px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.admin-user-row strong,
.admin-table-user strong,
.admin-list-row strong,
.admin-feed-item strong {
    color: #ffffff;
}

.admin-user-row small,
.admin-list-row span,
.admin-feed-item p {
    color: #9fb2d2;
}

.admin-list-row em {
    display: block;
    margin-top: 4px;
    color: #8ea4c9;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 700;
}

.admin-feed-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px 0;
}

.admin-feed-icon {
    width: 12px;
    height: 12px;
    margin-top: 5px;
    border-radius: 50%;
    background: #8fb7ff;
    box-shadow: 0 0 0 6px rgba(143, 183, 255, 0.1);
}

.admin-feed-item.appointment .admin-feed-icon { background: #14b8a6; }
.admin-feed-item.mood .admin-feed-icon { background: #8b5cf6; }
.admin-feed-item.lifestyle .admin-feed-icon { background: #22c55e; }

.admin-table-card {
    margin-top: 18px;
}

.admin-directory-wrap {
    max-height: 560px;
    overflow: auto;
    scrollbar-color: rgba(143, 183, 255, 0.38) transparent;
}

.admin-directory-table {
    min-width: 1060px;
}

.admin-directory-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: rgba(16, 31, 63, 0.98);
    backdrop-filter: blur(12px);
}

.admin-top-card {
    margin-top: 0;
    margin-bottom: 18px;
}

.admin-table th,
.admin-table td {
    border-color: rgba(143, 183, 255, 0.14);
}

.admin-table th {
    color: #8fb7ff;
}

.admin-table td {
    color: #b9c9e6;
    padding: 11px 10px;
}

.admin-table-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-table-link {
    color: #ff91ad;
}

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

.admin-log-card {
    height: 310px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.admin-scroll-list {
    min-height: 0;
    padding-right: 4px;
}

.admin-list-row {
    padding: 11px 0;
}

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

.mini-chart {
    min-height: 150px;
}

.admin-spark-bars {
    height: 74px;
    display: grid;
    grid-template-columns: repeat(7, minmax(8px, 1fr));
    align-items: end;
    gap: 7px;
}

.admin-empty-state {
    min-height: 150px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    text-align: center;
    color: #9fb2d2;
}

.admin-empty-state.inline {
    min-height: 64px;
}

.admin-empty-state .nav-icon {
    color: #8fb7ff;
}

.admin-empty-state strong {
    color: #ffffff;
}

.admin-empty-state p {
    margin: 0;
    color: #8ea4c9;
}

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

.admin-small-button,
.admin-inline-form button,
.admin-search button {
    border: 0;
    border-radius: 12px;
    padding: 10px 13px;
    background: rgba(255, 79, 122, 0.92);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.admin-small-button.warning {
    background: rgba(245, 158, 11, 0.9);
}

.admin-small-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.admin-permission-note {
    margin-top: 14px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(245, 158, 11, 0.1);
    color: #ffd28a;
    font-size: 0.86rem;
}

.admin-note-form,
.admin-settings-form,
.admin-toggle-list {
    display: grid;
    gap: 12px;
}

.admin-note-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
    max-height: 250px;
    overflow-y: auto;
}

.admin-note-item {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(143, 183, 255, 0.15);
    border-radius: 14px;
    background: rgba(9, 18, 38, 0.42);
}

.admin-note-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
}

.admin-note-form textarea,
.admin-note-form select,
.admin-note-item textarea,
.admin-settings-form input,
.admin-settings-form select,
.admin-search input,
.admin-search select,
.admin-inline-form select {
    width: 100%;
    border: 1px solid rgba(143, 183, 255, 0.22);
    border-radius: 12px;
    padding: 11px 12px;
    background: rgba(9, 18, 38, 0.65);
    color: #e9f2ff;
}

.admin-settings-form label {
    display: grid;
    gap: 7px;
    color: #b9c9e6;
    font-weight: 700;
}

.admin-note-form label {
    display: grid;
    gap: 7px;
    color: #b9c9e6;
    font-weight: 700;
}

.admin-note-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.admin-note-meta strong {
    color: #ffffff;
}

.admin-note-meta small {
    color: #8ea4c9;
}

.admin-note-list-large {
    max-height: 520px;
}

.admin-note-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-note-examples span,
.admin-note-list-title {
    width: max-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 7px 10px;
    background: rgba(143, 183, 255, 0.12);
    color: #b7cdf5;
    font-size: 0.76rem;
    font-weight: 800;
}

.admin-note-list-title {
    border-radius: 12px;
    color: #8fb7ff;
    text-transform: uppercase;
}

.admin-profile-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

.admin-profile-hero h1 {
    margin: 4px 0 4px;
    color: #ffffff;
    font-size: 1.9rem;
}

.admin-profile-hero p,
.admin-theme-preview p {
    margin: 0;
    color: #9fb2d2;
}

.admin-profile-side {
    display: grid;
    gap: 18px;
}

.admin-security-summary {
    min-height: 180px;
}

.admin-settings-card {
    min-height: 260px;
}

.admin-theme-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(143, 183, 255, 0.14);
    border-radius: 14px;
    background: rgba(9, 18, 38, 0.28);
}

.admin-theme-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #ff6d98;
    box-shadow: 0 0 0 6px rgba(255, 109, 152, 0.12);
}

.admin-audit-wrap {
    max-height: 360px;
    overflow: auto;
}

.admin-theme-form .theme-helper {
    margin: -2px 0 2px;
}

.admin-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 8px;
}

.admin-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.admin-toggle-list label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(143, 183, 255, 0.13);
    color: #dce8ff;
}

.admin-toggle-list em {
    color: #9fb2d2;
    font-style: normal;
    text-align: right;
}

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

.admin-permission-list span {
    padding: 11px 12px;
    border-radius: 14px;
    color: #dce8ff;
}

.admin-permission-list.allowed span {
    background: rgba(34, 197, 94, 0.13);
}

.admin-permission-list.allowed span::before {
    content: "OK ";
    color: #7ee5a5;
    font-weight: 900;
}

.admin-permission-list.restricted span {
    background: rgba(245, 158, 11, 0.12);
}

.admin-permission-list.restricted span::before {
    content: "NO ";
    color: #ffd28a;
    font-weight: 900;
}

.admin-avatar.profile {
    width: 86px;
    height: 86px;
    border-radius: 24px;
    font-size: 1.4rem;
}

.admin-note-modal-card {
    display: grid;
    gap: 14px;
}

.admin-note-modal-list article strong {
    color: #ffffff;
    font-size: 0.92rem;
}

.admin-note-modal-list small {
    color: #8ea4c9;
    font-size: 0.78rem;
}

.admin-note-dismiss {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: 14px;
    background: rgba(255, 79, 122, 0.92);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

html[data-theme="light"] .content-shell-admin-dashboard,
html[data-theme="light"] .content-shell-admin-users,
html[data-theme="light"] .content-shell-admin-user-detail,
html[data-theme="light"] .content-shell-admin-profile,
html[data-theme="light"] .content-shell-admin-settings {
    color: #102246;
}

html[data-theme="light"] .admin-hero,
html[data-theme="light"] .admin-metric-card,
html[data-theme="light"] .admin-glass-card,
html[data-theme="light"] .admin-chart-card,
html[data-theme="light"] .admin-insight-card {
    border-color: rgba(202, 216, 235, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.98));
    box-shadow: 0 16px 32px rgba(43, 70, 112, 0.09);
}

html[data-theme="light"] .admin-hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.98)),
        radial-gradient(circle at 86% 18%, rgba(255, 79, 122, 0.14), transparent 32%);
}

html[data-theme="light"] .admin-hero h1,
html[data-theme="light"] .admin-metric-card strong,
html[data-theme="light"] .admin-card-head h3,
html[data-theme="light"] .admin-insight-card strong,
html[data-theme="light"] .admin-insight-card p,
html[data-theme="light"] .admin-user-row strong,
html[data-theme="light"] .admin-table-user strong,
html[data-theme="light"] .admin-list-row strong,
html[data-theme="light"] .admin-feed-item strong,
html[data-theme="light"] .admin-empty-state strong,
html[data-theme="light"] .admin-note-meta strong,
html[data-theme="light"] .admin-profile-hero h1 {
    color: #102246;
}

html[data-theme="light"] .admin-hero p,
html[data-theme="light"] .admin-metric-card span,
html[data-theme="light"] .admin-card-copy,
html[data-theme="light"] .admin-table td,
html[data-theme="light"] .admin-user-row small,
html[data-theme="light"] .admin-list-row span,
html[data-theme="light"] .admin-list-row em,
html[data-theme="light"] .admin-feed-item p,
html[data-theme="light"] .admin-profile-hero p,
html[data-theme="light"] .admin-theme-preview p,
html[data-theme="light"] .admin-note-form label,
html[data-theme="light"] .admin-settings-form label,
html[data-theme="light"] .admin-toggle-list label {
    color: #506684;
}

html[data-theme="light"] .admin-card-head.sticky,
html[data-theme="light"] .admin-directory-table thead th {
    background: rgba(255, 255, 255, 0.96);
}

html[data-theme="light"] .admin-note-form textarea,
html[data-theme="light"] .admin-note-form select,
html[data-theme="light"] .admin-note-item textarea,
html[data-theme="light"] .admin-settings-form input,
html[data-theme="light"] .admin-settings-form select,
html[data-theme="light"] .admin-search input,
html[data-theme="light"] .admin-search select,
html[data-theme="light"] .admin-inline-form select {
    border-color: #dbe5f2;
    background: #ffffff;
    color: #102246;
}

html[data-theme="light"] .admin-note-item,
html[data-theme="light"] .admin-theme-preview {
    border-color: #dbe5f2;
    background: #f7faff;
}

html[data-theme="light"] .admin-note-examples span,
html[data-theme="light"] .admin-note-list-title {
    background: #eef5ff;
    color: #327bf6;
}

html[data-theme="light"] .admin-action.secondary {
    background: #eef5ff;
    color: #327bf6;
}

@media (max-width: 1180px) {
    .admin-stat-grid,
    .admin-stat-grid.compact,
    .admin-insight-grid,
    .user-trends {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-analytics-grid,
    .admin-dashboard-grid,
    .admin-detail-grid,
    .admin-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .admin-hero {
        align-items: flex-start;
        flex-direction: column;
        min-height: 0;
        padding: 18px;
    }

    .admin-hero h1 {
        font-size: 1.55rem;
    }

    .admin-stat-grid,
    .admin-stat-grid.compact,
    .admin-insight-grid,
    .user-trends {
        grid-template-columns: 1fr;
    }

    .admin-line-chart {
        height: 170px;
        gap: 8px;
    }

    .admin-user-row,
    .admin-feed-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .admin-action-grid,
    .admin-inline-form {
        grid-template-columns: 1fr;
    }

    .admin-user-row .admin-badge,
    .admin-feed-item small {
        grid-column: 2;
    }
}

.auth-page {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: clamp(16px, 4vw, 24px);
    background:
        radial-gradient(circle at top left, rgba(255, 236, 248, 0.95), transparent 34%),
        radial-gradient(circle at bottom right, rgba(233, 241, 255, 0.95), transparent 34%),
        linear-gradient(180deg, #fff9fd 0%, #f7f9ff 100%);
}

.auth-layout {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

.auth-copy,
.auth-card {
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow);
}

.auth-copy {
    background: linear-gradient(180deg, #fff 0%, #fff5f8 100%);
}

.auth-copy h1,
.auth-card h2 {
    margin: 0;
    color: var(--ink);
}

.auth-copy p,
.auth-link {
    color: var(--muted);
}

.auth-link a {
    color: var(--pink);
    font-weight: 700;
}

.auth-center-shell {
    width: 100%;
    display: grid;
    place-items: center;
}

.auth-mock-card {
    width: min(560px, 100%);
    background: var(--surface);
    border: 1px solid #dedeee;
    border-radius: 22px;
    box-shadow: 0 16px 30px rgba(83, 98, 138, 0.12);
    padding: clamp(22px, 5vw, 30px);
    text-align: center;
}

.auth-register-card {
    width: min(600px, 100%);
}

.auth-heart-badge {
    width: 70px;
    height: 70px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: linear-gradient(180deg, #e43dc4 0%, #8f22f6 100%);
    position: relative;
}

.auth-heart-badge::before,
.auth-heart-badge::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 26px;
    border: 3px solid #fff;
    border-bottom: 0;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    top: 18px;
}

.auth-heart-badge::before {
    left: 19px;
    transform: rotate(-45deg);
    transform-origin: bottom right;
}

.auth-heart-badge::after {
    right: 19px;
    transform: rotate(45deg);
    transform-origin: bottom left;
}

.auth-mock-card h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 500;
    color: #091c43;
}

.auth-subtitle {
    margin: 18px 0 28px;
    color: #6c7f9f;
    font-size: 1.05rem;
}

.auth-form-tight {
    text-align: left;
}

.auth-shadow-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    border: 0;
    padding: 0;
    margin: 0;
}

.auth-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f4f5f8;
    border-radius: 12px;
    padding: 0 14px;
}

.auth-input-wrap input {
    border: 0;
    background: transparent;
    padding: 14px 0;
    box-shadow: none;
    min-width: 0;
}

.auth-input-wrap.is-invalid {
    border: 1.5px solid #ff6a88;
    box-shadow: inset 0 0 0 1px rgba(255, 106, 136, 0.18);
}

.auth-input-wrap input:focus {
    outline: none;
}

[data-password-field]::-ms-reveal,
[data-password-field]::-ms-clear {
    display: none;
}

[data-password-field]::-webkit-credentials-auto-fill-button,
[data-password-field]::-webkit-strong-password-auto-fill-button {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
}

.auth-password-toggle {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #6a7895;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    flex: 0 0 34px;
    transition: background 0.18s ease, color 0.18s ease;
}

.auth-password-toggle:hover {
    background: rgba(129, 34, 243, 0.08);
    color: #7b21f4;
}

.auth-password-toggle:focus-visible {
    outline: 2px solid rgba(129, 34, 243, 0.28);
    outline-offset: 2px;
}

.auth-password-eye {
    position: relative;
    width: 18px;
    height: 12px;
    border: 2px solid currentColor;
    border-radius: 999px / 75%;
}

.auth-password-eye::before {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.auth-password-toggle[aria-pressed="true"] .auth-password-eye::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 18px;
    background: currentColor;
    border-radius: 999px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.auth-reset-flow {
    gap: 18px;
}

.auth-reset-steps {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.auth-reset-step-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 96px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(129, 34, 243, 0.18);
    background: #f6f2ff;
    color: #7a5aa9;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.auth-reset-step-chip.is-active {
    background: linear-gradient(90deg, rgba(240, 50, 145, 0.12) 0%, rgba(143, 34, 246, 0.14) 100%);
    color: #7b21f4;
    transform: translateY(-1px);
}

.auth-inline-status {
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 0.94rem;
    line-height: 1.45;
    text-align: left;
}

.auth-inline-status.is-error {
    border: 1px solid rgba(227, 64, 105, 0.24);
    background: rgba(255, 237, 243, 0.92);
    color: #c7315b;
}

.auth-inline-status.is-success {
    border: 1px solid rgba(21, 169, 157, 0.22);
    background: rgba(234, 255, 251, 0.96);
    color: #0f8f83;
}

.auth-inline-status.is-info {
    border: 1px solid rgba(59, 93, 160, 0.2);
    background: rgba(238, 245, 255, 0.96);
    color: #315798;
}

.auth-reset-step-panel {
    display: none;
    gap: 14px;
}

.auth-reset-step-panel.is-active {
    display: grid;
    animation: authStepReveal 0.28s ease both;
}

.auth-step-context {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f4f7ff;
    color: #52698f;
    font-size: 0.94rem;
}

.auth-step-context strong {
    color: #14284f;
}

.auth-step-actions {
    display: grid;
    gap: 10px;
}

.auth-secondary-button,
.auth-text-button {
    width: 100%;
    border-radius: 12px;
    padding: 13px 16px;
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
}

.auth-secondary-button {
    border: 1px solid rgba(129, 34, 243, 0.18);
    background: #f7f2ff;
    color: #7b21f4;
}

.auth-text-button {
    border: 0;
    background: transparent;
    color: #6b54a8;
}

@keyframes authStepReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-input-icon {
    width: 20px;
    height: 20px;
    position: relative;
    flex: 0 0 20px;
    color: #6a7895;
}

.auth-input-icon.lock::before {
    content: "";
    position: absolute;
    left: 3px;
    right: 3px;
    bottom: 1px;
    height: 10px;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.auth-input-icon.lock::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 0;
    width: 8px;
    height: 8px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.auth-input-icon.user::before {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    border: 2px solid currentColor;
    border-radius: 50%;
    left: 6px;
    top: 1px;
}

.auth-input-icon.user::after {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    bottom: 1px;
    height: 8px;
    border: 2px solid currentColor;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom: 0;
}

.auth-gradient-button {
    width: 100%;
    border: 0;
    border-radius: 12px;
    padding: 14px 18px;
    background: linear-gradient(90deg, #f03291 0%, #8f22f6 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    margin-top: 6px;
}

.field-error {
    color: #e34069;
    font-size: 0.88rem;
    margin-top: 6px;
}

.hidden-error {
    display: none;
}

.auth-gradient-button[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.auth-footer-link {
    margin: 22px 0 0;
    color: #445b82;
    font-size: 1.02rem;
}

.auth-footer-link a {
    color: #8122f3;
    font-weight: 700;
}

.auth-utility-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -6px;
}

.auth-utility-row a {
    color: #8122f3;
    font-size: 0.95rem;
    font-weight: 600;
}

.auth-intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    min-height: 100dvh;
    overflow-y: auto;
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    background: rgba(18, 28, 55, 0.34);
    backdrop-filter: blur(8px);
}

.auth-intro-card {
    position: relative;
    width: min(520px, 100%);
    border: 1px solid rgba(222, 222, 238, 0.96);
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 247, 251, 0.98) 100%);
    box-shadow: 0 24px 50px rgba(83, 98, 138, 0.22);
    padding: 30px;
    max-height: calc(100dvh - 28px);
    overflow-y: auto;
}

.auth-intro-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(129, 34, 243, 0.12);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.82);
    color: #53627f;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.auth-intro-close:hover {
    color: #e34069;
    background: #fff4f8;
}

.auth-intro-view {
    display: grid;
    gap: 16px;
    text-align: left;
}

.auth-intro-badge {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #f03291 0%, #8f22f6 100%);
    box-shadow: 0 16px 28px rgba(143, 34, 246, 0.22);
}

.auth-intro-badge .nav-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
}

.auth-intro-card h2 {
    margin: 0;
    color: #091c43;
    font-size: clamp(1.55rem, 4vw, 2rem);
    line-height: 1.14;
}

.auth-intro-card p {
    margin: 0;
    color: #52698f;
    font-size: 1rem;
    line-height: 1.65;
}

.auth-intro-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.auth-intro-actions.split {
    justify-content: space-between;
}

.auth-intro-next,
.auth-intro-finish,
.auth-intro-back {
    min-height: 44px;
    border-radius: 14px;
    padding: 0 18px;
    font-weight: 800;
    cursor: pointer;
}

.auth-intro-next,
.auth-intro-finish {
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(90deg, #f03291 0%, #8f22f6 100%);
    color: #fff;
    box-shadow: 0 14px 24px rgba(143, 34, 246, 0.2);
}

.auth-intro-back {
    border: 1px solid rgba(129, 34, 243, 0.18);
    background: #f7f2ff;
    color: #7b21f4;
}

.auth-intro-back[hidden],
.auth-intro-next[hidden],
.auth-intro-finish[hidden],
.auth-intro-overlay[hidden],
.auth-intro-tutorial[hidden] {
    display: none;
}

.auth-intro-progress {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    margin-right: 42px;
}

.auth-intro-progress span {
    height: 6px;
    border-radius: 999px;
    background: #e8eaf3;
}

.auth-intro-progress span.is-active {
    background: linear-gradient(90deg, #f03291 0%, #8f22f6 100%);
}

body.auth-intro-open {
    overflow: hidden;
}

body.theme-dark .auth-intro-card {
    border-color: rgba(80, 91, 120, 0.88);
    background: linear-gradient(180deg, rgba(18, 28, 48, 0.98) 0%, rgba(26, 22, 44, 0.98) 100%);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.36);
}

body.theme-dark .auth-intro-close {
    background: rgba(24, 35, 58, 0.9);
    border-color: rgba(128, 146, 184, 0.18);
    color: #d9e1f4;
}

body.theme-dark .auth-intro-card h2 {
    color: #f7f9ff;
}

body.theme-dark .auth-intro-card p {
    color: #c0cbe0;
}

body.theme-dark .auth-intro-back {
    border-color: rgba(184, 158, 255, 0.24);
    background: rgba(143, 34, 246, 0.14);
    color: #d7c7ff;
}

body.theme-dark .auth-intro-progress span {
    background: rgba(128, 146, 184, 0.24);
}

.auth-input-icon.shield::before {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    top: 1px;
    bottom: 2px;
    border: 2px solid currentColor;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    clip-path: polygon(50% 100%, 0 70%, 0 0, 100% 0, 100% 70%);
}

body.theme-dark .auth-reset-step-chip {
    border-color: rgba(167, 194, 255, 0.14);
    background: rgba(19, 33, 56, 0.88);
    color: #9ab8f5;
}

body.theme-dark .auth-reset-step-chip.is-active {
    background: linear-gradient(90deg, rgba(240, 50, 145, 0.18) 0%, rgba(143, 34, 246, 0.24) 100%);
    color: #f3deff;
}

body.theme-dark .auth-inline-status.is-error {
    border-color: rgba(255, 117, 152, 0.26);
    background: rgba(75, 24, 42, 0.5);
    color: #ff8cab;
}

body.theme-dark .auth-inline-status.is-success {
    border-color: rgba(74, 215, 179, 0.22);
    background: rgba(11, 67, 63, 0.44);
    color: #7ce4d4;
}

body.theme-dark .auth-inline-status.is-info {
    border-color: rgba(113, 161, 255, 0.2);
    background: rgba(21, 44, 77, 0.55);
    color: #a8c8ff;
}

body.theme-dark .auth-step-context {
    background: rgba(16, 28, 48, 0.84);
    color: #8fa9d5;
}

body.theme-dark .auth-step-context strong {
    color: #f5f8ff;
}

body.theme-dark .auth-password-toggle {
    color: #9aaac8;
}

body.theme-dark .auth-password-toggle:hover {
    background: rgba(113, 161, 255, 0.08);
    color: #c8a6ff;
}

body.theme-dark .auth-secondary-button {
    border-color: rgba(157, 176, 207, 0.16);
    background: rgba(21, 34, 57, 0.92);
    color: #c8a6ff;
}

body.theme-dark .auth-text-button {
    color: #b39df0;
}

body.theme-dark .settings-password-card p {
    color: var(--text-soft-strong);
}

body.theme-dark .settings-password-method {
    border-color: rgba(167, 194, 255, 0.14);
    background: linear-gradient(180deg, rgba(21, 35, 58, 0.98), rgba(17, 29, 48, 0.96));
    color: #dfe9ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.theme-dark .settings-password-method:hover {
    border-color: rgba(198, 166, 255, 0.24);
    box-shadow: 0 16px 28px rgba(2, 8, 20, 0.3);
}

body.theme-dark .settings-password-method strong {
    color: #f5f8ff;
}

body.theme-dark .settings-password-method span:last-child {
    color: #95abd4;
}

.bottom-nav {
    display: none;
}

.bottom-nav a.active {
    color: var(--pink);
    background: var(--surface-subtle);
    border: 1px solid var(--mobile-control-border);
    box-shadow: 0 8px 18px rgba(28, 46, 84, 0.08);
}

.empty-state {
    padding: 16px;
    border-radius: 14px;
    border: 1px dashed var(--line-strong);
    color: var(--muted);
    background: var(--surface-subtle);
}

@media (max-width: 860px) {
    .profile-meta-list-personal {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .overview-top-grid,
    .overview-bottom-grid,
    .lifestyle-grid,
    .alerts-layout,
    .mental-layout,
    .calendar-layout,
    .appointments-layout,
    .progress-panel,
    .page-head,
    .food-row,
    .schedule-card {
        flex-direction: column;
    }

    .profile-meta-list-personal {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .appointments-layout {
        grid-template-columns: 1fr;
    }

    .content-shell-appointments {
        width: 100%;
    }

    .app-shell,
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .profile-card-grid {
        grid-template-columns: 1fr;
    }

    .overview-wellness-grid {
        grid-template-columns: 1fr;
    }

    .overview-top-grid > *,
    .overview-bottom-grid > * {
        flex: 0 1 auto;
        width: 100%;
    }

    .cycle-phases-hero,
    .cycle-phases-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .mobile-topbar {
        position: sticky;
        top: 0;
        z-index: 35;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 16px;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .mobile-brand h1 {
        margin: 0;
        font-size: 1rem;
        font-weight: 800;
        white-space: nowrap;
        letter-spacing: -0.01em;
    }

    .mobile-topbar .brand-mark,
    .mobile-menu-header .brand-mark {
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }

    .mobile-menu-toggle,
    .mobile-menu-close {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        border: 1px solid transparent;
        background: transparent;
        color: var(--mobile-control-ink);
        display: grid;
        place-items: center;
        cursor: pointer;
        flex: 0 0 38px;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 16px;
        height: 1.7px;
        border-radius: 999px;
        background: currentColor;
    }

    .mobile-menu-toggle span + span {
        margin-top: 3px;
    }

    .mobile-menu-overlay {
        position: fixed;
        inset: 0;
        z-index: 50;
        display: block;
        background: rgba(18, 28, 55, 0.26);
        backdrop-filter: blur(4px);
        padding: 0;
    }

    .mobile-menu-shell {
        width: 100%;
    }

    .mobile-menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
    }

    .mobile-menu-close {
        border: 0;
        font-size: 1.7rem;
        line-height: 1;
    }

    .mobile-menu-panel {
        margin-left: auto;
        width: min(280px, calc(100vw - 28px));
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        background: var(--surface);
        border-radius: 0 0 14px 14px;
        box-shadow: 0 18px 32px rgba(22, 33, 61, 0.16);
        padding: 10px 18px 14px;
    }

    .mobile-menu-panel a,
    .mobile-menu-panel .mobile-logout-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 11px 2px;
        color: var(--text-soft);
        font-weight: 500;
    }

    .mobile-menu-panel a.active {
        background: var(--pink-soft);
        color: var(--pink);
        border: 1px solid var(--pink-border);
        padding-left: 10px;
        padding-right: 10px;
        border-radius: 14px;
    }

    .mobile-logout-link {
        color: #ef1e3d !important;
        font-weight: 700 !important;
    }

    .bottom-nav {
        display: flex;
        align-items: stretch;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        gap: 4px;
        padding: 0 max(10px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-right));
        background: var(--surface);
        border-top: 1px solid var(--line);
        z-index: 20;
        box-shadow: 0 -6px 18px rgba(28, 46, 84, 0.06);
    }

    .bottom-nav::-webkit-scrollbar {
        display: none;
    }

    .bottom-nav a {
        flex: 0 0 72px;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        margin-top: 6px;
        padding: 8px 2px 7px;
        font-size: 0.61rem;
        min-height: 62px;
        border-radius: 16px;
        color: var(--text-soft-strong);
        white-space: nowrap;
    }

    .bottom-nav .nav-icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }

    .bottom-nav a.active .nav-icon,
    .bottom-nav a.active span:last-child {
        color: var(--pink);
    }

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

    .content-shell {
        width: 100%;
    }

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

    .cycle-phases-hero h2 {
        max-width: none;
        font-size: 1.34rem;
    }

    .page-head.with-action,
    .progress-panel,
    .schedule-card,
    .food-row,
    .mini-health-card,
    .appt-top,
    .appt-actions,
    .modal-actions {
        align-items: stretch;
    }

    .calendar-board,
    .calendar-main,
    .calendar-side,
    .alerts-column,
    .alerts-column.wide,
    .appointments-col,
    .water-panel,
    .mini-panels {
        width: 100%;
    }

    .calendar-board {
        overflow-x: visible;
    }

    .calendar-under {
        grid-template-columns: 1fr;
    }

    .page-head.with-action .dark-button,
    .appt-actions .outline-wide,
    .appt-actions .dark-button,
    .modal-actions .schedule-button,
    .modal-actions .outline-wide {
        width: 100%;
    }

    .schedule-right {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .doctor-tag,
    .mini-tag,
    .day-pill {
        width: fit-content;
    }

    .smart-prompt-card,
    .alerts-summary-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .appointments-section-head,
    .appt-inline-meta {
        align-items: flex-start;
    }

    .smart-prompt-actions {
        justify-content: flex-start;
    }

    .calendar-side {
        flex-basis: auto;
    }
}

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

    .sidebar {
        display: none;
    }

    .bottom-nav {
        display: flex;
    }

    .main-content {
        padding: 24px 24px calc(98px + env(safe-area-inset-bottom));
    }

    .content-shell-dashboard {
        max-width: none;
    }

    .overview-top-grid,
    .overview-bottom-grid {
        flex-direction: row;
        align-items: stretch;
        gap: 16px;
    }

    .overview-top-grid > .feature-card {
        flex: 1 1 min(280px, calc(50% - 8px));
        width: auto;
        min-width: min(100%, 260px);
        min-height: 150px;
    }

    .overview-bottom-grid > .panel-card {
        flex: 1 1 min(360px, calc(50% - 8px));
        width: auto;
        min-width: min(100%, 320px);
    }
}

@media (max-width: 720px) {
    .two-up-form,
    .symptom-grid,
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .page-head {
        gap: 10px;
        margin-bottom: 14px;
    }

    .page-head h1 {
        font-size: 1.28rem;
    }

    .page-head p {
        margin-top: 4px;
        font-size: 0.88rem;
    }

    .title-icon {
        width: 30px;
        height: 30px;
        margin-right: 8px;
        vertical-align: -5px;
        border-radius: 10px;
    }

    .section-icon {
        width: 18px;
        height: 18px;
        border-radius: 6px;
    }

    .panel-head,
    .subsection-title,
    .feature-card-top {
        gap: 10px;
    }

    .feature-card h3,
    .panel-card h3,
    .schedule-card h3,
    .panel-head h3,
    .subsection-title h2,
    .side-focus h3,
    .legend-card h3,
    .modal-card h2 {
        font-size: 0.98rem;
    }

    .dark-button,
    .outline-button,
    .outline-wide,
    .inline-action,
    .section-toggle,
    .ghost-button {
        padding: 10px 14px;
        border-radius: 14px;
        font-size: 0.92rem;
    }

    input,
    textarea,
    select {
        padding: 11px 13px;
        border-radius: 14px;
        font-size: 0.95rem;
    }

    textarea {
        min-height: 96px;
    }

    .dark-button,
    .section-toggle,
    .full-width-mobile {
        width: 100%;
    }

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

    .settings-password-actions {
        display: grid;
    }

    .settings-password-actions .auth-gradient-button,
    .settings-password-actions .auth-secondary-button,
    .settings-password-actions .auth-text-button {
        width: 100%;
        min-width: 0;
    }

    .main-content {
        padding: 12px 10px 88px;
    }

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

    .content-shell-dashboard,
    .content-shell-mental-health {
        max-width: 560px;
    }

    .panel-card,
    .feature-card,
    .schedule-card,
    .appt-card,
    .history-card,
    .auth-copy,
    .auth-card,
    .auth-mock-card,
    .modal-card {
        border-radius: 16px;
    }

    .feature-card,
    .panel-card,
    .schedule-card,
    .appt-card,
    .history-card,
    .modal-card {
        padding: 14px;
    }

    .appointments-section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .appt-description-row,
    .appt-detail-row {
        align-items: flex-start;
    }

    .overview-top-grid,
    .overview-bottom-grid,
    .overview-wellness-grid,
    .lifestyle-grid,
    .lifestyle-input-grid,
    .lifestyle-summary-grid,
    .alerts-layout,
    .mental-layout,
    .calendar-layout,
    .appointments-layout {
        gap: 14px;
    }

    .wellness-status-row {
        flex-direction: column;
    }

    .wellness-prediction-card {
        padding: 16px 14px 14px 20px;
        border-radius: 20px;
    }

    .wellness-prediction-card::after {
        left: 10px;
        top: 12px;
        bottom: 12px;
        width: 5px;
    }

    .wellness-card-header {
        align-items: flex-start;
        gap: 12px;
    }

    .wellness-card-title-wrap {
        align-items: flex-start;
    }

    .wellness-status-badge {
        white-space: normal;
        align-self: flex-start;
    }

    .wellness-status-result-row {
        align-items: flex-start;
    }

    .wellness-status-visual {
        width: 100%;
        min-width: 0;
        align-self: stretch;
        padding: 12px 10px 11px;
        border-radius: 16px;
    }

    .wellness-visual-meta {
        margin-bottom: 8px;
    }

    .wellness-visual-label {
        font-size: 0.62rem;
        letter-spacing: 0.12em;
        line-height: 1.25;
    }

    .wellness-mini-trend {
        height: auto;
        gap: 5px;
        margin-top: 0;
        align-items: flex-end;
    }

    .wellness-mini-bar-track {
        height: 44px;
        min-height: 44px;
    }

    .wellness-mini-label {
        font-size: 0.6rem;
        letter-spacing: 0;
    }

    .wellness-recommendation-box {
        flex-direction: column;
    }

    .wellness-status-result {
        font-size: 1.75rem;
    }

    .wellness-checkin-trend {
        gap: 6px;
    }

    .wellness-checkin-dot {
        width: 12px;
        height: 12px;
    }

    .wellness-status-explanation {
        margin-top: 8px;
    }

    .wellness-section-label {
        margin-top: 12px;
        font-size: 0.64rem;
    }

    .glass-row {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .inline-metric-form,
    .exercise-form {
        width: 100%;
        justify-content: flex-start;
    }

    .metric-input,
    .exercise-input {
        width: 88px;
        min-width: 88px;
        font-size: 1.15rem;
    }

    .overview-wellness-grid,
    .lifestyle-input-grid,
    .lifestyle-summary-grid {
        grid-template-columns: 1fr;
    }

    .lifestyle-form-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .lifestyle-summary-section {
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .lifestyle-summary-section .panel-head {
        display: none;
    }

    .lifestyle-input-grid {
        margin-top: 0;
        gap: 10px;
    }

    .lifestyle-input-card {
        min-height: 0;
        padding: 14px;
        border-radius: 18px;
        box-shadow: 0 10px 18px rgba(28, 33, 54, 0.05);
    }

    .lifestyle-card-head {
        align-items: center;
        gap: 8px;
    }

    .lifestyle-card-head h4 {
        font-size: 0.95rem;
    }

    .mini-tag {
        padding: 5px 9px;
        font-size: 0.72rem;
    }

    .glass-row {
        gap: 8px;
        margin-top: 10px;
    }

    .glass {
        width: 28px;
        height: 42px;
        border-radius: 9px 9px 11px 11px;
    }

    .tap-note {
        margin-top: 8px;
        font-size: 0.78rem;
    }

    .lifestyle-inline-form {
        display: grid;
        grid-template-columns: minmax(0, 84px) auto auto;
        align-items: center;
        justify-content: flex-start;
        gap: 6px;
        margin-top: 10px;
    }

    .metric-input {
        width: 68px;
        min-width: 68px;
        padding: 8px 6px;
        font-size: 1.08rem;
        border-radius: 14px;
    }

    .metric-suffix {
        font-size: 0.9rem;
    }

    .metric-save {
        padding: 8px 12px;
        border-radius: 12px;
    }

    .lifestyle-stack-form {
        margin-top: 10px;
        gap: 8px;
    }

    .exercise-input-wide {
        width: 100%;
        min-width: 0;
    }

    .exercise-input,
    .food-select {
        min-height: 42px;
        padding-top: 10px;
        padding-bottom: 10px;
        font-size: 0.95rem;
    }

    .lifestyle-actions {
        margin-top: 10px;
        gap: 8px;
    }

    .page-head-actions {
        width: 100%;
        gap: 8px;
    }

    .history-button {
        justify-content: flex-start;
        padding: 10px 12px;
        border-radius: 14px;
        min-width: 0;
    }

    .lifestyle-summary-top {
        grid-template-columns: auto 1fr;
    }

    .summary-badge {
        grid-column: 1 / -1;
        justify-self: flex-start;
    }

    .summary-description {
        margin-left: 0;
    }

    .history-button {
        width: 100%;
    }

    .mental-card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .stress-value {
        min-width: 58px;
    }

    .mood-chart-card {
        padding: 14px 12px 10px;
    }

    .mood-chart {
        height: 260px;
    }

    .progress-circle {
        width: 72px;
        height: 72px;
        flex-basis: 72px;
        font-size: 0.94rem;
    }

    .calendar-board {
        overflow-x: visible;
        padding: 12px;
    }

    .calendar-under {
        gap: 12px;
    }

    .calendar-side {
        gap: 12px;
    }

    .stats-grid,
    .profile-meta-list {
        grid-template-columns: 1fr;
    }

    .profile-hero {
        align-items: flex-start;
    }

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

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

    .calendar-head {
        margin-bottom: 8px;
    }

    .calendar-head h3 {
        font-size: 0.8rem;
    }

    .calendar-nav button,
    .calendar-nav-link {
        width: 32px;
        height: 34px;
        font-size: 0.95rem;
    }

    .calendar-weekdays,
    .calendar-grid {
        min-width: 0;
        gap: 5px;
    }

    .calendar-cell {
        min-height: 0;
        aspect-ratio: 0.82 / 1;
        border-radius: 12px;
        padding: 7px 6px 5px;
    }

    .calendar-number {
        margin-bottom: 8px;
        font-size: 0.78rem;
    }

    .calendar-weekdays {
        padding: 0 2px;
        font-size: 0.76rem;
    }

    .cycle-insights-header {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .side-focus,
    .legend-card {
        padding: 14px;
    }

    .cycle-insights-header .ovulation-ring {
        margin: 0;
    }

    .cycle-insights-card {
        gap: 12px;
        padding: 14px;
    }

    .prediction-box {
        padding: 12px;
        border-radius: 14px;
    }

    .prediction-box strong {
        max-width: none;
    }

    .insight-chip,
    .pcos-note,
    .cycle-details-disclosure {
        padding: 10px;
    }

    .cycle-metric-chip {
        min-height: 60px;
        grid-template-columns: 22px minmax(0, 1fr);
    }

    .legend-card-head,
    .cycle-phase-card-head {
        align-items: flex-start;
    }

    .cycle-phases-hero {
        padding: 22px 20px;
    }

    .cycle-phase-card {
        padding: 18px 18px 16px;
    }

    .appointment-item,
    .pattern-card,
    .alert-card {
        padding: 13px;
        border-radius: 16px;
    }

    .appointment-item,
    .pattern-card,
    .alert-card,
    .smart-prompt-card {
        gap: 12px;
    }

    .pattern-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 12px;
    }

    .pattern-icon.indigo::before,
    .pattern-icon.purple::before,
    .pattern-icon.orange::before,
    .pattern-icon.green::before {
        font-size: 1.15rem;
    }

    .alert-icon-col {
        width: 34px;
    }

    .alert-badge {
        margin-top: 2px;
    }

    .recommend-chip {
        margin-top: 10px;
        padding: 10px 12px;
        border-radius: 12px;
    }

    .auth-page {
        padding: 16px;
    }

    .auth-mock-card {
        padding: 24px 18px 22px;
    }

    .mood-choice-row {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

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

    .smart-prompt-card {
        padding: 12px 13px;
    }

    .mood-check-card,
    .mood-trends-card,
    .mood-tip-panel {
        padding: 16px;
        border-radius: 18px;
    }

    .mood-tip-panel {
        flex-direction: column;
        gap: 12px;
        margin-top: 18px;
    }

    .auth-mock-card h1 {
        font-size: 1.7rem;
    }

    .auth-subtitle,
    .auth-footer-link {
        font-size: 0.95rem;
    }

    .mobile-topbar {
        padding: 10px 12px;
    }

    .mobile-brand h1 {
        font-size: 0.94rem;
    }

    .mood-check-card h3,
    .mood-trends-card h3,
    .mood-tip-panel h3 {
        margin-bottom: 14px;
        font-size: 1rem;
    }

    .mood-tip-panel p {
        margin-bottom: 10px;
        font-size: 0.92rem;
    }

    .appt-card-stack {
        gap: 12px;
    }

    .appt-top {
        gap: 10px;
    }

    .appt-description-row,
    .appt-detail-row {
        gap: 8px;
    }

    .appt-actions,
    .settings-actions {
        gap: 8px;
    }

    .doctor-tag {
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    .profile-hero {
        padding: 18px 20px;
        gap: 14px;
    }

    .profile-avatar {
        width: 72px;
        height: 72px;
    }

    .profile-hero-copy h2 {
        font-size: 1.25rem;
    }

    .profile-detail-card,
    .settings-mini-block,
    .danger-zone {
        padding: 12px 14px;
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    .auth-page {
        align-items: start;
        padding: 14px;
    }

    .auth-center-shell {
        min-height: calc(100svh - 28px);
        align-items: center;
    }

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

    .auth-heart-badge {
        width: 58px;
        height: 58px;
        margin-bottom: 16px;
    }

    .auth-heart-badge::before,
    .auth-heart-badge::after {
        top: 14px;
    }

    .auth-heart-badge::before {
        left: 14px;
    }

    .auth-heart-badge::after {
        right: 14px;
    }

    .auth-intro-overlay {
        align-items: start;
        padding: 12px;
    }

    .auth-intro-card {
        width: 100%;
        border-radius: 18px;
        padding: 22px 18px 18px;
        max-height: calc(100dvh - 24px);
    }

    .auth-intro-card h2 {
        font-size: 1.38rem;
        line-height: 1.18;
    }

    .auth-intro-card p {
        font-size: 0.94rem;
        line-height: 1.55;
    }

    .auth-intro-badge {
        width: 46px;
        height: 46px;
        border-radius: 15px;
    }

    .auth-intro-actions,
    .auth-intro-actions.split {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .auth-intro-actions.split {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-intro-finish {
        grid-column: 2;
    }

    .auth-intro-next,
    .auth-intro-finish,
    .auth-intro-back {
        width: 100%;
        min-height: 42px;
        padding: 0 12px;
    }

    .auth-intro-progress {
        margin-right: 38px;
    }

    .page-head {
        gap: 10px;
        margin-bottom: 14px;
    }

    .page-head h1 {
        font-size: 1.14rem;
    }

    .page-head p {
        margin-top: 4px;
        font-size: 0.82rem;
    }

    .title-icon {
        width: 26px;
        height: 26px;
        margin-right: 7px;
        vertical-align: -4px;
        border-radius: 9px;
    }

    .section-icon {
        width: 16px;
        height: 16px;
    }

    .main-content {
        padding: 8px 6px calc(82px + env(safe-area-inset-bottom));
    }

    .content-shell {
        width: 100%;
        max-width: 100%;
    }

    .feature-card,
    .panel-card,
    .schedule-card,
    .appt-card,
    .history-card,
    .modal-card {
        padding: 10px;
    }

    .feature-card,
    .panel-card,
    .schedule-card,
    .appt-card,
    .history-card,
    .modal-card,
    .appointment-item,
    .pattern-card,
    .alert-card,
    .smart-prompt-card,
    .prediction-box,
    .cycle-insights-card,
    .side-focus,
    .legend-card,
    .mood-check-card,
    .mood-trends-card,
    .mood-tip-panel,
    .settings-mini-block,
    .danger-zone,
    .profile-detail-card {
        border-radius: 14px;
    }

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

    .legend-card {
        padding: 16px;
    }

    .cycle-phases-hero,
    .cycle-phases-footer {
        padding: 16px;
    }

    .cycle-phase-card {
        gap: 14px;
        padding: 16px 16px 14px;
    }

    .cycle-phase-card h3 {
        font-size: 1rem;
    }

    .cycle-phase-summary,
    .cycle-phase-list li,
    .cycle-phases-disclaimer {
        font-size: 0.84rem;
    }

    .cycle-phase-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        border-radius: 12px;
    }

    .cycle-phase-icon-period::before {
        width: 14px;
        height: 18px;
        top: 11px;
        left: 14px;
    }

    .cycle-phase-icon-follicular::before {
        height: 16px;
        left: 19px;
        top: 14px;
    }

    .cycle-phase-icon-follicular::after {
        width: 16px;
        height: 16px;
        left: 13px;
        top: 11px;
    }

    .cycle-phase-icon-ovulation::before {
        inset: 9px;
    }

    .cycle-phase-icon-ovulation::after {
        inset: 16px;
    }

    .cycle-phase-icon-luteal::before {
        width: 19px;
        height: 19px;
        top: 12px;
        left: 12px;
    }

    .cycle-phase-icon-luteal::after {
        width: 15px;
        height: 15px;
        top: 11px;
        left: 21px;
    }

    .dark-button,
    .outline-button,
    .outline-wide,
    .inline-action,
    .section-toggle,
    .ghost-button {
        padding: 9px 12px;
        border-radius: 12px;
        font-size: 0.88rem;
    }

    input,
    textarea,
    select {
        padding: 10px 12px;
        border-radius: 13px;
        font-size: 0.92rem;
    }

    .lifestyle-input-card {
        padding: 12px;
    }

    .lifestyle-card-head {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .lifestyle-card-head h4 {
        font-size: 0.92rem;
    }

    .mini-tag {
        font-size: 0.69rem;
    }

    .lifestyle-inline-form {
        grid-template-columns: 62px auto auto;
    }

    .metric-input {
        width: 62px;
        min-width: 62px;
        font-size: 1rem;
        padding: 7px 6px;
    }

    .metric-suffix,
    .metric-save {
        font-size: 0.88rem;
    }

    .glass-row {
        gap: 6px;
    }

    .glass {
        width: 26px;
        height: 40px;
    }

    .lifestyle-form-row {
        gap: 6px;
    }

    .exercise-input,
    .food-select {
        min-height: 40px;
        font-size: 0.9rem;
    }

    .wellness-prediction-card {
        padding: 14px 12px 12px 18px;
        border-radius: 16px;
    }

    .wellness-status-visual {
        padding: 10px 8px 9px;
        border-radius: 14px;
    }

    .wellness-visual-label {
        font-size: 0.58rem;
        letter-spacing: 0.1em;
    }

    .wellness-prediction-card::after {
        left: 8px;
        top: 10px;
        bottom: 10px;
        width: 4px;
    }

    .wellness-status-result {
        font-size: 1.55rem;
    }

    .wellness-checkin-trend {
        gap: 4px;
    }

    .wellness-checkin-label {
        font-size: 0.56rem;
    }

    .wellness-mini-trend {
        height: auto;
        gap: 4px;
    }

    .wellness-mini-bar-track {
        height: 36px;
        min-height: 36px;
    }

    .wellness-mini-label {
        font-size: 0.55rem;
    }

    .mood-chart {
        height: 230px;
    }

    .progress-circle {
        width: 66px;
        height: 66px;
        flex-basis: 66px;
        font-size: 0.88rem;
    }

    .appointment-item,
    .pattern-card,
    .alert-card,
    .smart-prompt-card {
        gap: 10px;
        padding: 10px;
    }

    .pattern-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .pattern-icon.indigo::before,
    .pattern-icon.purple::before,
    .pattern-icon.orange::before,
    .pattern-icon.green::before {
        font-size: 1rem;
    }

    .alert-icon-col {
        width: 30px;
    }

    .recommend-chip {
        padding: 9px 10px;
    }

    .mood-check-card,
    .mood-trends-card,
    .mood-tip-panel {
        padding: 12px;
    }

    .mood-check-card h3,
    .mood-trends-card h3,
    .mood-tip-panel h3 {
        font-size: 0.96rem;
    }

    .smart-prompt-actions {
        width: 100%;
        display: grid;
        gap: 10px;
    }

    .smart-prompt-actions form,
    .smart-prompt-actions a {
        width: 100%;
        flex: 1 1 100%;
    }

    .smart-prompt-actions .inline-action {
        width: 100%;
        justify-content: center;
    }

    .mood-choice-row {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
    }

    .mood-choice {
        min-height: 74px;
        padding: 9px 4px 7px;
    }

    .mood-face {
        width: 24px;
        height: 24px;
    }

    .mood-face-eyes::before,
    .mood-face-eyes::after {
        top: 7px;
        width: 3px;
        height: 3px;
    }

    .mood-face-eyes::before {
        left: 6px;
    }

    .mood-face-eyes::after {
        right: 6px;
    }

    .mood-face-awful .mood-face-mouth,
    .mood-face-good .mood-face-mouth,
    .mood-face-great .mood-face-mouth {
        width: 10px;
    }

    .mood-face-bad .mood-face-mouth,
    .mood-face-okay .mood-face-mouth {
        width: 8px;
    }

    .mood-label {
        font-size: 0.68rem;
    }

    .stress-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .stress-subcopy {
        display: none;
    }

    .stress-scale,
    .chart-legend {
        font-size: 0.86rem;
    }

    .day-pill,
    .mini-tag,
    .doctor-tag {
        font-size: 0.78rem;
        padding: 8px 10px;
    }

    .calendar-board {
        padding: 10px;
    }

    .calendar-under {
        gap: 10px;
    }

    .calendar-side {
        gap: 10px;
    }

    .profile-hero {
        flex-direction: column;
        padding: 14px;
        gap: 12px;
    }

    .profile-hero-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-avatar {
        width: 64px;
        height: 64px;
    }

    .profile-hero-copy h2 {
        font-size: 1.12rem;
    }

    .mini-list-row,
    .settings-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .calendar-head h3 {
        font-size: 0.8rem;
    }

    .calendar-nav button,
    .calendar-nav-link {
        width: 30px;
        height: 32px;
        border-radius: 10px;
        font-size: 0.92rem;
    }

    .calendar-cell {
        aspect-ratio: 0.78 / 1;
        border-radius: 10px;
        padding: 6px 5px 4px;
    }

    .calendar-weekdays,
    .calendar-grid {
        min-width: 0;
        gap: 4px;
    }

    .calendar-weekdays {
        font-size: 0.76rem;
        padding: 0 1px;
    }

    .calendar-number {
        margin-bottom: 8px;
        font-size: 0.78rem;
    }

    .glyph-drop {
        width: 9px;
        height: 12px;
    }

    .glyph-flower {
        width: 6px;
        height: 6px;
    }

    .glyph-flower::before,
    .glyph-flower::after {
        width: 6px;
        height: 6px;
    }

    .glyph-flower::before {
        left: -6px;
        box-shadow: 12px 0 0 #76adff, 6px -6px 0 #76adff, 6px 6px 0 #76adff;
    }

    .glyph-flower::after {
        width: 4px;
        height: 4px;
    }

    .glyph-sun {
        width: 14px;
        height: 14px;
    }

    .glyph-sun::before {
        inset: 3px;
    }

    .ovulation-ring {
        width: 74px;
        height: 74px;
    }

    .ovulation-ring::before {
        inset: 27px;
    }

    .ovulation-ring::after {
        inset: 12px;
        -webkit-mask: radial-gradient(circle, transparent 0 19px, #000 19px);
                mask: radial-gradient(circle, transparent 0 19px, #000 19px);
    }

    .modal-card {
        max-height: 88vh;
        padding-top: 18px;
    }

    .modal-actions,
    .appt-actions,
    .food-row {
        gap: 10px;
    }

    .appt-detail-row span {
        width: 100%;
    }

    .profile-detail-card,
    .settings-mini-block,
    .danger-zone {
        padding: 10px 12px;
    }

    .appt-card-stack,
    .settings-actions {
        gap: 6px;
    }

    .bottom-nav {
        display: flex;
        grid-template-columns: none;
    }

    .bottom-nav a {
        flex-basis: 68px;
        font-size: 0.6rem;
        min-height: 60px;
        padding: 7px 2px 6px;
    }

    .bottom-nav .nav-icon {
        width: 15px;
        height: 15px;
        flex-basis: 15px;
    }

    .mobile-topbar .brand-mark,
    .mobile-menu-header .brand-mark {
        width: 28px;
        height: 28px;
    }

    .mobile-menu-toggle,
    .mobile-menu-close {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }
}

@media (max-width: 360px) {
    .auth-page {
        padding: 10px;
    }

    .auth-mock-card {
        padding: 18px 14px;
    }

    .auth-mock-card h1 {
        font-size: 1.56rem;
    }

    .auth-subtitle,
    .auth-footer-link {
        font-size: 0.9rem;
    }

    .auth-intro-card {
        padding: 18px 14px 14px;
    }

    .auth-intro-close {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
    }

    .auth-intro-progress {
        margin-right: 34px;
        gap: 4px;
    }

    .bottom-nav a {
        flex-basis: 64px;
    }

    .mood-chart {
        height: 210px;
    }
}

@media (max-width: 1080px) {
    .bottom-nav {
        display: flex;
        width: 100vw;
        grid-template-columns: none;
        justify-content: space-between;
        align-items: stretch;
        gap: 0;
        padding: 0 max(6px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-right));
    }

    .bottom-nav a {
        flex: 1 1 0;
        min-width: 0;
        max-width: none;
        align-items: center;
        text-align: center;
    }

    .bottom-nav a span:last-child {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mental-layout {
        display: grid;
        grid-template-columns: 1fr;
        align-items: start;
    }

    .mental-layout > *,
    .mood-check-card,
    .mood-trends-card {
        width: 100%;
        max-width: none;
    }
}

@media (min-width: 721px) and (max-width: 1080px) {
    .calendar-board {
        padding: 18px;
    }

    .calendar-weekdays,
    .calendar-grid {
        gap: 8px;
    }

    .calendar-cell {
        min-height: 72px;
        border-radius: 16px;
        padding: 10px 9px;
    }

    .calendar-under {
        grid-template-columns: 1fr;
    }

    .cycle-day-detail-grid,
    .cycle-insights-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .mood-choice {
        min-height: 96px;
    }
}

@media (max-width: 720px) {
    .cycle-insights-meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cycle-metric-chip,
    .insight-chip {
        min-height: 0;
        padding: 12px;
        border-radius: 14px;
    }

    .calendar-cell {
        aspect-ratio: 1 / 1;
        min-height: 44px;
    }
}

@media (max-width: 420px) {
    .bottom-nav a {
        flex: 1 1 0;
        font-size: 0.5rem;
        padding-left: 1px;
        padding-right: 1px;
    }

    .bottom-nav .nav-icon {
        width: 14px;
        height: 14px;
        flex-basis: 14px;
    }
}
