:root {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #24344d;
    --bg-card-muted: #182234;
    --bg-input: #0f172a;
    
    --border-color: #334155;
    --border-focus: #38bdf8;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --primary: #38bdf8;
    --primary-hover: #0ea5e9;
    --primary-glow: rgba(56, 189, 248, 0.2);
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --success-glow: rgba(16, 185, 129, 0.25);
    
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --carbs-color: #06b6d4;
    --fat-color: #a855f7;
    --protein-color: #f97316;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 24px;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.4s ease;
}

/* Strength Page Dark Green Theme */
body.page-strength {
    --bg-main: #061c16;
    --bg-card: #0d2820;
    --bg-card-hover: #13382d;
    --bg-card-muted: #0a2019;
    --bg-input: #061c16;
    
    --border-color: #1a4d3e;
    --border-focus: #10b981;
    
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.28);
}

/* Google Health Page Blue Theme */
body.page-googlehealth {
    --bg-main: #08162b;
    --bg-card: #0f2442;
    --bg-card-hover: #17355e;
    --bg-card-muted: #0a1c36;
    --bg-input: #08162b;
    
    --border-color: #1b3d6c;
    --border-focus: #3b82f6;
    
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.28);
}

.hidden {
    display: none !important;
}

html, body {
    min-height: auto;
}

.app-container {
    max-width: 900px;
    min-height: auto;
    margin: 0 auto;
    padding: 8px 18px 16px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 50;
    padding: 4px 0 12px;
    border-bottom: 1px solid var(--border-color);
    height: 64px;
    min-height: 64px;
    max-height: 64px;
    opacity: 1;
    transform: translateY(0);
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                min-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s ease;
    box-sizing: border-box;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
    position: relative;
    z-index: 20;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-text-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 40px;
}

.brand-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-icon.icon-ckf {
    background: transparent;
    border: none;
    box-shadow: 0 0 15px rgba(72, 51, 143, 0.45);
    overflow: hidden;
    padding: 0;
}

.brand-icon.icon-ckf img {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: block;
    object-fit: cover;
}

.brand-icon.icon-mfp {
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    box-shadow: 0 0 15px var(--primary-glow);
}

.brand-icon.icon-strength {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.brand-icon.icon-googlehealth {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.3;
}

.subtitle-dot {
    color: var(--text-dim);
    font-size: 0.75rem;
    line-height: 1;
}

.sync-status-text {
    color: var(--text-dim);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 20;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Buttons & Interactive Elements */
button,
.btn,
.nav-arrow-btn,
.btn-icon,
.page-nav-tab,
.app-version-btn,
.switch,
.date-sync-btn,
.strength-filter-chip,
.strength-search-toggle-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary);
    color: #0f172a;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 0 12px var(--primary-glow);
}

.btn-secondary {
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--text-muted);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.05);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.75rem;
}

.btn-icon {
    padding: 8px;
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.btn-icon:hover {
    color: var(--text-main);
    background-color: var(--bg-card-hover);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Morphing Save Buttons for Settings */
.btn-save-morph {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-save-morph:disabled {
    background-color: var(--bg-card-muted) !important;
    color: var(--text-dim) !important;
    border: 1px solid var(--border-color) !important;
    opacity: 0.55 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

.btn-save-morph:not(:disabled) {
    background-color: var(--primary) !important;
    color: #0f172a !important;
    border: 1px solid transparent !important;
    opacity: 1 !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    box-shadow: 0 0 12px var(--primary-glow) !important;
    animation: btn-save-pulse 2s infinite ease-in-out;
}

.btn-save-morph:not(:disabled):hover {
    background-color: var(--primary-hover) !important;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.55) !important;
    transform: translateY(-1px);
}

@keyframes btn-save-pulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(56, 189, 248, 0.25);
    }
    50% {
        box-shadow: 0 0 16px rgba(56, 189, 248, 0.55);
    }
}

.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Date Navigator & Minimal View Toggle */
.date-nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 16px 0 20px;
    width: 100%;
    transition: margin 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Minimal View Slider Switch */
.minimal-slider-group {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.minimal-slider-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    user-select: none;
    line-height: 1;
}

.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    cursor: pointer;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
    border-radius: var(--radius-full);
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: all 0.25s ease;
    border-radius: 50%;
}

.switch:hover .slider {
    border-color: var(--border-focus);
}

.switch:hover .slider:before {
    background-color: var(--text-main);
}

.switch input:checked + .slider {
    background-color: var(--primary-glow);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
    background-color: var(--primary);
}

.date-navigator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    width: fit-content;
}

/* Date Actions Group & Sync Button */
.date-actions-group {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.sync-time-status {
    position: absolute;
    top: calc(100% + 3px);
    right: 0;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    user-select: none;
    white-space: nowrap;
    line-height: 1;
    text-align: right;
    pointer-events: none;
    transition: opacity 0.2s ease, color 0.2s ease;
}

body.minimal-view .sync-time-status {
    display: none;
}

.date-sync-btn {
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                gap 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 0.35s ease,
                background-color 0.2s ease,
                box-shadow 0.2s ease;
    overflow: hidden;
    white-space: nowrap;
}

.date-sync-btn #syncIcon {
    display: block;
    flex-shrink: 0;
    margin: 0;
}

.date-sync-btn .sync-btn-text {
    display: inline-block;
    max-width: 100px;
    opacity: 1;
    transform: translateX(0);
    transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.minimal-view .date-sync-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    gap: 0;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-md);
}

body.minimal-view .date-sync-btn #syncIcon {
    margin: 0;
}

body.minimal-view .date-sync-btn .sync-btn-text {
    max-width: 0;
    opacity: 0;
    transform: translateX(8px);
    pointer-events: none;
}

/* Minimal View Mode */
body.minimal-view .navbar {
    height: 0;
    min-height: 0;
    max-height: 0;
    opacity: 0;
    transform: translateY(-16px);
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom-color: transparent;
    pointer-events: none;
    overflow: hidden;
}

body.minimal-view .navbar.has-page-switcher {
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    opacity: 1;
    transform: translateY(0);
    padding: 4px 0 6px;
    margin-bottom: 0;
    border-bottom-color: transparent;
    pointer-events: auto;
}

body.minimal-view .navbar.has-page-switcher .brand,
body.minimal-view .navbar.has-page-switcher .nav-actions {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

body.minimal-view .navbar.has-page-switcher .page-nav-switcher:not(.hidden) {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    opacity: 1;
    pointer-events: auto;
    margin: 0;
}

body.minimal-view .dashboard-grid {
    max-height: 0 !important;
    opacity: 0 !important;
    transform: translateY(-14px) scale(0.98) !important;
    margin-bottom: 0 !important;
    gap: 0 !important;
    pointer-events: none !important;
}

body.minimal-view .date-nav-row {
    margin-top: 4px;
    margin-bottom: 16px;
}

.nav-arrow-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    border-radius: var(--radius-full);
    transition: all 0.15s ease;
}

.nav-arrow-btn:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.1);
}

.date-center {
    position: relative;
    cursor: pointer;
}

.date-display {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.date-input {
    position: absolute;
    opacity: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 16px;
    margin-bottom: 24px;
    max-height: 650px;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                gap 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        max-height: 1200px;
    }
    .desktop-only {
        display: none;
    }
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.4s ease;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.card-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--text-dim);
}

.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.badge-accent {
    background-color: var(--primary-glow);
    color: var(--primary);
}

.calorie-numbers {
    margin-bottom: 12px;
}

.big-stat {
    font-size: 1.75rem;
    font-weight: 800;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.stat-eaten {
    color: var(--text-main);
}

.stat-divider {
    color: var(--text-dim);
    font-weight: 400;
}

.stat-planned {
    color: var(--text-muted);
}

.stat-unit {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dim);
}

.stat-goal-wrapper {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dim);
    margin-left: 6px;
    letter-spacing: -0.01em;
}

