/* ============================================
 * GLP-1 Hero Card + Symptom Logger Styles
 * Spec: docs/specs/glp1-phase-2-v2.3.3.md §1, §2
 * ============================================ */

/* ── V2 Layout (2026-03-03 Rework) ────────────────── */

.glp1-v2 {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Row 1: Full-width Velocity Hero (mirrors Health Overview bento-hero) */
.glp1-velocity-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    background: var(--card-gradient, linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05)));
    border: 1.5px solid var(--primary-glow, rgba(139, 92, 246, 0.5));
    border-radius: 16px;
    box-shadow: 0 10px 30px var(--primary-glow, rgba(139, 92, 246, 0.3));
}

/* Velocity content (left side of hero) */
.glp1-vel-box {
    flex: 1;
}

.glp1-vel-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 8px;
}

.glp1-vel-number {
    display: flex;
    align-items: baseline;
    gap: 6px;
    line-height: 1;
}

.glp1-vel-arrow {
    font-size: 1.8rem;
    font-weight: 900;
}

.glp1-vel-big {
    font-size: 3.8rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.glp1-vel-unit {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    align-self: flex-end;
    margin-bottom: 6px;
}

/* Plateau Gauge (right side of hero — no separate border) */
.glp1-gauge-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    padding: 0 8px;
    flex-shrink: 0;
}

.glp1-gauge-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 6px;
    text-align: center;
}

.glp1-gauge-ring {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
}

.glp1-gauge-ring svg {
    display: block;
}

.glp1-gauge-value {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.glp1-gauge-number {
    font-size: 1.8rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.glp1-gauge-max {
    font-size: 0.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.25);
    margin-top: 2px;
}

.glp1-gauge-status {
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    margin-top: 4px;
}

/* Row 2: Dose + Projection Strip */
.glp1-dose-projection-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.18);
    border-radius: 12px;
}

.glp1-dp-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.glp1-dp-dose {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.95);
}

.glp1-dp-dose i {
    font-size: 0.8rem;
    color: #8b5cf6;
}

.glp1-dp-dose-value {
    font-size: 1.5rem;
    font-weight: 800;
    white-space: nowrap;
}

.glp1-dp-meta {
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    padding-left: 26px;
}

.glp1-dp-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.glp1-dp-proj-arrow {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.2);
    font-weight: 300;
}

.glp1-dp-proj-data {
    text-align: right;
}

.glp1-dp-proj-weight {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
}

.glp1-dp-proj-change {
    font-size: 0.65rem;
    font-weight: 700;
    margin-top: 2px;
}

.glp1-dp-confidence {
    font-size: 0.52rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.45);
    white-space: nowrap;
}

.glp1-dp-building {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

/* Row 3: Velocity Sparkline */
.glp1-sparkline-container {
    padding: 10px 0 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.glp1-sparkline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.glp1-sparkline-title {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.35);
}

.glp1-sparkline-trend {
    font-size: 0.65rem;
    font-weight: 700;
}

.glp1-sparkline-svg {
    width: 100%;
    height: 44px;
    display: block;
}

.glp1-sparkline-labels {
    display: flex;
    justify-content: space-between;
    padding: 6px 8px 0;
}

.glp1-sparkline-labels span {
    font-size: 0.56rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.3);
    font-variant-numeric: tabular-nums;
}

/* V2: Trophy case section styling */
.glp1-v2 .glp1-milestones {
    padding: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    margin-top: 0;
    border-top: none;
}

/* ── End V2 Layout ────────────────────────────────── */

/* --- GLP-1 Hero Card (Legacy V1 — kept for compatibility) --- */

.glp1-hero-grid:not(.glp1-v2) {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Velocity Section */
.glp1-velocity-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.glp1-velocity {
    flex: 1;
}

.glp1-velocity-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    margin-bottom: 4px;
}

.glp1-velocity-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-weight: 900;
}

.glp1-velocity-arrow {
    font-size: 1.4rem;
}

