:root {
    /* Palette */
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --secondary-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    
    --bg-body: #f8fafc;
    --surface: #ffffff;
    --surface-translucent: rgba(255, 255, 255, 0.85);
    
    --text-main: #0f172a;
    --text-sub: #64748b;
    --text-light: #94a3b8;
    
    --shadow-sm: 0 2px 4px rgba(148, 163, 184, 0.1);
    --shadow-md: 0 8px 20px rgba(148, 163, 184, 0.15);
    --shadow-float: 0 20px 40px -10px rgba(99, 102, 241, 0.3);
    
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-body: #0f172a;
    --surface: #1e293b;
    --surface-translucent: rgba(30, 41, 59, 0.85);
    
    --text-main: #f1f5f9;
    --text-sub: #94a3b8;
    --text-light: #64748b;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.4);
    --shadow-float: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .card {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .circle-bg {
    stroke: #334155;
}

[data-theme="dark"] .macro-track {
    background: #334155;
}

[data-theme="dark"] .meal-header {
    background: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid #334155;
}

[data-theme="dark"] .entry-item {
    border-bottom: 1px solid #334155;
}

[data-theme="dark"] .entry-item:hover {
    background: #1e293b;
}

[data-theme="dark"] .date-btn:hover {
    background: #1e293b;
}

[data-theme="dark"] .mini-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .mini-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .app-brand,
[data-theme="dark"] .app-brand span {
    color: #ffffff;
}

[data-theme="dark"] .date-navigator {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .icon-circle {
    background: #334155;
}

[data-theme="dark"] .del-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

[data-theme="dark"] .chart-container {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .search-bar {
    background: #334155;
    color: var(--text-main);
    border-color: #475569;
}

[data-theme="dark"] .search-bar:focus {
    background: #475569;
    border-color: var(--primary);
}

[data-theme="dark"] .tab-group {
    background: #334155;
}

[data-theme="dark"] .tab-pill.active {
    background: #1e293b;
    color: var(--primary);
}

[data-theme="dark"] .form-input {
    background: #334155;
    border-color: #475569;
    color: var(--text-main);
}

[data-theme="dark"] .form-input:focus {
    border-color: var(--primary);
    background: #475569;
}

[data-theme="dark"] .list-item {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .list-item:hover {
    border-color: #475569;
    background: #334155;
}

[data-theme="dark"] .modal {
    background: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] #theme-toggle {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] #theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] #user-initial-display {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .bottom-nav {
    background: rgba(15, 23, 42, 0.95);
}

[data-theme="dark"] .modal-sheet {
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; outline: none; }

body { 
    background-color: var(--bg-body); 
    color: var(--text-main); 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    padding-bottom: 80px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Layout & Typography --- */
.container { max-width: 500px; margin: 0 auto; padding: 20px; width: 100%; }

/* Hide main content until authenticated */
.container:not(.authenticated),
.date-navigator:not(.authenticated) {
    display: none !important;
}

.container.authenticated {
    display: block;
}

.date-navigator.authenticated {
    display: flex;
}

h1, h2, h3 { letter-spacing: -0.025em; }

/* --- Header --- */
header {
    background: var(--surface-translucent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255,255,255,0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-brand { 
    font-family: 'Montserrat', sans-serif;
    font-weight: 800; 
    font-size: 1.4rem; 
    color: #000000;
    display: flex; align-items: center; gap: 10px; 
}

.app-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.app-brand span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: #000000;
}

/* Hide email on mobile, show logout button only */
.user-email-display {
    display: none;
}

.logout-btn {
    min-width: auto;
}

.logout-text {
    display: inline;
}

/* Show email on larger screens */
@media (min-width: 640px) {
    .user-email-display {
        display: inline;
    }
    
    .logout-text {
        display: inline;
    }
}

/* Mobile: icon-only logout button */
@media (max-width: 639px) {
    .logout-btn {
        padding: 8px !important;
        min-width: 36px;
        justify-content: center;
    }
    
    .logout-text {
        display: none;
    }
}

/* --- Date Nav --- */
.date-navigator {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    margin: 10px 20px;
    padding: 6px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 1;
}
.date-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-sub);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center;
}
.date-btn:hover { background: var(--bg-body); color: var(--primary); }
.current-date { font-weight: 700; font-size: 0.95rem; margin: 0 20px; min-width: 100px; text-align: center; color: var(--text-main); }

/* --- Cards --- */
.card { 
    background: var(--surface); 
    border-radius: var(--radius-lg); 
    padding: 24px; 
    box-shadow: var(--shadow-md); 
    margin-bottom: 24px; 
    position: relative; 
    overflow: hidden; 
    border: 1px solid rgba(255,255,255,0.6);
}

/* --- Main Dashboard Circle --- */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: center; }

.progress-circle-container { position: relative; width: 150px; height: 150px; margin: 0 auto; filter: drop-shadow(0 10px 15px rgba(99, 102, 241, 0.15)); }
svg.progress-circle { transform: rotate(-90deg); width: 100%; height: 100%; }
.circle-bg { fill: none; stroke: #f1f5f9; stroke-width: 10; stroke-linecap: round; }
.circle-fg { fill: none; stroke: url(#gradient); stroke-width: 10; stroke-dasharray: 339.292; stroke-dashoffset: 339.292; transition: stroke-dashoffset 1.2s cubic-bezier(0.2, 0.8, 0.2, 1); stroke-linecap: round; }

.circle-content { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; }
.circle-val { font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--text-main); letter-spacing: -1px; }
.circle-label { font-size: 0.8rem; color: var(--text-sub); font-weight: 600; margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }

.stat-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.stat-row:last-child { margin-bottom: 0; }
.stat-label { font-size: 0.8rem; color: var(--text-sub); font-weight: 600; margin-bottom: 2px; }
.stat-val { font-size: 1.1rem; font-weight: 700; color: var(--text-main); }
.icon-box { 
    width: 36px; height: 36px; border-radius: 10px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 1rem;
}

/* --- Macros --- */
.macro-bars { margin-top: 24px; }
.macro-header { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 8px; color: var(--text-sub); font-weight: 500; }
.macro-track { height: 10px; background: #f1f5f9; border-radius: 6px; overflow: hidden; display: flex; }
.macro-seg { height: 100%; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1); position: relative; }
.macro-seg::after { content:''; position: absolute; top:0; left:0; right:0; bottom:0; background: linear-gradient(to bottom, rgba(255,255,255,0.2), transparent); }

.seg-p { background: #10b981; }
.seg-c { background: #6366f1; }
.seg-f { background: #f59e0b; }

.macro-legend { display: flex; justify-content: space-between; margin-top: 12px; }
.legend-item { font-size: 0.75rem; display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-sub); }
.dot { width: 10px; height: 10px; border-radius: 4px; }

/* --- Quick Actions --- */
.actions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }

@media (max-width: 480px) {
    .actions-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .mini-card {
        padding: 16px 12px;
    }
    
    .mini-val {
        font-size: 1.1rem;
    }
}
.mini-card { 
    background: var(--surface); 
    padding: 20px; 
    border-radius: var(--radius-md); 
    box-shadow: var(--shadow-sm); 
    display: flex; flex-direction: column; align-items: center; text-align: center; 
    cursor: pointer; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}
.mini-card:active { transform: scale(0.96); }
.mini-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(99, 102, 241, 0.2); }

.icon-circle { 
    width: 48px; height: 48px; border-radius: 16px; 
    display: flex; align-items: center; justify-content: center; 
    margin-bottom: 12px; font-size: 1.4rem; 
    background: var(--bg-body);
    transition: background 0.3s;
}
.mini-label { font-size: 0.85rem; color: var(--text-sub); font-weight: 600; }
.mini-val { font-size: 1.25rem; font-weight: 800; color: var(--text-main); margin-top: 2px; }

/* --- Diary Section --- */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding: 0 4px; }
.section-title { font-size: 1.1rem; font-weight: 800; color: var(--text-main); }

.meal-card { 
    background: var(--surface); 
    border-radius: var(--radius-md); 
    box-shadow: var(--shadow-sm); 
    margin-bottom: 16px; 
    overflow: hidden; 
    transition: transform 0.2s;
}
.meal-header { 
    padding: 16px 20px; 
    background: rgba(248, 250, 252, 0.5); 
    border-bottom: 1px solid #f1f5f9; 
    display: flex; justify-content: space-between; align-items: center; 
}
.meal-name { font-weight: 700; font-size: 1rem; color: var(--text-main); }
.meal-cals { font-weight: 700; color: var(--primary); font-size: 0.9rem; background: rgba(99, 102, 241, 0.1); padding: 4px 10px; border-radius: 20px; }

.entry-item { 
    padding: 16px 20px; 
    border-bottom: 1px solid #f1f5f9; 
    display: flex; justify-content: space-between; align-items: center; 
    transition: background 0.2s;
}
.entry-item:last-child { border-bottom: none; }
.entry-item:hover { background: #f8fafc; }

.entry-details h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; color: var(--text-main); }
.entry-details p { font-size: 0.75rem; color: var(--text-sub); font-weight: 500; }
.del-btn { 
    width: 32px; height: 32px; 
    border-radius: 10px; 
    display: flex; align-items: center; justify-content: center;
    color: #cbd5e1; 
    cursor: pointer; 
    transition: all 0.2s; 
}
.del-btn:hover { background: #fee2e2; color: #ef4444; }

/* --- Bottom Nav --- */
.bottom-nav { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    right: 0;
    width: 100%;
    background: var(--surface-translucent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 8px 16px; 
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    display: flex; 
    justify-content: space-around; 
    align-items: center;
    z-index: 90;
    min-height: 70px;
}

.nav-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    gap: 4px; 
    color: var(--text-sub); 
    cursor: pointer; 
    font-size: 0.65rem; 
    font-weight: 600; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 8px 16px;
    border-radius: 12px;
    min-width: 60px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.nav-item i { 
    font-size: 1.5rem; 
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 2px;
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.nav-item.active { 
    color: var(--primary);
}

.nav-item.active i { 
    transform: scale(1.1);
    color: var(--primary);
}

.nav-item:active {
    transform: scale(0.95);
    background: rgba(99, 102, 241, 0.1);
}

.fab-main { 
    width: 56px; 
    height: 56px; 
    background: var(--primary-gradient); 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: white; 
    font-size: 1.5rem; 
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none;
    position: relative;
    margin: 0 8px;
    -webkit-tap-highlight-color: transparent;
    z-index: 1;
}

.fab-main::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--primary-gradient);
    opacity: 0.2;
    z-index: -1;
    transition: all 0.3s;
}

.fab-main:active { 
    transform: scale(0.9);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.fab-main:hover::before {
    inset: -8px;
    opacity: 0.3;
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .bottom-nav {
        padding: 10px 12px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        min-height: 68px;
    }
    
    .nav-item {
        padding: 6px 12px;
        min-width: 56px;
    }
    
    .nav-item i {
        font-size: 1.4rem;
    }
    
    .nav-item span {
        font-size: 0.65rem;
    }
    
    .fab-main {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
    }
}

/* Dark theme adjustments for navbar */
[data-theme="dark"] .bottom-nav {
    background: rgba(30, 41, 59, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .nav-item {
    color: var(--text-sub);
}

[data-theme="dark"] .nav-item.active {
    color: var(--primary);
}

[data-theme="dark"] .nav-item:active {
    background: rgba(99, 102, 241, 0.15);
}

/* --- Modals & Forms --- */
.modal { 
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(15, 23, 42, 0.6); 
    z-index: 100; 
    backdrop-filter: blur(8px); 
    opacity: 0; transition: opacity 0.3s;
}
.modal.active { display: flex; justify-content: center; align-items: flex-end; opacity: 1; }

.modal-sheet { 
    background: var(--surface); 
    width: 100%; max-width: 600px; 
    border-radius: 32px 32px 0 0; 
    padding: 32px 24px; 
    max-height: 90vh; overflow-y: auto; 
    transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
    box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
}
.modal.active .modal-sheet { transform: translateY(0); }

@media(min-width: 600px) { 
    .modal.active { align-items: center; } 
    .modal-sheet { border-radius: 24px; width: 90%; max-width: 480px; transform: scale(0.9); opacity: 0; } 
    .modal.active .modal-sheet { transform: scale(1); opacity: 1; }
}

.search-bar { 
    width: 100%; padding: 16px 20px; 
    border: 2px solid transparent; 
    border-radius: 16px; font-size: 1rem; 
    background: #f1f5f9; 
    outline: none; margin-bottom: 20px; 
    transition: all 0.2s; 
    font-weight: 500;
}
.search-bar:focus { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1); }

.tab-group { display: flex; gap: 8px; margin-bottom: 24px; padding: 4px; background: #f1f5f9; border-radius: 14px; }
.tab-pill { 
    flex: 1; text-align: center; padding: 10px; 
    border-radius: 10px; font-size: 0.9rem; font-weight: 600; 
    color: var(--text-sub); cursor: pointer; transition: all 0.2s; 
}
.tab-pill.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

.form-label { font-size: 0.85rem; font-weight: 700; color: var(--text-main); margin-bottom: 8px; display: block; letter-spacing: 0.02em; }
.form-input { 
    width: 100%; padding: 14px 16px; 
    border: 1px solid #e2e8f0; border-radius: 12px; 
    font-size: 1rem; margin-bottom: 20px; 
    background: #fff; transition: border-color 0.2s;
    font-family: 'Plus Jakarta Sans', sans-serif;
}
.form-input:focus { border-color: var(--primary); outline: none; }

.btn-block { 
    width: 100%; padding: 18px; 
    background: var(--primary-gradient); 
    color: white; border: none; 
    border-radius: 16px; 
    font-weight: 700; font-size: 1.05rem; 
    cursor: pointer; 
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4); 
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-block:active { transform: scale(0.98); box-shadow: 0 5px 15px -5px rgba(99, 102, 241, 0.4); }
.btn-block:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.btn-secondary {
    background: var(--surface);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-secondary:active {
    box-shadow: var(--shadow-sm);
    transform: scale(0.98);
}

[data-theme="dark"] .btn-secondary {
    background: var(--surface);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .btn-secondary:hover {
    background: #334155;
    border-color: rgba(255, 255, 255, 0.15);
}

.list-item { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 16px; margin-bottom: 8px; 
    background: #fff; border: 1px solid #f1f5f9; border-radius: 16px; 
    cursor: pointer; transition: all 0.2s;
}
.list-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: #e2e8f0; }

/* Bar Chart */
.bar { border-radius: 6px 6px 0 0; }
.bar.over { background: var(--danger-gradient); }
.bar:not(.over) { background: var(--primary-gradient); }

.view-section { display: none; animation: fadeIn 0.4s ease-out; }
.view-section.active { display: block; }

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

/* Chart Container */
/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:active {
    transform: scale(0.98);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-sub);
    margin-top: 4px;
    font-weight: 500;
}

/* Macro Breakdown */
.macro-stat {
    margin-bottom: 20px;
}

.macro-stat:last-child {
    margin-bottom: 0;
}

.macro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.macro-value {
    color: var(--text-sub);
    font-weight: 500;
}

.macro-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.macro-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

[data-theme="dark"] .macro-bar-container {
    background: rgba(255, 255, 255, 0.1);
}

/* Activity Summary */
.activity-stat {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--surface);
    border-radius: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.activity-stat:last-child {
    margin-bottom: 0;
}

.activity-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

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

.activity-label {
    font-size: 0.8rem;
    color: var(--text-sub);
    margin-top: 4px;
    font-weight: 500;
}

.activity-total {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 2px;
}

/* Insights */
.insight-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border-radius: 12px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.5;
}

.insight-item:last-child {
    margin-bottom: 0;
}

.insight-item i {
    font-size: 1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.chart-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 200px;
    padding: 20px 0;
    gap: 8px;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    position: relative;
}

.bar-val {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    min-height: 20px;
}

.bar {
    width: 100%;
    min-height: 4px;
    transition: height 0.5s ease-out;
    border-radius: 6px 6px 0 0;
}

.bar-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-sub);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