.stat-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Progress Bars */
.progress-bar-bg {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.fill-calorie {
    background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.fill-protein {
    background-color: var(--protein-color);
}

.fill-carbs {
    background-color: var(--carbs-color);
}

.fill-fat {
    background-color: var(--fat-color);
}

.fill-over-goal {
    background: linear-gradient(90deg, #ef4444, #f87171) !important;
}

.fill-match-goal {
    background: linear-gradient(90deg, #10b981, #34d399) !important;
}

.stat-over-goal,
.macro-over-goal {
    color: var(--danger) !important;
    font-weight: 700;
}

.stat-match-goal,
.macro-match-goal {
    color: var(--success) !important;
    font-weight: 700;
}

.stat-subtext.stat-over-goal {
    color: #f87171 !important;
    font-weight: 600;
}

.stat-subtext.stat-match-goal {
    color: #34d399 !important;
    font-weight: 600;
}

.badge.badge-over-goal {
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge.badge-match-goal {
    background-color: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Macros Grid */
.macros-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    height: 100%;
}

.macro-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.macro-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.macro-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-protein { background-color: var(--protein-color); }
.dot-carbs { background-color: var(--carbs-color); }
.dot-fat { background-color: var(--fat-color); }

.macro-values {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 3px;
    margin-top: -18px;
}

.macro-eaten {
    color: var(--text-main);
}

.macro-planned {
    color: var(--text-dim);
}

.macro-goal-wrapper {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-dim);
    margin-left: 2px;
    white-space: nowrap;
}

.macro-bar {
    height: 6px;
    margin-top: 4px;
}

/* Meals Container */
.meals-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.meal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.meal-card.all-completed {
    border-color: rgba(16, 185, 129, 0.45);
    background-color: rgba(16, 185, 129, 0.07);
}

.meal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background-color: var(--bg-card-muted);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.meal-header:hover {
    background-color: var(--bg-card-hover);
}

.meal-card.all-completed .meal-header {
    background-color: rgba(16, 185, 129, 0.14);
    border-bottom-color: rgba(16, 185, 129, 0.25);
}

.meal-card.all-completed .meal-header:hover {
    background-color: rgba(16, 185, 129, 0.22);
}

/* Group Completion Window Swipe & Flash Animation */
.meal-card.group-swipe-flash,
.meal-header.group-swipe-flash {
    position: relative;
    overflow: hidden;
}

.meal-card.group-swipe-flash {
    animation: groupCardFlash 1.4s cubic-bezier(0.25, 1, 0.4, 1) forwards;
}

.meal-header.group-swipe-flash {
    border-radius: var(--radius-lg);
    animation: groupHeaderFlash 1.4s cubic-bezier(0.25, 1, 0.4, 1) forwards;
}

.meal-card.group-swipe-flash::after,
.meal-header.group-swipe-flash::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 250%;
    height: 200%;
    background: linear-gradient(
        110deg,
        transparent 20%,
        rgba(255, 255, 255, 0.05) 32%,
        rgba(16, 185, 129, 0.35) 42%,
        rgba(255, 255, 255, 0.95) 50%,
        rgba(16, 185, 129, 0.45) 58%,
        rgba(255, 255, 255, 0.05) 68%,
        transparent 80%
    );
    pointer-events: none;
    z-index: 10;
    animation: windowSwipeShimmer 1.4s cubic-bezier(0.25, 1, 0.4, 1) forwards;
}

@keyframes windowSwipeShimmer {
    0% {
        transform: translateX(-100%) skewX(-18deg);
        opacity: 0;
    }
    12% {
        opacity: 1;
    }
    85% {
        opacity: 1;
    }
    100% {
        transform: translateX(110%) skewX(-18deg);
        opacity: 0;
    }
}

@keyframes groupCardFlash {
    0% {
        box-shadow: 0 0 0 rgba(16, 185, 129, 0);
        border-color: rgba(16, 185, 129, 0.45);
        background-color: var(--bg-card);
    }
    28% {
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.75), inset 0 0 22px rgba(16, 185, 129, 0.28);
        border-color: rgba(16, 185, 129, 1);
        background-color: rgba(16, 185, 129, 0.18);
    }
    100% {
        box-shadow: var(--shadow-sm);
        border-color: rgba(16, 185, 129, 0.45);
        background-color: rgba(16, 185, 129, 0.07);
    }
}

@keyframes groupHeaderFlash {
    0% {
        box-shadow: 0 0 0 rgba(16, 185, 129, 0);
        background-color: var(--bg-card-muted);
    }
    28% {
        box-shadow: 0 0 26px rgba(16, 185, 129, 0.75), inset 0 0 18px rgba(16, 185, 129, 0.35);
        background-color: rgba(16, 185, 129, 0.34);
    }
    100% {
        box-shadow: none;
        background-color: rgba(16, 185, 129, 0.14);
    }
}

.meal-collapse-icon {
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.15s ease;
    flex-shrink: 0;
}

.meal-header:hover .meal-collapse-icon {
    color: var(--primary);
}

.meal-card.collapsed .meal-collapse-icon {
    transform: rotate(-90deg);
}

.meal-card.collapsed .meal-header {
    border-bottom: none;
}

.meal-card.collapsed .food-list {
    display: none;
}

.meal-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.meal-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
}

.meal-stats {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.meal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Food Items List */
.food-list {
    list-style: none;
}

.food-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.15s ease;
}

.food-item-row:last-child {
    border-bottom: none;
}

.food-item-row:hover {
    background-color: var(--bg-card-hover);
}

.food-item-row.eaten {
    background-color: rgba(16, 185, 129, 0.04);
}

.food-item-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

/* Custom Checkbox */
.custom-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s ease;
    cursor: pointer;
    background-color: var(--bg-main);
}

.custom-checkbox:hover {
    border-color: var(--primary);
}

.food-item-row.eaten .custom-checkbox {
    background-color: var(--success);
    border-color: var(--success);
    box-shadow: 0 0 8px var(--success-glow);
    animation: checkbox-pop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes checkbox-pop {
    0% { transform: scale(0.85); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@keyframes victory-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.2); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

@keyframes victory-glow {
    0% { box-shadow: 0 0 0 rgba(16, 185, 129, 0); }
    50% { box-shadow: 0 0 25px rgba(16, 185, 129, 0.6); }
    100% { box-shadow: 0 0 0 rgba(16, 185, 129, 0); }
}

.calorie-card.celebrating {
    animation: victory-glow 1.2s ease-out;
}

.calorie-card.celebrating #caloriePercent {
    animation: victory-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-checkbox svg {
    display: none;
    color: #ffffff;
}

.food-item-row.eaten .custom-checkbox svg {
    display: block;
}

.food-info {
    min-width: 0;
}

.food-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.food-item-row.eaten .food-title {
    text-decoration: line-through;
    color: var(--text-dim);
}

.food-serving {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.food-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: 12px;
}

.food-macros {
    display: flex;
    align-items: center;
    gap: 6px;
}

.food-macros .extra-macros {
    display: none;
    align-items: center;
    gap: 6px;
}

.food-item-row.show-macros .food-macros .extra-macros {
    display: flex;
    animation: fade-in-macros 0.15s ease-out;
}

@keyframes fade-in-macros {
    from { opacity: 0; transform: translateX(4px); }
    to { opacity: 1; transform: translateX(0); }
}

.macro-chip {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.macro-chip.chip-carbs {
    background-color: rgba(6, 182, 212, 0.12);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.22);
}

.macro-chip.chip-fat {
    background-color: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.22);
}

.macro-chip.chip-protein {
    background-color: rgba(249, 115, 22, 0.12);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.22);
}

.macro-chip.chip-cal {
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.macro-chip.chip-cal:hover {
    background-color: rgba(56, 189, 248, 0.18);
    color: var(--primary);
    border-color: rgba(56, 189, 248, 0.3);
}

.food-item-row.show-macros .macro-chip.chip-cal {
    background-color: rgba(56, 189, 248, 0.2);
    color: var(--primary);
    border-color: rgba(56, 189, 248, 0.4);
}

.food-item-row.eaten .macro-chip.chip-cal {
    background-color: var(--success-bg);
    color: var(--success);
}

.delete-item-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
}

.delete-item-btn:hover {
    color: var(--danger);
    background-color: rgba(239, 68, 68, 0.1);
}

/* Log Bottom Actions */
.log-delete-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 12px;
}

.btn-danger-log {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    background-color: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger-log:hover {
    background-color: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.35);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background-color: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    margin-top: 20px;
}