.glp1-velocity-number {
    font-size: 2rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.glp1-velocity-unit {
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.5;
}

/* Plateau Badge */
.glp1-plateau-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.glp1-plateau-unknown {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Dose Strip */
.glp1-dose-strip {
    display: flex;
    align-items: center;
}

.glp1-dose-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    width: 100%;
}

.glp1-dose-value {
    font-weight: 800;
    font-size: 0.9rem;
    color: #a78bfa;
}

.glp1-dose-weeks {
    font-size: 0.78rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    font-weight: 600;
}

/* Projections */
.glp1-projection-cards {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.glp1-projection-card {
    flex: 1;
    min-width: 90px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.glp1-projection-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.glp1-projection-primary {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
}

.glp1-proj-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    margin-bottom: 4px;
}

.glp1-proj-value {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-primary, #fff);
    font-variant-numeric: tabular-nums;
}

.glp1-proj-change {
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 2px;
}

.glp1-proj-confidence {
    font-size: 0.65rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.35));
    margin-top: 2px;
    font-weight: 600;
}

.glp1-projections-dimmed {
    opacity: 0.5;
    filter: grayscale(40%);
}

.glp1-projections-empty {
    text-align: center;
    color: var(--text-muted, rgba(255, 255, 255, 0.3));
    font-size: 0.8rem;
    font-weight: 600;
    padding: 16px 0;
}

.glp1-minimal-hint {
    text-align: center;
    font-size: 0.72rem;
    color: rgba(245, 158, 11, 0.7);
    font-weight: 600;
    margin-top: 4px;
}

/* Stats Strip */
.glp1-stats-strip {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.glp1-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.glp1-stat-value {
    font-size: 1.1rem;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
}

.glp1-stat-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, rgba(255, 255, 255, 0.35));
    margin-top: 2px;
}

/* Footer (last updated + refresh) */
.glp1-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.glp1-last-updated {
    font-size: 0.65rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.25));
    font-weight: 600;
}

.glp1-refresh-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.glp1-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #fff);
}

/* Unlock Prompt */
.glp1-unlock-prompt {
    text-align: center;
    padding: 32px 20px;
}

.glp1-unlock-icon {
    font-size: 2.4rem;
    color: rgba(99, 102, 241, 0.5);
    margin-bottom: 12px;
}

.glp1-unlock-prompt h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary, #fff);
    margin: 0 0 8px;
}

.glp1-unlock-prompt p {
    font-size: 0.82rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.45));
    margin: 0 0 16px;
    line-height: 1.5;
}

.glp1-unlock-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 10px;
    font-size: 0.72rem;
    color: rgba(165, 143, 255, 0.8);
    font-weight: 600;
}


/* ============================================
 * Symptom Logger Styles
 * ============================================ */

.symptom-logger-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Averages Strip */
.symptom-averages-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.12);
    border-radius: 14px;
    flex-wrap: wrap;
}

.symptom-avg-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 50px;
}

.symptom-avg-value {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--text-primary, #fff);
    font-variant-numeric: tabular-nums;
}

.symptom-avg-label {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, rgba(255, 255, 255, 0.35));
    margin-top: 2px;
}

.symptom-avg-gi .symptom-avg-value {
    color: #f59e0b;
}

.symptom-avg-meta {
    font-size: 0.65rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.3));
    font-weight: 600;
    white-space: nowrap;
}

/* Form */
.symptom-form {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
}

.symptom-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.symptom-form-title {
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-primary, #fff);
}

.symptom-date-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary, #fff);
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.symptom-date-input::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(0.7);
}

/* Score Rows */
.symptom-scores-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.symptom-score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.symptom-score-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary, rgba(255, 255, 255, 0.8));
    flex: 1;
    white-space: nowrap;
}

.symptom-score-buttons {
    display: flex;
    gap: 6px;
}

.symptom-score-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.symptom-score-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: #a78bfa;
    transform: scale(1.08);
}

.symptom-score-btn.selected {
    background: rgba(99, 102, 241, 0.3);
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
    transform: scale(1.1);
}

/* GI Pills */
.symptom-gi-section {
    margin-bottom: 14px;
}

.symptom-gi-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    margin-bottom: 8px;
}

.symptom-gi-hint {
    font-weight: 500;
    font-size: 0.65rem;
    opacity: 0.5;
    text-transform: none;
    letter-spacing: 0;
}

.symptom-gi-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.symptom-gi-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
    user-select: none;
    -webkit-user-select: none;
}

.symptom-gi-pill:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.symptom-gi-pill:active {
    transform: scale(0.97);
}

.gi-pill-icon {
    font-size: 1rem;
}

.gi-pill-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
}