.empty-state.hidden {
    display: none;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Skeleton loader */
.skeleton-loader {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skeleton-card {
    height: 120px;
    background: linear-gradient(90deg, #1e293b 25%, #28374d 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-lg);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    box-sizing: border-box;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    --bg-card: #1a202c;
    --bg-card-hover: #222938;
    --bg-card-muted: #141923;
    --bg-input: #0f131a;
    --border-color: #2d3748;
    --border-focus: #94a3b8;
    background-color: #1a202c;
    border: 1px solid #2d3748;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: modal-fade-in 0.2s ease-out;
    color: var(--text-main);
}

@keyframes modal-fade-in {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title-with-icon {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-header-logo {
    width: 48px;
    height: 48px;
    border-radius: 9px;
    object-fit: cover;
    box-shadow: 0 0 12px rgba(72, 51, 143, 0.45);
    flex-shrink: 0;
    display: block;
}

.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dim);
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.form-help {
    display: block;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 5px;
    line-height: 1.4;
}

.form-help code {
    background-color: var(--bg-input);
    padding: 2px 4px;
    border-radius: 4px;
    color: var(--primary);
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .col {
    flex: 1;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--text-main);
}

.settings-status-box {
    padding: 10px 14px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.settings-status-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: -4px;
    margin-bottom: 14px;
}

.settings-mfp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 0 0;
    background: transparent;
    border-top: 1px solid var(--border-color);
    margin-top: 18px;
    flex-wrap: wrap;
}

.settings-mfp-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 520px) {
    .settings-mfp-footer {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 10px;
    }

    .settings-mfp-footer-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .settings-mfp-footer-right .btn {
        width: 100%;
        padding: 9px 8px;
        font-size: 0.85rem;
        text-align: center;
        justify-content: center;
        white-space: nowrap;
    }

    .settings-mfp-footer .btn-reset-data {
        width: 100%;
        text-align: center;
        justify-content: center;
        font-size: 0.82rem;
        padding: 6px 10px;
    }
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2000;
}

.toast {
    padding: 12px 18px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toast-in 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 360px;
}

.toast.toast-success {
    border-left: 4px solid var(--success);
}

.toast.toast-error {
    border-left: 4px solid var(--danger);
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* App Footer & Version */
.app-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding: 10px 0 14px;
}

body.minimal-view .app-footer {
    margin-top: 12px;
    padding: 6px 0 10px;
}

.app-version-btn {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(51, 65, 85, 0.5);
    padding: 4px 14px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.app-version-btn:hover {
    color: var(--primary);
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(30, 41, 59, 0.9);
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.15);
}

.app-version-btn:active {
    transform: translateY(0);
}

/* Custom Confirmation Modal */
.confirm-modal-content {
    max-width: 440px;
}

.confirm-modal-body {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

.confirm-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.confirm-message-text {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.5;
}

.confirm-modal-footer,
.custom-lift-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    background-color: var(--bg-card-muted);
    border-top: 1px solid var(--border-color);
    margin-top: 0;
}

.btn-danger-solid {
    background-color: #ef4444;
    color: #ffffff;
    border: 1px solid #dc2626;
    font-weight: 600;
}

.btn-danger-solid:hover {
    background-color: #dc2626;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

/* Settings Modal Tabs & Layout */
.settings-modal-content {
    max-width: 620px;
    width: 94%;
    height: 85vh;
    height: 85dvh;
    max-height: 760px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    --bg-card: #1a202c;
    --bg-card-hover: #222938;
    --bg-card-muted: #141923;
    --bg-input: #0f131a;
    --border-color: #2d3748;
    --border-focus: #94a3b8;
}

.settings-modal-content .modal-header {
    flex-shrink: 0;
}

.settings-tabs-nav-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #141923;
    border-bottom: 1px solid #2d3748;
    flex-shrink: 0;
    width: 100%;
}

.settings-tabs-header {
    padding: 0 16px;
    background-color: transparent;
    border-bottom: none;
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    touch-action: pan-x;
    scroll-behavior: smooth;
}

.settings-tabs-header::-webkit-scrollbar {
    display: none;
}

.settings-tab-scroll-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    z-index: 5;
    color: var(--text-muted);
    transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
    padding: 0;
}

.settings-tab-scroll-btn.scroll-left {
    left: 0;
    background: linear-gradient(90deg, #141923 65%, rgba(20, 25, 35, 0));
    padding-right: 6px;
}

.settings-tab-scroll-btn.scroll-right {
    right: 0;
    background: linear-gradient(270deg, #141923 65%, rgba(20, 25, 35, 0));
    padding-left: 6px;
}

.settings-tab-scroll-btn:hover {
    color: #60a5fa;
}

.settings-tab-scroll-btn svg {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.settings-tabs {
    display: flex;
    gap: 8px;
    width: max-content;
    min-width: 100%;
}

.settings-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.settings-tab:hover {
    color: var(--text-main);
}

.settings-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Tab-specific Active Colors */
#tabSettingsGeneral.active {
    color: #e2e8f0;
    border-bottom-color: #94a3b8;
}

#tabSettingsMfp.active {
    color: #38bdf8;
    border-bottom-color: #38bdf8;
}

#tabSettingsStrength.active {
    color: #10b981;
    border-bottom-color: #10b981;
}

#tabSettingsGoogleHealth.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* Google Health Settings Panel - Dark Blue Theme */
#settingsPanelGoogleHealth .btn-primary {
    background-color: #3b82f6;
    color: #ffffff;
}

#settingsPanelGoogleHealth .btn-primary:hover {
    background-color: #2563eb;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.28);
}

#settingsPanelGoogleHealth .form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* General Settings Panel - Distinct Slate / Neutral Basic Theme */
#settingsPanelGeneral {
    --primary: #94a3b8;
    --primary-hover: #cbd5e1;
    --primary-glow: rgba(148, 163, 184, 0.25);
    --border-color: #334155;
    --border-focus: #94a3b8;
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #24344d;
    --bg-card-muted: #182234;
    --bg-input: #0f131a;
}

#settingsPanelGeneral .settings-group-header {
    color: #94a3b8;
}

#settingsPanelGeneral .settings-feature-desc {
    color: #94a3b8;
}

#settingsPanelGeneral .settings-feature-row,
#settingsPanelGeneral .settings-account-row,
#settingsPanelGeneral .page-setting-item {
    background: rgba(148, 163, 184, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: background 0.15s ease, border-color 0.15s ease;
}

#settingsPanelGeneral .settings-feature-row:hover,
#settingsPanelGeneral .settings-account-row:hover,
#settingsPanelGeneral .page-setting-item:hover {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.35);
}

#settingsPanelGeneral .page-setting-item.dragging {
    opacity: 0.6;
    border: 1px dashed #94a3b8;
    background: rgba(148, 163, 184, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

#settingsPanelGeneral .page-setting-item.is-premium-locked,
.page-setting-item.is-premium-locked {
    background: rgba(15, 23, 42, 0.55);
    border: 1px dashed rgba(148, 163, 184, 0.24);
    transition: background 0.2s ease, border-color 0.2s ease;
}

#settingsPanelGeneral .page-setting-item.is-premium-locked:hover,
.page-setting-item.is-premium-locked:hover {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.38);
}

#settingsPanelGeneral .page-setting-item.is-premium-locked .strength-drag-handle,
.page-setting-item.is-premium-locked .strength-drag-handle {
    opacity: 0.35;
}

#settingsPanelGeneral .page-setting-item.is-premium-locked .strength-lift-setting-name,
.page-setting-item.is-premium-locked .strength-lift-setting-name {
    color: #94a3b8;
}

#settingsPanelGeneral .page-setting-item.is-premium-locked .strength-lift-setting-hint,
.page-setting-item.is-premium-locked .strength-lift-setting-hint {
    color: #64748b;
    opacity: 0.85;
}

#settingsPanelGeneral .page-setting-item.is-premium-locked .page-name-edit-btn,
.page-setting-item.is-premium-locked .page-name-edit-btn {
    color: #64748b;
    opacity: 0.6;
}

#settingsPanelGeneral .page-setting-item.is-premium-locked .page-name-edit-btn:hover,
.page-setting-item.is-premium-locked .page-name-edit-btn:hover {
    color: #94a3b8;
    opacity: 0.9;
}

#settingsPanelGeneral .page-setting-item.is-premium-locked .switch,
.page-setting-item.is-premium-locked .switch {
    opacity: 0.45;
}

#settingsPanelGeneral .page-setting-item.is-premium-locked .switch .slider,
.page-setting-item.is-premium-locked .switch .slider {
    background-color: rgba(148, 163, 184, 0.08) !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    cursor: pointer;
}

#settingsPanelGeneral .page-setting-item.is-premium-locked .page-setting-premium-badge,
.page-setting-item.is-premium-locked .page-setting-premium-badge {
    opacity: 1 !important;
    color: #fbbf24 !important;
    border-color: rgba(251, 191, 36, 0.45) !important;
}

#settingsPanelGeneral .settings-feature-title,
#settingsPanelGeneral .settings-account-email,
#settingsPanelGeneral .strength-lift-setting-name {
    color: #f1f5f9;
}

#settingsPanelGeneral .settings-account-label,
#settingsPanelGeneral .strength-lift-setting-hint {
    color: #94a3b8;
}

#settingsPanelGeneral .strength-drag-handle {
    color: #64748b;
}

#settingsPanelGeneral .strength-drag-handle:hover {
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.12);
}

#settingsPanelGeneral .page-name-edit-btn {
    color: #64748b;
}

#settingsPanelGeneral .page-name-edit-btn:hover {
    color: #f1f5f9;
    background: rgba(148, 163, 184, 0.15);
}

#settingsPanelGeneral .page-name-input {
    background-color: #0f131a;
    border: 1px solid #334155;
    color: #f1f5f9;
}

#settingsPanelGeneral .page-name-input:focus {
    border-color: #94a3b8;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.15);
}

#settingsPanelGeneral .btn-primary {
    background-color: #475569;
    color: #f8fafc;
    border: 1px solid #64748b;
}

#settingsPanelGeneral .btn-primary:hover {
    background-color: #64748b;
    border-color: #94a3b8;
    box-shadow: 0 0 10px rgba(148, 163, 184, 0.25);
}

#settingsPanelGeneral .btn-ghost {
    color: #94a3b8;
}

#settingsPanelGeneral .btn-ghost:hover {
    color: #f8fafc;
    background: rgba(148, 163, 184, 0.12);
}

#settingsPanelGeneral .settings-website-link {
    color: #cbd5e1;
}

#settingsPanelGeneral .settings-website-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

#settingsPanelGeneral .btn-share-icon {
    color: #94a3b8;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

#settingsPanelGeneral .btn-share-icon:hover {
    color: #ffffff;
    background: rgba(148, 163, 184, 0.18);
    border-color: rgba(148, 163, 184, 0.35);
}

#settingsPanelGeneral #settingsVersionRow .settings-account-email,
#settingsPanelGeneral #settingsInstallAppRow .settings-account-email {
    color: #cbd5e1;
}

#settingsPanelGeneral #settingsVersionRow:hover .settings-account-email,
#settingsPanelGeneral #settingsInstallAppRow:hover .settings-account-email {
    color: #ffffff;
}

#settingsPanelGeneral .switch:hover .slider {
    border-color: rgba(148, 163, 184, 0.45);
}

#settingsPanelGeneral .switch input:checked + .slider {
    background-color: rgba(148, 163, 184, 0.2);
    border-color: #94a3b8;
    box-shadow: 0 0 10px rgba(148, 163, 184, 0.25);
}

#settingsPanelGeneral .switch input:checked + .slider:before {
    transform: translateX(20px);
    background-color: #cbd5e1;
}

/* Settings Modal Toggles - Consistently Standard Blue Theme */
.settings-modal-content .switch:hover .slider {
    border-color: rgba(56, 189, 248, 0.45);
}

.settings-modal-content .switch input:checked + .slider {
    background-color: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.settings-modal-content .switch input:checked + .slider:before {
    transform: translateX(20px);
    background-color: #38bdf8;
}

.settings-tab svg {
    flex-shrink: 0;
}

.settings-modal-body {
    padding: 24px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.settings-panel {
    display: block;
    animation: settings-panel-fade 0.15s ease-out;
}

.settings-panel.hidden {
    display: none !important;
}

@keyframes settings-panel-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.settings-group-section {
    display: flex;
    flex-direction: column;
}

.settings-group-section:not(:last-child) {
    margin-bottom: 24px;
}

.settings-group-header {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.settings-account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 46px;
    min-height: 46px;
    box-sizing: border-box;
    background: var(--bg-card-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 14px;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

.settings-account-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1;
}

.settings-account-email {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1;
}

.settings-group-section .settings-account-row + .settings-account-row {
    margin-top: 8px;
}

.settings-website-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-website-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    line-height: 1;
    transition: color 0.15s ease, opacity 0.15s ease;
}

.settings-website-link:hover {
    color: #38bdf8;
    text-decoration: underline;
}

.btn-share-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    cursor: pointer;
    touch-action: manipulation;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.btn-share-icon:hover {
    background: rgba(148, 163, 184, 0.22);
    border-color: rgba(148, 163, 184, 0.45);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-share-icon:active {
    transform: translateY(0);
}

.settings-data-management-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-card-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}

.settings-data-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Auth Modal & Full-Screen Login Styles */
body.not-authenticated {
    background-color: #0b0f19 !important;
    overflow: hidden !important;
}

body.not-authenticated .app-container {
    display: none !important;
}

body.not-authenticated #authModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: radial-gradient(circle at 50% 15%, #1d1838 0%, #0b0f19 75%);
    backdrop-filter: none;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
    box-sizing: border-box;
}

body.not-authenticated #authModal.hidden {
    display: flex !important;
}

body.not-authenticated #authModal .auth-modal-content {
    background-color: #141824;
    border: 1px solid rgba(147, 51, 234, 0.35);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.85), 0 0 35px rgba(124, 58, 237, 0.18);
    animation: authCardFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authCardFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.auth-modal-content {
    max-width: 440px;
}

.auth-brand-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px 16px;
    background-color: var(--bg-card-muted);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.auth-brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 0 14px rgba(72, 51, 143, 0.4);
    margin: 0;
    flex-shrink: 0;
    display: block;
}

.auth-brand-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.auth-brand-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.auth-brand-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.auth-modal-header {
    padding: 0 16px 0;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-card-muted);
}

.auth-tabs {
    display: flex;
    gap: 8px;
    width: 100%;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.auth-tab:hover {
    color: var(--text-main);
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-modal-body {
    padding: 24px;
}

.auth-form {
    display: flex;
    flex-direction: column;
}

.auth-form.hidden {
    display: none !important;
}

.auth-modal-footer {
    display: flex;
    flex-direction: column;
    margin-top: 18px;
    padding: 0;
}

.btn-block {
    width: 100%;
    padding: 11px;
    font-size: 0.95rem;
    font-weight: 600;
    justify-content: center;
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.form-label-row label {
    margin-bottom: 0;
}

.auth-link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.auth-link:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

.auth-intro-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.form-help-inline {
    font-weight: normal;
    color: var(--text-dim);
    font-size: 0.75rem;
    margin-left: 4px;
}

.auth-status-box {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    margin-top: 14px;
    line-height: 1.4;
}

.auth-status-box.hidden {
    display: none;
}

.auth-status-box.status-error {
    background-color: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.auth-status-box.status-success {
    background-color: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.auth-status-box.status-info {
    background-color: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: var(--primary);
}

/* Verification Pending View */
.verify-pending-view {
    text-align: center;
    padding: 10px 0;
}

.verify-pending-view.hidden {
    display: none;
}

.verify-icon {
    font-size: 2.8rem;
    margin-bottom: 12px;
}

.verify-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.verify-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.verify-subtext {
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.4;
    margin-bottom: 18px;
}

.verify-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

/* Page Navigation Switcher */
.page-nav-switcher {
    display: flex;
    justify-content: center;
    gap: 4px;
    background: #1e293b;
    border: 1px solid var(--border-color);
    padding: 3px 4px;
    border-radius: 9999px;
    width: fit-content;
    box-shadow: var(--shadow-sm);
    z-index: 50;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.page-strength .page-nav-switcher {
    background: #0d2820;
    border-color: #1a4d3e;
}

body.page-googlehealth .page-nav-switcher {
    background: #0f2442;
    border-color: #1b3d6c;
}

/* Center in header in both normal and minimal views */
.navbar .page-nav-switcher:not(.hidden) {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    max-width: calc(100% - 72px);
    box-sizing: border-box;
    opacity: 1;
    pointer-events: auto;
    z-index: 50;
    transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.35s ease,
                border-color 0.35s ease,
                max-width 0.35s ease;
}

.page-nav-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    padding: 6px 14px;
    flex-shrink: 0;
    transition: background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-nav-tab:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.page-nav-tab.active {
    background: var(--primary);
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
}

.page-nav-tab svg {
    flex-shrink: 0;
}

.page-nav-text {
    display: inline-block;
    max-width: 140px;
    opacity: 1;
    overflow: hidden;
    white-space: nowrap;
    vertical-align: middle;
    margin-left: 6px;
    transform-origin: left center;
    transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dynamic Icon-Only Mode (Calculated when tabs with page names do not fit available width) */
.page-nav-switcher.icons-only {
    gap: 3px;
    padding: 3px 4px;
}

.page-nav-switcher.icons-only .page-nav-tab {
    padding: 6px 11px;
    min-width: 38px;
    height: 34px;
    box-sizing: border-box;
    justify-content: center;
}

.page-nav-switcher.icons-only .page-nav-text {
    display: none !important;
}

/* Red Offline Status Indicator (Right side of screen, inline with page toggle, outside pill) */
.offline-indicator-wrapper {
    position: absolute;
    right: 88px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    z-index: 100;
    transition: top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                right 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.minimal-view .navbar .offline-indicator-wrapper {
    right: 8px;
}

.offline-status-indicator {
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    color: #ef4444;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    margin: 0;
    line-height: 1;
    opacity: 0.9;
    transition: opacity 0.2s ease, transform 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.offline-status-indicator:hover {
    opacity: 1;
    transform: scale(1.1);
}

.offline-status-indicator:active {
    transform: scale(0.95);
}

.offline-icon-svg {
    flex-shrink: 0;
    display: block;
}

/* Offline Info Speech Bubble Popover */
.offline-info-bubble {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 250px;
    max-width: calc(100vw - 32px);
    background: #0f172a;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: var(--radius-lg);
    box-shadow: 0 14px 35px -4px rgba(0, 0, 0, 0.85), 0 6px 14px -2px rgba(0, 0, 0, 0.6);
    padding: 12px 14px;
    z-index: 1000;
    animation: offlineBubbleFadeIn 0.2s ease-out;
    text-align: left;
    white-space: normal;
    box-sizing: border-box;
}

.offline-info-bubble::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 10px;
    width: 10px;
    height: 10px;
    background: #0f172a;
    border-left: 1px solid rgba(239, 68, 68, 0.4);
    border-top: 1px solid rgba(239, 68, 68, 0.4);
    transform: rotate(45deg);
}

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

.offline-info-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
}

.offline-info-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 6px #ef4444;
    flex-shrink: 0;
}

.offline-info-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #f87171;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.offline-info-msg {
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.45;
    margin: 0;
}

/* Small/medium screens (<= 700px) when screen is too small to fit switcher inline in header:
   In non-minimal mode: center switcher under header with responsive text/icon scaling.
   In minimal mode: transition strictly vertically upward to top of header. */
@media (max-width: 700px) {
    .app-container {
        padding: 6px 14px 16px;
    }

    body:not(.minimal-view) .navbar.has-page-switcher {
        height: 104px;
        min-height: 104px;
        max-height: 104px;
        padding-top: 4px;
        padding-bottom: 10px;
        align-items: flex-start;
    }

    body:not(.minimal-view) .navbar.has-page-switcher .brand {
        margin-top: 0;
    }

    body:not(.minimal-view) .navbar.has-page-switcher .nav-actions {
        margin-top: 0;
    }

    body:not(.minimal-view) .navbar.has-page-switcher .page-nav-switcher:not(.hidden) {
        position: absolute;
        left: 50%;
        top: 76px;
        transform: translate(-50%, -50%);
        max-width: calc(100% - 64px);
        margin: 0;
        opacity: 1;
        pointer-events: auto;
    }

    body:not(.minimal-view) .navbar.has-page-switcher .offline-indicator-wrapper {
        top: 76px;
        right: 0;
        transform: translateY(-50%);
    }

    body.minimal-view .navbar.has-page-switcher {
        height: 48px;
        min-height: 48px;
        max-height: 48px;
        padding: 4px 0 6px;
    }

    body.minimal-view .navbar.has-page-switcher .page-nav-switcher:not(.hidden) {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        max-width: calc(100% - 64px);
        margin: 0;
    }

    body.minimal-view .navbar.has-page-switcher .offline-indicator-wrapper {
        top: 50%;
        right: 0;
        transform: translateY(-50%);
    }

    .page-nav-tab {
        padding: 6px 12px;
        font-size: 0.82rem;
    }

    .page-nav-text {
        max-width: 120px;
    }

    .offline-indicator-wrapper {
        right: 0;
    }
}

.page-nav-switcher.hidden {
    display: none !important;
}

/* Multi-Page Container & Sliding Desktop Track */
.pages-container {
    width: 100%;
    position: relative;
    overflow-x: hidden;
    touch-action: pan-y;
}

.pages-track {
    display: flex;
    width: 200%;
    transform: translateX(0%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    align-items: flex-start;
}

.pages-track.page-strength-active {
    transform: translateX(-50%);
}

.page-view {
    width: 50%;
    flex-shrink: 0;
    box-sizing: border-box;
    display: block;
    padding: 0 4px;
}

/* Inactive page should not force height when not sliding */
.pages-track:not(.is-sliding) .page-view:not(.active) {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.pages-track.is-sliding .page-view {
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Single Module Fallback */
.pages-container.single-module .pages-track {
    width: 100%;
    transform: none !important;
}

.pages-container.single-module .page-view {
    width: 100%;
    display: none;
}

.pages-container.single-module .page-view.active {
    display: block;
}

/* Strength Page Components */
.strength-filter-bar {
    padding: 10px 14px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.strength-search-container {
    display: flex;
    align-items: center;
    position: relative;
}

.strength-search-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    flex-shrink: 0;
}

.strength-search-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.strength-search-container.is-expanded .strength-search-toggle-btn {
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--primary);
    background: rgba(16, 185, 129, 0.12);
}

.strength-search-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    margin-left: 6px;
    width: 140px;
    transition: width 0.2s ease, opacity 0.2s ease;
}

.strength-search-input-wrapper.hidden {
    display: none;
}

.strength-search-input {
    width: 100%;
    padding: 5px 26px 5px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 500;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.strength-search-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.strength-search-input::placeholder {
    color: var(--text-dim);
    font-size: 0.8rem;
}

.strength-search-clear {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 3px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.strength-search-clear:hover {
    color: var(--text-main);
}

.strength-filter-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.strength-filter-chip {
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.strength-filter-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

.strength-filter-chip.active {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--primary);
}

.strength-no-results {
    text-align: center;
    padding: 36px 16px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.strength-empty-state {
    text-align: center;
    padding: 48px 24px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    margin-top: 10px;
}

.strength-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.strength-empty-state h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.strength-empty-state p {
    font-size: 0.9rem;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Feature Toggles in General Settings */
.settings-feature-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    margin-bottom: 10px;
    transition: background 0.15s ease;
}

.settings-feature-row:last-child {
    margin-bottom: 0;
}

.settings-feature-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.settings-feature-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 14px;
}

.settings-feature-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.settings-feature-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.35;
}

/* Strength Exercise Cards — 4-field layout */
.strength-lifts-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.strength-lift-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.strength-lift-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
}

.strength-lift-card.locked-card {
    border-color: var(--border-color);
    opacity: 0.85;
}

/* Header row: icon + name, summary badge & collapse icon */
.strength-lift-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease;
}

.strength-lift-header:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.strength-lift-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.strength-lift-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.strength-summary-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.22);
    padding: 4px 10px;
    border-radius: var(--radius-md);
    letter-spacing: 0.01em;
    line-height: 1.25;
    text-align: right;
}

.strength-summary-line {
    white-space: nowrap;
}



.strength-collapse-icon {
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.15s ease;
    flex-shrink: 0;
}

.strength-lift-header:hover .strength-collapse-icon {
    color: var(--primary);
}

/* Collapsed state */
.strength-lift-card.collapsed .strength-collapse-icon {
    transform: rotate(-90deg);
}

.strength-lift-card.collapsed .strength-lift-fields {
    display: none;
}

/* Hide read-only summary badge and header note icon when card is expanded for editing */
.strength-lift-card:not(.collapsed) .strength-summary-badge,
.strength-lift-card:not(.collapsed) .strength-header-note-icon {
    display: none;
}

.strength-lift-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.strength-lift-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Fields layout: Sets group, History divider, History stat group */
.strength-lift-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 18px 16px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 14px;
}

.strength-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.strength-field-group.strength-sets-group {
    width: 100%;
}

.strength-field-group.strength-stat-group {
    width: 100%;
    align-self: flex-start;
    justify-content: flex-start;
}

.strength-sets-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.strength-sets-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    width: 100%;
    gap: 8px;
}

.strength-set-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.strength-set-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 38px;
    flex-shrink: 0;
}