.gi-pill-value {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-primary, rgba(255, 255, 255, 0.8));
}

/* Injection site row */
.symptom-injection-row {
    margin-bottom: 12px;
}

.symptom-toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary, rgba(255, 255, 255, 0.7));
    cursor: pointer;
}

.symptom-toggle-label input[type="checkbox"] {
    accent-color: #6366f1;
    width: 16px;
    height: 16px;
}

/* Notes */
.symptom-notes-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-primary, #fff);
    padding: 10px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    resize: vertical;
    min-height: 50px;
    max-height: 120px;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}

.symptom-notes-input::placeholder {
    color: var(--text-muted, rgba(255, 255, 255, 0.2));
}

.symptom-notes-input:focus {
    border-color: rgba(99, 102, 241, 0.3);
}

/* Actions */
.symptom-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
}

.symptom-prefill-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.symptom-prefill-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #fff);
}

.symptom-save-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 12px;
    color: #fff;
    padding: 12px 28px;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.symptom-save-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.symptom-save-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.symptom-save-hint {
    text-align: center;
    font-size: 0.68rem;
    color: rgba(245, 158, 11, 0.6);
    font-weight: 600;
    margin-top: 6px;
}

/* History */
.symptom-history {
    margin-top: 8px;
}

.symptom-history-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    margin-bottom: 8px;
}

.symptom-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 4px;
    transition: background 0.2s;
}

.symptom-history-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.symptom-history-date {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    font-variant-numeric: tabular-nums;
}

.symptom-history-scores {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary, rgba(255, 255, 255, 0.7));
    font-variant-numeric: tabular-nums;
}

.symptom-history-gi {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted, rgba(255, 255, 255, 0.3));
}

.symptom-history-gi-active {
    color: #f59e0b;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .glp1-velocity-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .glp1-projection-cards {
        flex-direction: column;
    }

    .glp1-stats-strip {
        flex-wrap: wrap;
        gap: 12px;
    }

    .symptom-score-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .symptom-gi-pills {
        justify-content: center;
    }

    .symptom-actions {
        flex-direction: column;
    }

    .symptom-save-btn {
        width: 100%;
    }
}


/* ============================================
 * Phase 3: Milestone Trophy Case (spec §2.5)
 * ============================================ */

.glp1-milestones {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 4px;
}

.glp1-milestones-label {
    width: 100%;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, rgba(255, 255, 255, 0.35));
    margin-bottom: 2px;
}

.milestone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 1.15rem;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
    position: relative;
}

.milestone.earned {
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
    animation: milestoneEarned 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.milestone.earned:hover {
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 0 12px rgba(108, 60, 224, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

.milestone.locked {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    opacity: 0.4;
    filter: grayscale(100%);
    cursor: default;
}

.milestone.locked:hover {
    opacity: 0.55;
    animation: milestone-shake 0.5s ease-in-out;
}

/* Tooltip on hover */
.milestone::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(0.85);
    background: rgba(15, 15, 30, 0.95);
    color: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.milestone:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

@keyframes milestoneEarned {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }

    60% {
        transform: scale(1.15) rotate(3deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Stagger entrance for each milestone */
.milestone.earned:nth-child(2) {
    animation-delay: 0.05s;
}

.milestone.earned:nth-child(3) {
    animation-delay: 0.10s;
}

.milestone.earned:nth-child(4) {
    animation-delay: 0.15s;
}

.milestone.earned:nth-child(5) {
    animation-delay: 0.20s;
}

.milestone.earned:nth-child(6) {
    animation-delay: 0.25s;
}

.milestone.earned:nth-child(7) {
    animation-delay: 0.30s;
}

.milestone.earned:nth-child(8) {
    animation-delay: 0.35s;
}

.milestone.earned:nth-child(9) {
    animation-delay: 0.40s;
}

.milestone.earned:nth-child(10) {
    animation-delay: 0.45s;
}

.milestone.earned:nth-child(11) {
    animation-delay: 0.50s;
}

.milestone.earned:nth-child(12) {
    animation-delay: 0.55s;
}

.milestone.earned:nth-child(13) {
    animation-delay: 0.60s;
}

/* Phase 4 §7.3: Recently earned milestone pulse (< 24h) */
.milestone.earned.recently-earned {
    animation: milestone-pulse 2s ease-in-out 3;
}

@keyframes milestone-pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(108, 60, 224, 0);
    }

    50% {
        box-shadow: 0 0 16px 4px rgba(108, 60, 224, 0.4);
    }
}

/* Phase 4 §7.2: Locked milestone shake on hover */
@keyframes milestone-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-2px);
    }

    75% {
        transform: translateX(2px);
    }
}