.strength-set-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-add-set {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px dashed rgba(16, 185, 129, 0.35);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    width: fit-content;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-add-set:hover {
    background: rgba(16, 185, 129, 0.16);
    border-color: var(--primary);
}

.btn-add-set:active {
    transform: scale(0.97);
}

.btn-remove-set {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-remove-set:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
}

.strength-field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 6px;
}

.strength-field-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.strength-field-date {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
    transition: opacity 0.15s ease;
    white-space: nowrap;
    margin-left: 2px;
}

.strength-field-date.hidden {
    display: none;
}

.strength-field-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.strength-times {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dim);
    flex-shrink: 0;
    margin: 0 1px;
}

.strength-unit {
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--text-muted);
    flex-shrink: 0;
    user-select: none;
}

/* Compact number inputs */
.strength-num-input {
    padding: 7px 8px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.92rem;
    font-family: inherit;
    font-weight: 500;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    /* Hide browser spinner arrows */
    -moz-appearance: textfield;
}
.strength-num-input::-webkit-outer-spin-button,
.strength-num-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.strength-num-input.weight-input { width: 72px; }
.strength-num-input.reps-input   { width: 56px; }

.strength-num-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.strength-num-input::placeholder {
    color: var(--text-dim);
    font-weight: 400;
}

/* Locked input state */
.strength-num-input.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--bg-card);
}

/* Divider between Set and History/Stat groups with centered label */
.strength-field-divider {
    display: flex;
    align-items: center;
    text-align: center;
    width: 100%;
    margin: 6px 0 4px 0;
    color: var(--text-dim);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.strength-field-divider::before,
.strength-field-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.strength-field-divider span {
    padding: 0 10px;
    user-select: none;
}

/* Interactive Max / Most Recent Stat Row */
.strength-stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 28px;
    width: 100%;
}

.btn-stat-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 62px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    user-select: none;
    transition: all 0.15s ease;
    flex-shrink: 0;
    text-align: center;
}

.btn-stat-toggle:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: var(--primary);
}

.btn-stat-toggle:active {
    transform: scale(0.96);
}

.strength-stat-content {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.strength-stat-weight {
    font-weight: 700;
    color: var(--text-main);
}

.strength-stat-reps,
.strength-stat-times {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.strength-rep-picker {
    padding: 1px 6px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.strength-rep-picker:hover {
    border-color: var(--primary);
    background-color: rgba(16, 185, 129, 0.08);
}

.strength-rep-picker:focus {
    border-color: var(--primary);
}

.strength-stat-empty {
    font-size: 0.8rem;
    color: var(--text-dim);
    font-style: italic;
}

/* Strength Card Bottom Actions & Note Button */
.strength-card-bottom-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: auto;
    padding-top: 6px;
}

.btn-strength-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-dim);
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-strength-note:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-strength-note:active {
    transform: scale(0.95);
}

.btn-strength-note.has-note {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
}

.strength-header-note-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-sm);
    color: var(--primary);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.strength-header-note-icon:hover {
    background: rgba(16, 185, 129, 0.24);
    transform: scale(1.08);
}

.strength-header-note-icon.hidden {
    display: none;
}

/* Speech Bubble Note Popover */
.strength-note-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: transparent;
    touch-action: pan-y;
}

.strength-note-overlay.hidden {
    display: none;
    pointer-events: none;
}

.strength-note-speech-bubble {
    position: fixed;
    width: 250px;
    background: var(--bg-card);
    border: 1px solid rgba(16, 185, 129, 0.45);
    box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.75), 0 0 15px rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-md);
    padding: 8px;
    box-sizing: border-box;
    transform-origin: bottom right;
    animation: bubbleMorphIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: auto;
}

.strength-note-speech-bubble.arrow-top {
    transform-origin: top right;
}