/* ============================================
 * Phase 3: Blur + Lock Overlay (spec §4.5)
 * Feature gating — blur locked fields with 🔒
 * ============================================ */

.glp1-gated {
    position: relative;
    overflow: hidden;
}

.glp1-gated.locked .glp1-gated-content {
    filter: blur(8px);
    user-select: none;
    pointer-events: none;
}

.glp1-gated-overlay {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: pointer;
    border-radius: inherit;
    background: rgba(15, 15, 30, 0.3);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    transition: background 0.2s ease;
}

.glp1-gated.locked .glp1-gated-overlay {
    display: flex;
}

.glp1-gated-overlay:hover {
    background: rgba(15, 15, 30, 0.45);
}

.glp1-lock-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    color: #a78bfa;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.glp1-gated-overlay:hover .glp1-lock-badge {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.45);
    transform: scale(1.05);
}


/* ============================================
 * Phase 4 §6.2-6.3: Blur Teaser Intentional Design
 * Gradient overlay + lock icon + CTA button
 * ============================================ */

.gated-feature {
    position: relative;
    overflow: hidden;
}

.gated-feature .gated-content {
    filter: blur(8px);
    user-select: none;
    pointer-events: none;
}

.gated-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    cursor: pointer;
}

.gated-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(26, 26, 46, 0.7) 0%,
            rgba(26, 26, 46, 0.9) 100%);
}

.gated-lock {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.gated-lock i {
    font-size: 1.5rem;
    color: #6c3ce0;
    margin-bottom: 0.25rem;
}

.gated-lock span {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.gated-cta {
    margin-top: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #6c3ce0, #8b5cf6);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gated-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 60, 224, 0.4);
}


/* ============================================
 * Phase 3: Upgrade CTA (spec §4.5)
 * ============================================ */

.glp1-upgrade-cta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 8px;
}

.glp1-upgrade-cta:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.18));
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

.glp1-upgrade-cta-icon {
    font-size: 1.4rem;
}

.glp1-upgrade-cta-text {
    flex: 1;
}

.glp1-upgrade-cta-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #a78bfa;
    margin-bottom: 2px;
}

.glp1-upgrade-cta-desc {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted, rgba(255, 255, 255, 0.45));
    line-height: 1.4;
}

.glp1-upgrade-cta-arrow {
    font-size: 0.85rem;
    color: rgba(167, 139, 250, 0.5);
    transition: transform 0.2s ease;
}

.glp1-upgrade-cta:hover .glp1-upgrade-cta-arrow {
    transform: translateX(3px);
    color: rgba(167, 139, 250, 0.8);
}


/* ============================================
 * Phase 3: Celebration Toast + Confetti (spec §2.6)
 * CSS-only confetti animation
 * ============================================ */

.toast-celebration {
    position: relative;
    overflow: visible;
}

.toast-celebration .toast-message {
    font-weight: 800;
}

/* Confetti burst container */
.confetti-burst {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    opacity: 0;
    animation: confettiFall 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(-20vh) rotate(0deg) scale(1);
    }

    20% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg) scale(0.3);
    }
}


/* ============================================
 * Phase 3: Disclaimer Text (spec §5.2)
 * Low-contrast, small, non-intrusive
 * ============================================ */

.glp1-disclaimer {
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--text-muted, rgba(255, 255, 255, 0.22));
    line-height: 1.5;
    padding: 10px 0 2px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    margin-top: 8px;
    letter-spacing: 0.01em;
}

.glp1-disclaimer i {
    margin-right: 4px;
    opacity: 0.5;
}

/* Symptom logger disclaimer (header style) */
.symptom-disclaimer {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted, rgba(255, 255, 255, 0.3));
    line-height: 1.5;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    margin-bottom: 4px;
}

.symptom-disclaimer i {
    margin-right: 4px;
    opacity: 0.5;
}


/* ============================================
 * Phase 3: Symptom Rate Limit UI (spec §4.7)
 * "2 of 3 check-ins used this week"
 * ============================================ */