@keyframes bubbleMorphIn {
    0% {
        opacity: 0;
        transform: scale(0.2) translateY(10px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.strength-note-bubble-textarea {
    width: 100%;
    height: 64px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.86rem;
    font-family: inherit;
    line-height: 1.4;
    padding: 8px 10px;
    resize: none;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.strength-note-bubble-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.strength-note-bubble-textarea::placeholder {
    color: var(--text-dim);
    font-size: 0.82rem;
}

/* Arrow / tail for speech bubble */
.strength-note-bubble-arrow {
    position: absolute;
    bottom: -6px;
    right: 12px;
    width: 10px;
    height: 10px;
    background: var(--bg-card);
    border-right: 1px solid rgba(16, 185, 129, 0.45);
    border-bottom: 1px solid rgba(16, 185, 129, 0.45);
    transform: rotate(45deg);
}

.strength-note-speech-bubble.arrow-top .strength-note-bubble-arrow {
    top: -6px;
    bottom: auto;
    border-right: none;
    border-bottom: none;
    border-left: 1px solid rgba(16, 185, 129, 0.45);
    border-top: 1px solid rgba(16, 185, 129, 0.45);
}

/* Strength Settings List */
.strength-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.strength-lifts-settings-list,
.pages-settings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.strength-lift-setting-item,
.page-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.strength-lift-setting-item:hover,
.page-setting-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.strength-lift-setting-item.dragging,
.page-setting-item.dragging {
    opacity: 0.6;
    border: 1px dashed #38bdf8;
    background: rgba(56, 189, 248, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transform: scale(1.02);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.strength-lift-setting-left,
.page-setting-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    -webkit-user-select: none;
    user-select: none;
}

.strength-drag-handle {
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    padding: 6px 6px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    touch-action: pan-y;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, background 0.15s ease;
}

.strength-drag-handle:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

.strength-drag-handle:active {
    cursor: grabbing;
}

.strength-lift-setting-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.strength-lift-setting-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.strength-lift-setting-hint {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.strength-lift-setting-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-lift-tag {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dim);
    margin-left: 6px;
    letter-spacing: 0.01em;
}

.btn-delete-custom-lift {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease;
    line-height: 1;
}

.btn-delete-custom-lift:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    transform: scale(1.1);
}

.page-setting-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-name-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 3px;
    border-radius: var(--radius-sm);
    transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease;
    line-height: 1;
}

.page-name-edit-btn:hover {
    color: var(--primary);
    background: rgba(56, 189, 248, 0.12);
    transform: scale(1.1);
}

.page-name-edit-form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0;
    flex-wrap: wrap;
}

.page-name-input {
    padding: 3px 8px;
    font-size: 0.85rem;
    height: 28px;
    width: 140px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.page-name-input:focus {
    outline: none;
    border-color: var(--border-focus);
}

.btn-xs {
    padding: 2px 8px;
    font-size: 0.75rem;
    height: 28px;
    line-height: 1;
}

.page-name-default-hint {
    color: var(--text-dim);
    font-size: 0.82em;
    font-weight: normal;
    margin-left: 2px;
}

/* Strength Sync Status Pill (Offline & Online Outbox Indicator) */
.strength-sync-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    letter-spacing: 0.02em;
    user-select: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.strength-sync-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-dim);
    flex-shrink: 0;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.strength-sync-pill.synced {
    color: var(--text-muted);
    border-color: rgba(255, 255, 255, 0.08);
}
.strength-sync-pill.synced .strength-sync-dot {
    background-color: #10b981;
}

.strength-sync-pill.syncing {
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
    background: rgba(96, 165, 250, 0.08);
}
.strength-sync-pill.syncing .strength-sync-dot {
    background-color: #60a5fa;
    animation: syncDotPulse 1s infinite alternate;
}

.strength-sync-pill.offline,
.strength-sync-pill.pending {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.1);
}
.strength-sync-pill.offline .strength-sync-dot,
.strength-sync-pill.pending .strength-sync-dot {
    background-color: #f59e0b;
}

@keyframes syncDotPulse {
    from { transform: scale(0.8); opacity: 0.6; }
    to { transform: scale(1.3); opacity: 1; }
}

body.minimal-view .strength-sync-pill {
    display: none !important;
}

/* Lock button (navbar, strength page past dates) */
.strength-lock-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.strength-lock-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.strength-lock-btn--unlocked {
    color: var(--primary);
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.08);
}

.strength-lock-btn--unlocked:hover {
    background: rgba(16, 185, 129, 0.15);
}

/* Responsive: stack field groups vertically on screens <= 640px */
@media (max-width: 640px) {
    .strength-lift-fields {
        gap: 8px;
    }

    .strength-num-input.weight-input { width: 68px; }
    .strength-num-input.reps-input   { width: 52px; }
}

/* ==========================================================================
   Account Tier Badges & Premium Feature Modal
   ========================================================================== */

.badge-tier {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.badge-free {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.badge-premium {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 88, 12, 0.25));
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.45);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15);
}

.page-setting-premium-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 7px;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 88, 12, 0.25));
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.45);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.15);
    margin-left: 6px;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.page-setting-premium-badge:hover,
.page-setting-premium-badge:focus-visible {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(217, 119, 6, 0.32));
    color: #fef08a;
    border-color: rgba(251, 191, 36, 0.7);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
    outline: none;
}

.page-setting-premium-badge:active {
    transform: scale(0.96);
}

.page-setting-premium-star {
    font-size: 0.72rem;
    line-height: 1;
    display: inline-block;
}

.page-setting-premium-text {
    line-height: 1;
    display: inline-block;
}

.page-setting-premium-badge.locked {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.22));
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.45);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.15);
    opacity: 1;
    cursor: pointer;
}

.page-setting-premium-badge.locked:hover,
.page-setting-premium-badge.locked:focus-visible {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(217, 119, 6, 0.32));
    color: #fef08a;
    border-color: rgba(251, 191, 36, 0.7);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
    opacity: 1;
    outline: none;
}

@media (max-width: 768px) {
    .page-setting-premium-badge {
        padding: 2px 6px;
        min-width: 20px;
        margin-left: 5px;
        gap: 0;
    }

    .page-setting-premium-badge .page-setting-premium-text {
        display: none;
    }
}

.premium-modal-content {
    max-width: 480px;
    text-align: center;
    border: 1px solid rgba(245, 158, 11, 0.35);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.15);
}

.premium-modal-header-icon {
    display: flex;
    justify-content: center;
    padding-top: 24px;
    padding-bottom: 4px;
}

.premium-star-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #111827;
    font-size: 2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.5);
    line-height: 1;
}

.premium-modal-header {
    border-bottom: none;
    padding: 12px 24px 8px 24px;
    justify-content: center;
    position: relative;
}

.premium-modal-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    background: linear-gradient(135deg, #ffffff, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.premium-modal-header .modal-close {
    position: absolute;
    right: 16px;
    top: 12px;
}

.premium-modal-body {
    padding: 8px 24px 20px 24px;
    text-align: left;
}

.premium-modal-desc {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-muted);
    margin-bottom: 18px;
    text-align: center;
}

.premium-benefits-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 16px;
}

.premium-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.4;
}

.premium-benefit-check {
    color: #10b981;
    font-weight: 800;
    flex-shrink: 0;
}

.premium-modal-footer {
    padding: 16px 24px 24px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ==========================================================================
   Welcome / First-Login Onboarding Modal
   ========================================================================== */
.welcome-modal-content {
    max-width: 440px;
    width: 90%;
    text-align: center;
    padding: 28px 24px 24px;
}

.welcome-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.welcome-modal-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 0 16px rgba(72, 51, 143, 0.45);
    margin-bottom: 6px;
    display: block;
}

.welcome-modal-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.welcome-modal-body {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 22px;
}

.welcome-modal-body p {
    margin-bottom: 12px;
    color: var(--text-main);
}