.symptom-rate-limit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.12);
    border-radius: 10px;
    margin-bottom: 8px;
}

.symptom-rate-limit-warning {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.15);
}

.symptom-rate-limit-text {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

.symptom-rate-limit-warning .symptom-rate-limit-text {
    color: rgba(239, 68, 68, 0.7);
}

.symptom-rate-limit-dots {
    display: flex;
    gap: 4px;
}

.symptom-rate-limit-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.symptom-rate-limit-dot.used {
    background: rgba(245, 158, 11, 0.6);
    border-color: rgba(245, 158, 11, 0.8);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.2);
}

.symptom-rate-limit-upgrade {
    font-size: 0.65rem;
    font-weight: 700;
    color: #a78bfa;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.symptom-rate-limit-upgrade:hover {
    color: #c4b5fd;
    text-decoration: underline;
}

.symptom-rate-blocked {
    text-align: center;
    padding: 20px 16px;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.12);
    border-radius: 14px;
}

.symptom-rate-blocked-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
    opacity: 0.6;
}

.symptom-rate-blocked-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-primary, #fff);
    margin-bottom: 4px;
}

.symptom-rate-blocked-text {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted, rgba(255, 255, 255, 0.45));
    margin-bottom: 10px;
    line-height: 1.4;
}

.symptom-rate-blocked-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.symptom-rate-blocked-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}


/* ============================================
 * Phase 3: Alert Toast Variants
 * Severity-colored toasts for GLP1_ALERT
 * ============================================ */

.toast-critical {
    border-left: 3px solid #ef4444 !important;
    background: rgba(239, 68, 68, 0.08) !important;
}

.toast-critical .toast-icon {
    color: #ef4444 !important;
}


/* Mobile: milestone responsive */
@media (max-width: 480px) {
    .milestone {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .glp1-upgrade-cta {
        flex-direction: column;
        text-align: center;
    }

    .glp1-upgrade-cta-arrow {
        display: none;
    }
}


/* ============================================
 * Phase 4 §4.2-4.4: Visual Hierarchy & Design Polish
 * Card tier system: primary → secondary → tertiary
 * ============================================ */

/* Primary cards — the hero action (Weight Hero, GLP-1 Hero) */
.module-card--primary,
.mj-module-container.module-card--primary {
    border: 1px solid rgba(108, 60, 224, 0.4);
    box-shadow: 0 0 20px rgba(108, 60, 224, 0.15), 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Secondary cards — important but not hero (Daily Progress, Action Required, Trends) */
.module-card--secondary,
.mj-module-container.module-card--secondary {
    border: 1px solid rgba(108, 60, 224, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Tertiary cards — supporting info (Milestones row, info cards) */
.module-card--tertiary,
.mj-module-container.module-card--tertiary {
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: none;
}

/* Daily Progress breathing room — increase gap between stacked cards.
   Disabled inside flex parents (dashboard customizer) where gap handles spacing. */
.mj-module-container+.mj-module-container {
    margin-top: 1.25rem;
}

/* In flex layout the gap property handles spacing; margin-top on adjacent
   siblings causes misalignment when cards sit side-by-side. */
[style*="display: flex"]>.mj-module-container+.mj-module-container,
[style*="display:flex"]>.mj-module-container+.mj-module-container {
    margin-top: 0;
}

/* Action Required red accent — drives behavior */
.action-required-card {
    border-left: 3px solid #ef4444;
}


/* ============================================
 * Phase 4 §5.2-5.4: WCAG Accessibility Audit
 * Minimum 4.5:1 contrast ratio on dark backgrounds
 * ============================================ */

/* Secondary labels — lightened for 5.1:1 on #1a1a2e */
.glp1-label-secondary,
.glp1-stat-label,
.glp1-proj-label,
.glp1-milestones-label,
.glp1-footer .glp1-last-updated {
    color: #94a3b8;
    /* slate-400 — 5.1:1 on #1a1a2e ✅ */
}

/* Chart axis labels */
.chart-axis-label {
    color: #94a3b8;
}

/* Small stat badge captions */
.stat-badge-caption {
    color: #94a3b8;
}

/* Ensure no text goes below 12px */
.glp1-disclaimer {
    font-size: max(0.62rem, 12px);
}

.symptom-disclaimer {
    font-size: max(0.65rem, 12px);
}