.welcome-tip-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: left;
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.welcome-tip-box svg {
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.welcome-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.welcome-modal-actions .btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ==========================================================================
   Changelog & Version History Modal
   ========================================================================== */
.changelog-modal-content {
    max-width: 540px;
    width: 90%;
    max-height: 66vh;
    max-height: 66dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}

.changelog-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.changelog-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 22px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.changelog-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.changelog-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.changelog-release-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.changelog-release-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.changelog-release-card.latest-release {
    border-color: rgba(109, 40, 217, 0.45);
    background: linear-gradient(180deg, rgba(72, 51, 143, 0.12) 0%, var(--bg-card) 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.changelog-release-card.unreleased-release {
    border-color: rgba(245, 158, 11, 0.45);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, var(--bg-card) 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.changelog-release-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.changelog-version-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.changelog-version-badge {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    background: var(--primary);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.02em;
}

.changelog-version-badge.unreleased-badge {
    background: #d97706;
}

.changelog-latest-pill {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 2px 7px;
    border-radius: 4px;
}

.changelog-latest-pill.unreleased-pill {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.35);
}

.changelog-release-date {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.changelog-section {
    margin-top: 10px;
}

.changelog-section:first-child {
    margin-top: 0;
}

.changelog-section-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.changelog-tag {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 2px 7px;
    border-radius: 4px;
    display: inline-block;
}

.changelog-tag.tag-added {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.changelog-tag.tag-fixed {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.changelog-tag.tag-improved {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.changelog-tag.tag-changed {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.changelog-tag.tag-general {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.changelog-list {
    margin: 0 0 4px 0;
    padding-left: 18px;
    list-style-type: disc;
}

.changelog-item {
    font-size: 0.86rem;
    color: var(--text-main);
    margin-bottom: 6px;
    line-height: 1.45;
}

.changelog-item strong {
    color: #ffffff;
    font-weight: 600;
}

.changelog-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.changelog-commit-info {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.changelog-commit-info code {
    font-family: monospace;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-main);
}

.changelog-history-toggle-wrap {
    display: flex;
    justify-content: center;
    padding-top: 6px;
    padding-bottom: 4px;
}

.changelog-toggle-btn {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(109, 40, 217, 0.1);
    border: 1px solid rgba(109, 40, 217, 0.3);
    border-radius: var(--radius-sm);
    padding: 7px 16px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.changelog-toggle-btn:hover {
    background: rgba(109, 40, 217, 0.2);
    border-color: rgba(109, 40, 217, 0.5);
}

/* ── PWA Install Modal Styles (Android & iOS) ────────────────────────────── */
.install-modal-content {
    max-width: 440px;
    width: 90%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalScaleIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.install-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 20px 14px;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.install-modal-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(72, 51, 143, 0.4);
    flex-shrink: 0;
}

.install-modal-titles {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    padding-right: 18px;
}

.install-modal-titles .modal-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.install-modal-subtitle {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

.install-modal-body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.install-platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: rgba(109, 40, 217, 0.15);
    color: #c084fc;
    border: 1px solid rgba(109, 40, 217, 0.3);
    align-self: flex-start;
}

.install-steps-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.install-step-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: background 0.15s ease;
}

.install-step-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.install-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.install-step-text {
    font-size: 0.86rem;
    color: var(--text-main);
    line-height: 1.4;
    flex: 1;
}

.install-step-text strong {
    color: #ffffff;
    font-weight: 600;
}

.install-inline-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 2px 4px;
    margin: 0 2px;
    color: var(--text-main);
}

.install-docs-link-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-top: 2px;
}

.install-docs-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary);
    text-decoration: underline;
    transition: color 0.15s ease;
}

.install-docs-link:hover {
    color: #a855f7;
}

.install-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
}

@media (max-width: 640px) {
    .settings-modal-content {
        width: 96%;
        height: 88vh;
        height: 88dvh;
        max-height: 88dvh;
    }

    .settings-tabs-header {
        padding: 0 12px;
    }

    .settings-tab {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .settings-modal-body {
        padding: 18px 16px;
    }

    .changelog-modal-content {
        width: 92%;
        max-height: 66dvh;
        max-height: 66vh;
    }

    .changelog-modal-header {
        padding: 12px 16px;
    }

    .changelog-modal-body {
        padding: 12px 16px;
    }

    .changelog-modal-footer {
        padding: 10px 16px;
    }

    .install-modal-content {
        width: 92%;
    }
}

/* ==============================================================================
   Google Health Page Components
   ============================================================================== */

.googlehealth-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

@media (max-width: 900px) {
    .googlehealth-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .googlehealth-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

.googlehealth-stat-card {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 90px;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.googlehealth-stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.googlehealth-stat-val {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.15;
    margin: 4px 0 2px;
    letter-spacing: -0.02em;
}

.googlehealth-stat-val .gh-unit {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-left: 3px;
}

.googlehealth-stat-sub {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ==============================================================================
   Google Health Steps Leaderboard Card
   ============================================================================== */

.gh-leaderboard-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 14px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.gh-leaderboard-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.15s ease;
}

.gh-leaderboard-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.gh-leaderboard-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gh-leaderboard-trophy-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.gh-leaderboard-title-meta {
    display: flex;
    flex-direction: column;
}

.gh-leaderboard-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.gh-leaderboard-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.gh-leaderboard-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gh-user-rank-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: rgba(56, 189, 248, 0.15);
    color: var(--primary);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.gh-leaderboard-toggle-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.gh-leaderboard-toggle-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

.gh-collapse-arrow {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.gh-leaderboard-card.collapsed .gh-collapse-arrow {
    transform: rotate(-90deg);
}

.gh-leaderboard-body {
    max-height: 480px;
    overflow-y: auto;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.25s ease;
    padding: 6px 14px 14px;
}

.gh-leaderboard-card.collapsed .gh-leaderboard-body {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    pointer-events: none;
}

.gh-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gh-leaderboard-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
}

.gh-leaderboard-row.is-current-user {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.12);
}

.gh-leaderboard-rank {
    width: 26px;
    font-size: 0.95rem;
    font-weight: 800;
    text-align: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.gh-leaderboard-rank.rank-1 { color: #eab308; font-size: 1.15rem; }
.gh-leaderboard-rank.rank-2 { color: #94a3b8; font-size: 1.1rem; }
.gh-leaderboard-rank.rank-3 { color: #d97706; font-size: 1.05rem; }

.gh-leaderboard-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.gh-leaderboard-avatar img,
.gh-leaderboard-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-full);
}

.gh-leaderboard-row.is-current-user .gh-leaderboard-avatar {
    background: var(--primary);
    color: #fff;
}

.gh-leaderboard-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.gh-leaderboard-name-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.gh-leaderboard-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gh-leaderboard-steps-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
}

.gh-leaderboard-steps-text .gh-steps-lbl {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-dim);
    margin-left: 2px;
}

.gh-leaderboard-bar-track {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.gh-leaderboard-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    transition: width 0.4s ease;
}

.gh-leaderboard-row.is-current-user .gh-leaderboard-bar-fill {
    background: linear-gradient(90deg, #38bdf8, #06b6d4);
}

.gh-leaderboard-empty {
    padding: 16px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Activities List */
.googlehealth-activities-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.googlehealth-activity-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    transition: padding 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.googlehealth-activity-card.collapsed {
    padding: 12px 18px;
}

.googlehealth-activity-card.collapsed:hover {
    border-color: rgba(59, 130, 246, 0.4);
}

.activity-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.googlehealth-activity-card.collapsed .activity-card-header {
    margin-bottom: 0;
}

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

.activity-header-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.gh-header-summary-badge {
    font-size: 0.76rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.gh-badge-cals,
.gh-badge-meps {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.gh-activity-collapse-icon {
    color: var(--text-muted);
    transition: transform 0.2s ease, color 0.15s ease;
    flex-shrink: 0;
}

.activity-card-header:hover .gh-activity-collapse-icon {
    color: var(--primary);
}

.googlehealth-activity-card.collapsed .gh-activity-collapse-icon {
    transform: rotate(-90deg);
}

.activity-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.googlehealth-activity-card.collapsed .activity-card-body {
    display: none;
}

.activity-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1 1 auto;
}

.activity-type-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.activity-name-and-time {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.activity-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.activity-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gh-activity-date-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
    line-height: 1.2;
    white-space: nowrap;
    flex-shrink: 0;
}

.activity-time-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-source-tag {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
    border: 1px solid rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .activity-source-tag,
    .activity-type-icon {
        display: none !important;
    }
    .activity-title-group {
        gap: 6px;
    }
    .activity-header-badges {
        gap: 4px;
    }
    .gh-header-summary-badge {
        font-size: 0.72rem;
        padding: 2px 7px;
    }
}

.activity-card-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.activity-metric-col {
    display: flex;
    flex-direction: column;
}

.activity-metric-col .metric-lbl {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.activity-metric-col .metric-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 1px;
}

.activity-card-notes {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.4;
}

/* Activity Heart Rate Zone Proportion Bar & Chips */
.activity-zone-bar-wrapper {
    margin-top: 10px;
    height: 7px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-zone-bar {
    display: flex;
    width: 100%;
    height: 100%;
}

.zone-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.zone-segment-fat-burn {
    background-color: #f59e0b;
}

.zone-segment-cardio {
    background-color: #f97316;
}

.zone-segment-peak {
    background-color: #ef4444;
}

.zone-segment-out {
    background-color: rgba(255, 255, 255, 0.12);
}

.activity-zones-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.zone-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.zone-chip strong {
    color: var(--text-main);
    font-weight: 700;
}

.zone-chip-total {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.25);
    color: #38bdf8;
}

.zone-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-azm {
    background-color: #38bdf8;
}

.dot-fat-burn {
    background-color: #f59e0b;
}

.dot-cardio {
    background-color: #f97316;
}

.dot-peak {
    background-color: #ef4444;
}

/* Activity Heart Rate & Zone Breakdown Chart */
/* ==========================================================================
   MyZone-Equivalent Workout Report & Heart Rate Styles
   ========================================================================== */

.myzone-challenge-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.85));
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.myzone-challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.myzone-challenge-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.myzone-icon {
    font-size: 1.15rem;
}

.myzone-challenge-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
}

.myzone-challenge-dates {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.myzone-challenge-numbers {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.myzone-challenge-stat {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.myzone-stat-num {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ef4444;
}

.myzone-stat-div {
    font-size: 1rem;
    color: var(--text-dim);
}

.myzone-stat-goal {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
}

.myzone-stat-unit {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f87171;
    margin-left: 2px;
}

.myzone-challenge-status {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Google Health Activity Filter Bar */
.googlehealth-filter-bar {
    margin-bottom: 16px;
}

.googlehealth-filter-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.gh-filter-chip {
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.gh-filter-chip:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--text-main);
}

.gh-filter-chip.active {
    background: rgba(59, 130, 246, 0.25);
    border-color: #3b82f6;
    color: #60a5fa;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}

/* Activity Card MyZone Section */
.activity-myzone-section {
    margin-top: 14px;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.myzone-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.myzone-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
}

.myzone-pill-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.myzone-section-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.myzone-stat-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.myzone-stat-badge strong {
    color: var(--text-main);
}

.badge-mhr-effort {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.badge-calories-est {
    background: rgba(249, 115, 22, 0.15);
    color: #fb923c;
    border-color: rgba(249, 115, 22, 0.3);
}

/* 4-Stat Top Banner (Minutes, Avg. Effort, Calories, Avg. HR) */
.myzone-stats-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    padding: 4px 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 12px;
}

.myzone-stat-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.myzone-stat-col-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.01em;
    margin-bottom: 2px;
}

.myzone-stat-col-val {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .myzone-stat-col-val {
        font-size: 1.15rem;
    }
    .myzone-stat-col-label {
        font-size: 0.7rem;
    }
}

/* Chart Layout with Y-Axis & X-Axis */
.myzone-chart-layout {
    display: flex;
    position: relative;
    width: 100%;
    margin-top: 6px;
    margin-bottom: 6px;
}

/* Y-Axis on Left */
.myzone-yaxis-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 46px;
    flex-shrink: 0;
    margin-right: 4px;
}

.myzone-yaxis-title {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
    padding-left: 2px;
    letter-spacing: 0.02em;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.myzone-yaxis-ticks {
    position: relative;
    height: 200px;
    width: 28px;
    border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.myzone-yaxis-ticks span {
    position: absolute;
    right: 8px;
    transform: translateY(50%);
    line-height: 1;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.myzone-yaxis-ticks span::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    width: 5px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
}

.myzone-zone-band {
    position: absolute;
    left: 0;
    right: 0;
    pointer-events: none;
}
.myzone-zone-band.band-red { background: rgba(239, 68, 68, 0.06); }
.myzone-zone-band.band-yellow { background: rgba(234, 179, 8, 0.06); }
.myzone-zone-band.band-green { background: rgba(34, 197, 94, 0.06); }
.myzone-zone-band.band-blue { background: rgba(59, 130, 246, 0.06); }
.myzone-zone-band.band-gray { background: rgba(100, 116, 139, 0.06); }

/* Chart Canvas & Bars */
.myzone-chart-canvas {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.myzone-chart-container {
    position: relative;
    height: 200px;
    width: 100%;
    display: flex;
    align-items: flex-end;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

@media (max-width: 480px) {
    .myzone-yaxis-title,
    .myzone-yaxis-ticks,
    .myzone-chart-container {
        height: 175px;
    }
}

.myzone-interactive-tooltip {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: var(--radius-sm);
    padding: 5px 10px;
    font-size: 0.72rem;
    line-height: 1.35;
    color: #f8fafc;
    pointer-events: none;
    z-index: 30;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    transition: opacity 0.15s ease, transform 0.08s ease;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.myzone-interactive-tooltip.hidden {
    display: none !important;
}

.myzone-interactive-tooltip .mz-tooltip-header {
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 1px;
}

.myzone-interactive-tooltip .mz-tooltip-body {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.68rem;
}

.myzone-interactive-tooltip .mz-tooltip-breakdown {
    font-weight: 500;
    color: #e2e8f0;
    font-size: 0.65rem;
    margin-top: 2px;
    opacity: 0.95;
    white-space: nowrap;
}

.myzone-grid-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.myzone-grid-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.myzone-grid-line.line-100 { border-top: 1px solid rgba(255, 255, 255, 0.4); }
.myzone-grid-line.line-90 { border-top: 1px solid rgba(239, 68, 68, 0.45); }
.myzone-grid-line.line-80 { border-top: 1px solid rgba(234, 179, 8, 0.45); }
.myzone-grid-line.line-70 { border-top: 1px solid rgba(34, 197, 94, 0.45); }
.myzone-grid-line.line-60 { border-top: 1px solid rgba(59, 130, 246, 0.45); }
.myzone-grid-line.line-50 { border-top: 1px solid rgba(148, 163, 184, 0.45); }
.myzone-grid-line.line-40 { border-top: 1px solid rgba(255, 255, 255, 0.35); }

.myzone-bars-track {
    position: relative;
    z-index: 2;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 1px;
    padding-bottom: 0px;
}

.myzone-minute-bar {
    flex: 1 1 0%;
    min-width: 1px;
    border-radius: 1px 1px 0 0;
    transition: height 0.3s ease, filter 0.2s ease, transform 0.15s ease;
    cursor: pointer;
    position: relative;
}

.myzone-minute-bar:hover,
.myzone-minute-bar.active-bar {
    filter: brightness(1.5) drop-shadow(0 0 4px rgba(255, 255, 255, 0.8));
    transform: scaleY(1.05);
    z-index: 10;
}

.zone-bar-0 { background: #cbd5e1; }
.zone-bar-gray { background: #64748b; }
.zone-bar-blue { background: #3b82f6; }
.zone-bar-green { background: #22c55e; }
.zone-bar-yellow { background: #eab308; }
.zone-bar-red { background: #ef4444; }

/* X-Axis & Time Label */
.myzone-xaxis-track {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    margin-top: 4px;
    padding: 0 4px;
    overflow: hidden;
}

.myzone-xaxis-track span {
    white-space: nowrap;
    line-height: 1.2;
}

.myzone-xaxis-track span.tick-start {
    text-align: left;
}

.myzone-xaxis-track span.tick-mid {
    text-align: center;
}

.myzone-xaxis-track span.tick-end {
    text-align: right;
}

.myzone-xaxis-center-label {
    text-align: center;
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
    margin-bottom: 4px;
}

.myzone-graph-footer {
    margin-top: 8px;
    font-size: 0.68rem;
    color: var(--text-dim);
    text-align: right;
    font-style: italic;
}

/* Zone Breakdown Grid / Table */
.myzone-zones-table-wrap {
    margin-top: 10px;
    overflow-x: auto;
}

.myzone-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72rem;
    text-align: right;
}

.myzone-table th {
    padding: 6px 8px;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.2);
}

.myzone-table td {
    padding: 6px 8px;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.myzone-table td.col-zone-name, .myzone-table th.col-zone-name {
    text-align: left;
}

.myzone-table tr.total-row {
    font-weight: 800;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.02);
}

.myzone-table tr.total-row td {
    color: #f87171;
}

.zone-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.zone-dot-0 { background: #e2e8f0; }
.zone-dot-gray { background: #94a3b8; }
.zone-dot-blue { background: #3b82f6; }
.zone-dot-green { background: #22c55e; }
.zone-dot-yellow { background: #eab308; }
.zone-dot-red { background: #ef4444; }

/* Actions Bar (Copy Report Button) */
.myzone-actions-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    gap: 8px;
}

.btn-copy-myzone {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.btn-copy-myzone:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Empty State */
.googlehealth-empty-state {
    padding: 48px 24px;
    text-align: center;
    border: 1px dashed var(--border-color);
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
}

.googlehealth-empty-icon {
    font-size: 2.8rem;
    margin-bottom: 12px;
}

.googlehealth-empty-state h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.googlehealth-empty-state p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.googlehealth-empty-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Google Health OAuth & Sync Badges */
.gh-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.gh-status-badge.connected {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.gh-status-badge.disconnected {
    background-color: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.gh-status-badge.configured {
    background-color: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    cursor: pointer;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-danger:hover {
    background-color: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.btn.syncing svg,
.btn-secondary.syncing svg {
    animation: spin 1s linear infinite;
}

/* Keyword Tag Input Component */
.keyword-tags-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    min-height: 42px;
    cursor: text;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.keyword-tags-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.keyword-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(56, 189, 248, 0.15);
    color: var(--primary);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 3px 8px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    animation: fadeIn 0.15s ease-in;
}

.keyword-tag-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin-left: 2px;
    opacity: 0.75;
    transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.keyword-tag-remove-btn:hover {
    opacity: 1;
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.keyword-tag-input-inline {
    flex: 1;
    min-width: 130px;
    border: none !important;
    background: transparent !important;
    color: var(--text-main) !important;
    font-size: 0.88rem !important;
    padding: 4px 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.keyword-tag-input-inline::placeholder {
    color: var(--text-dim);
    font-size: 0.82rem;
}

/* Centered & Soft Styled Google Health Disconnect Wipe Card */
.gh-disconnect-wipe-card {
    margin-top: 10px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    box-sizing: border-box;
    width: 100%;
}

.gh-disconnect-wipe-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    color: #fca5a5;
    font-size: 0.86rem;
    font-weight: 600;
}

.gh-disconnect-checkbox {
    accent-color: #ef4444;
    width: 16px;
    height: 16px;
    cursor: pointer;
    background-color: #1e293b;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 4px;
}

.gh-disconnect-wipe-help {
    color: var(--text-muted);
    font-size: 0.74rem;
    line-height: 1.35;
    max-width: 320px;
    margin: 0 auto;
}




