:root {
    --bg: #0d1117;
    --surface: #161b22;
    --surface2: #1c2333;
    --border: #30363d;
    --text: #e6edf3;
    --text-dim: #8b949e;
    --cyan: #00d4ff;
    --green: #3fb950;
    --red: #f85149;
    --orange: #d29922;
    --purple: #bc8cff;
    --pink: #f778ba;
    --radius: 8px;
    --glass: rgba(22, 27, 34, 0.7);
    --glass-border: rgba(48, 54, 61, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; min-height: 100vh; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Top Bar ===== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}
.top-bar-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 3px;
    text-decoration: none;
}
.top-bar-brand:hover { text-decoration: none; opacity: 0.85; }
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.top-bar-user {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 500;
}
.top-bar-pill {
    padding: 4px 14px;
    background: var(--cyan);
    color: #000;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}
.top-bar-pill:hover { text-decoration: none; opacity: 0.85; }
.top-bar-gear {
    font-size: 1.1rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s;
}
.top-bar-gear:hover { color: var(--cyan); text-decoration: none; }
.top-bar-logout {
    font-size: 0.9rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s;
}
.top-bar-logout:hover { color: var(--red); text-decoration: none; }
.top-bar-home {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    text-decoration: none;
    padding: 3px 8px;
    border: 1px solid var(--border);
    border-radius: 5px;
    transition: all 0.15s;
}
.top-bar-home:hover { color: var(--cyan); border-color: var(--cyan); text-decoration: none; }

/* ===== Breadcrumb ===== */
.breadcrumb {
    padding: 60px 1.25rem 0;
    max-width: 1200px;
    margin: 0 auto;
}
.breadcrumb a {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: color 0.15s;
}
.breadcrumb a:hover { color: var(--cyan); text-decoration: none; }

/* ===== Main Content ===== */
.main-content {
    padding: 70px 1.25rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.page-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; }
.page-title .icon { color: var(--cyan); }

/* ===== Cards ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }

/* ===== Module Tile Grid ===== */
.module-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}
.module-tile {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 120px;
    position: relative;
    overflow: hidden;
    animation: slideUp 0.4s ease backwards;
}
.module-tile:nth-child(1) { animation-delay: 0.05s; }
.module-tile:nth-child(2) { animation-delay: 0.1s; }
.module-tile:nth-child(3) { animation-delay: 0.15s; }
.module-tile:nth-child(4) { animation-delay: 0.2s; }
.module-tile:nth-child(5) { animation-delay: 0.25s; }
.module-tile:nth-child(6) { animation-delay: 0.3s; }
.module-tile:nth-child(7) { animation-delay: 0.35s; }
.module-tile:nth-child(8) { animation-delay: 0.4s; }
.module-tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    opacity: 0;
    transition: opacity 0.25s;
}
.module-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(0,212,255,0.3);
    box-shadow: 0 8px 24px rgba(0,212,255,0.08);
    text-decoration: none;
}
.module-tile:hover::before { opacity: 1; }
.module-tile-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}
.module-tile-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}
.module-tile-stat {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: auto;
}
.module-tile-stat .highlight { color: var(--cyan); font-weight: 600; }

/* ===== Hero Cards (Dashboard) ===== */
.hero-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.hero-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.hero-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), var(--purple));
    opacity: 0;
    transition: opacity 0.2s;
}
.hero-card:hover::before { opacity: 1; }
.hero-card:hover { border-color: rgba(0,212,255,0.3); transform: translateY(-1px); }
.hero-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.hero-card-title .hc-icon { color: var(--cyan); font-size: 1rem; }

/* Weather Hero (full width) */
.hero-weather {
    grid-column: 1 / -1;
    animation: subtlePulse 4s ease-in-out infinite;
}
.weather-hero-layout {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}
.weather-hero-left { flex: 1; }
.weather-hero-right {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== SVG Outfit Figurine ===== */
.outfit-figurine {
    position: relative;
    width: 160px;
    height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.outfit-figurine svg {
    width: 80px;
    height: 200px;
}
.outfit-label {
    position: absolute;
    padding: 2px 8px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--cyan);
    white-space: nowrap;
    animation: fadeIn 0.5s ease backwards;
}
.label-head { top: 2px; right: -8px; animation-delay: 0.2s; }
.label-outer { top: 50px; left: -8px; animation-delay: 0.3s; }
.label-torso { top: 80px; right: -8px; animation-delay: 0.4s; }
.label-legs { top: 130px; left: -8px; animation-delay: 0.5s; }
.label-feet { top: 175px; right: -8px; animation-delay: 0.6s; }
.label-accessory { top: 25px; left: -8px; animation-delay: 0.7s; }
.outfit-vibe {
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--purple);
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5px;
}

/* Secondary grid */
.secondary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.secondary-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.15s;
}
.secondary-card:hover { border-color: var(--cyan); transform: translateY(-1px); }

/* ===== Smart Add Bar ===== */
.smart-add-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.smart-add-bar input {
    flex: 1;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
}
.smart-add-bar input:focus { border-color: var(--cyan); outline: none; }
.smart-add-result {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(0,212,255,0.06);
    border: 1px solid rgba(0,212,255,0.15);
    border-radius: 6px;
    font-size: 0.85rem;
    animation: fadeIn 0.2s;
}

/* ===== Progress Ring ===== */
.progress-ring { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.progress-ring svg { transform: rotate(-90deg); }
.progress-ring-text {
    position: absolute;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}
.progress-ring-label { font-size: 0.65rem; color: var(--text-dim); display: block; }

/* ===== Shimmer Loading ===== */
.shimmer {
    background: linear-gradient(90deg, var(--surface2) 25%, var(--surface) 50%, var(--surface2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
    min-height: 60px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes subtlePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,212,255,0); }
    50% { box-shadow: 0 0 20px 0 rgba(0,212,255,0.04); }
}

/* ===== List Items ===== */
.list-item {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem;
    border-bottom: 1px solid var(--border); transition: all 0.2s;
    animation: fadeIn 0.2s;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--surface2); }
.list-item.checked { opacity: 0.5; }
.list-item.checked .item-name { text-decoration: line-through; }
.list-item.removing { opacity: 0; transform: translateX(20px); height: 0; padding: 0; overflow: hidden; }
.item-check { width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 4px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s; }
.item-check.done { background: var(--green); border-color: var(--green); }
.item-name { flex: 1; }
.item-meta { color: var(--text-dim); font-size: 0.8rem; }
.item-delete { color: var(--text-dim); cursor: pointer; padding: 0.2rem 0.4rem; border-radius: 4px; transition: all 0.15s; }
.item-delete:hover { color: var(--red); background: rgba(248,81,73,0.1); }

/* ===== Weather ===== */
.weather-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.weather-temp { font-size: 2rem; font-weight: 700; color: var(--cyan); }
.weather-condition { font-size: 0.9rem; color: var(--text-dim); }
.weather-detail { font-size: 0.8rem; color: var(--text-dim); }
.weather-icon { font-size: 2.5rem; }
.outfit-rec {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text);
    padding: 0.5rem 0.75rem;
    background: rgba(0,212,255,0.04);
    border-left: 2px solid var(--cyan);
    border-radius: 0 6px 6px 0;
    margin-top: 0.5rem;
}
.activity-list { margin-top: 0.5rem; font-size: 0.85rem; color: var(--text-dim); line-height: 1.5; }
.demo-city-label {
    font-size: 0.75rem;
    color: var(--purple);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* ===== Food Tracker ===== */
.food-slot-summary { display: flex; gap: 0.75rem; margin: 0.5rem 0; flex-wrap: wrap; }
.food-slot-pill {
    padding: 0.25rem 0.6rem;
    background: var(--surface2);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-dim);
}
.food-slot-pill .slot-cal { color: var(--cyan); font-weight: 600; }
.macro-bar { display: flex; gap: 1rem; margin-top: 0.5rem; font-size: 0.8rem; }
.macro-item { color: var(--text-dim); }
.macro-item span { font-weight: 600; }
.macro-protein span { color: var(--green); }
.macro-carbs span { color: var(--orange); }
.macro-fat span { color: var(--red); }

/* ===== Fitness Plan Cards ===== */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.plan-card {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    transition: border-color 0.15s;
}
.plan-card:hover { border-color: var(--cyan); }
.plan-day { font-size: 0.75rem; color: var(--cyan); font-weight: 600; text-transform: uppercase; }
.plan-title { font-weight: 600; font-size: 0.95rem; margin: 0.25rem 0; }
.plan-exercises { font-size: 0.8rem; color: var(--text-dim); line-height: 1.4; }
.plan-meta { display: flex; gap: 0.5rem; margin-top: 0.5rem; font-size: 0.75rem; }
.plan-meta span { padding: 0.1rem 0.4rem; background: var(--surface); border-radius: 4px; }

/* ===== Goal Selector ===== */
.goal-options { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.goal-option {
    padding: 0.5rem 1rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
}
.goal-option:hover, .goal-option.active { border-color: var(--cyan); color: var(--cyan); }

/* ===== Budget Goals ===== */
.goal-progress { margin-bottom: 0.75rem; }
.goal-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-size: 0.85rem;
}
.goal-progress-bar {
    height: 8px;
    background: var(--surface2);
    border-radius: 4px;
    overflow: hidden;
}
.goal-progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}
.goal-green { background: var(--green); }
.goal-orange { background: var(--orange); }
.goal-red { background: var(--red); }

/* ===== AI Insights ===== */
.ai-card {
    background: linear-gradient(135deg, rgba(0,212,255,0.04), rgba(188,140,255,0.04));
    border: 1px solid rgba(0,212,255,0.15);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}
.ai-card-title {
    font-size: 0.8rem;
    color: var(--purple);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.ai-card-body { font-size: 0.9rem; line-height: 1.5; white-space: pre-line; }

/* ===== Contribution Grid ===== */
.contrib-grid { display: flex; gap: 2px; flex-wrap: wrap; }
.contrib-cell {
    width: 14px; height: 14px;
    border-radius: 2px;
    background: var(--surface2);
    border: 1px solid var(--border);
}
.contrib-1 { background: rgba(63,185,80,0.2); border-color: rgba(63,185,80,0.3); }
.contrib-2 { background: rgba(63,185,80,0.4); border-color: rgba(63,185,80,0.5); }
.contrib-3 { background: rgba(63,185,80,0.6); border-color: rgba(63,185,80,0.7); }
.contrib-4 { background: var(--green); border-color: var(--green); }

/* ===== Habit Enhancements ===== */
.habit-dot-gradient-1 { background: rgba(63,185,80,0.3); border-color: rgba(63,185,80,0.4); }
.habit-dot-gradient-2 { background: rgba(63,185,80,0.5); border-color: rgba(63,185,80,0.6); }
.habit-dot-gradient-3 { background: rgba(63,185,80,0.7); border-color: rgba(63,185,80,0.8); }
.habit-dot-gradient-4 { background: var(--green); border-color: var(--green); }

/* ===== Forms ===== */
.form-row { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
input, select, textarea {
    background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); padding: 0.5rem 0.75rem; font-size: 0.9rem; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--cyan); }
input[type="text"], input[type="password"], input[type="date"], input[type="time"], input[type="number"] { flex: 1; min-width: 120px; }
textarea { width: 100%; min-height: 100px; resize: vertical; }
select { min-width: 100px; }

.btn {
    padding: 0.5rem 1rem; border: none; border-radius: var(--radius); cursor: pointer;
    font-size: 0.9rem; font-weight: 500; transition: all 0.15s; display: inline-flex; align-items: center; gap: 0.4rem;
}
.btn-primary { background: var(--cyan); color: #000; }
.btn-primary:hover { background: #33ddff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #ff6b63; }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }

/* ===== Badges ===== */
.badge { padding: 0.15rem 0.5rem; border-radius: 10px; font-size: 0.75rem; font-weight: 600; }
.badge-high { background: rgba(248,81,73,0.2); color: var(--red); }
.badge-med { background: rgba(210,153,34,0.2); color: var(--orange); }
.badge-low { background: rgba(63,185,80,0.2); color: var(--green); }
.badge-cyan { background: rgba(0,212,255,0.15); color: var(--cyan); }
.badge-overdue { background: var(--red); color: #fff; }

/* Category pills */
.cat-pill { display: inline-block; padding: 0.15rem 0.5rem; border-radius: 10px; font-size: 0.75rem; background: var(--surface2); color: var(--text-dim); margin-right: 0.3rem; }

/* ===== Calendar ===== */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-header { text-align: center; padding: 0.5rem; font-weight: 600; color: var(--text-dim); font-size: 0.85rem; }
.cal-day {
    min-height: 80px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
    padding: 0.3rem; cursor: pointer; transition: border-color 0.15s;
}
.cal-day:hover { border-color: var(--cyan); }
.cal-day.today { border-color: var(--cyan); border-width: 2px; }
.cal-day.other-month { opacity: 0.3; }
.cal-day .day-num { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.2rem; }
.cal-event { font-size: 0.7rem; padding: 1px 4px; border-radius: 3px; margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-nav { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.cal-nav .month-label { font-size: 1.2rem; font-weight: 600; min-width: 180px; text-align: center; }

/* ===== Meal grid ===== */
.meal-grid { display: grid; grid-template-columns: 100px repeat(7, 1fr); gap: 2px; }
.meal-grid .header { padding: 0.5rem; text-align: center; font-weight: 600; font-size: 0.85rem; color: var(--text-dim); }
.meal-grid .slot-label { display: flex; align-items: center; justify-content: center; font-weight: 500; font-size: 0.85rem; }
.meal-cell {
    background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
    padding: 0.4rem; min-height: 50px; cursor: pointer; font-size: 0.8rem;
}
.meal-cell:hover { border-color: var(--cyan); }
.meal-cell .meal-name { color: var(--text); }
.meal-cell .meal-empty { color: var(--text-dim); font-style: italic; }

/* ===== Notes ===== */
.note-card { cursor: pointer; transition: border-color 0.15s; }
.note-card:hover { border-color: var(--cyan); }
.note-card.pinned { border-left: 3px solid var(--orange); }
.note-card .note-title { font-weight: 600; margin-bottom: 0.3rem; }
.note-card .note-preview { color: var(--text-dim); font-size: 0.85rem; max-height: 3em; overflow: hidden; }
.note-card .note-time { color: var(--text-dim); font-size: 0.75rem; margin-top: 0.3rem; }

/* ===== Budget ===== */
.budget-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.summary-card { text-align: center; }
.summary-card .label { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.3rem; }
.summary-card .value { font-size: 1.5rem; font-weight: 700; }
.summary-card .value.income { color: var(--green); }
.summary-card .value.expense { color: var(--red); }
.summary-card .value.balance { color: var(--cyan); }

/* ===== Habits ===== */
.habit-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; padding: 0.5rem; }
.habit-name { min-width: 120px; font-weight: 500; font-size: 0.9rem; }
.habit-dots { display: flex; gap: 2px; flex: 1; }
.habit-dot {
    width: 14px; height: 14px; border-radius: 3px; background: var(--surface2); border: 1px solid var(--border);
    cursor: pointer; transition: all 0.15s;
}
.habit-dot.done { background: var(--green); border-color: var(--green); }
.habit-dot.today { border-color: var(--cyan); border-width: 2px; }
.habit-dot:hover { border-color: var(--cyan); transform: scale(1.2); }
.habit-streak { font-size: 0.8rem; color: var(--orange); min-width: 50px; text-align: right; }

/* ===== Fitness ===== */
.streak-badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.3rem 0.8rem; background: rgba(210,153,34,0.15); color: var(--orange); border-radius: 20px; font-weight: 600; font-size: 0.95rem; }
.weekly-stats { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.stat-chip { padding: 0.4rem 0.8rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.85rem; }
.stat-chip .stat-val { color: var(--cyan); font-weight: 600; }

/* ===== Quick Links Row ===== */
.quick-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}
.quick-link {
    padding: 0.4rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-dim);
    text-decoration: none;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.quick-link:hover { border-color: var(--cyan); color: var(--cyan); text-decoration: none; }

/* ===== Modal ===== */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200;
    justify-content: center; align-items: center;
}
.modal-overlay.show { display: flex; }
.modal {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.5rem; width: 90%; max-width: 500px; max-height: 80vh; overflow-y: auto;
}
.modal-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }

/* ===== Flash Messages ===== */
.flash { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.9rem; }
.flash-error { background: rgba(248,81,73,0.15); color: var(--red); border: 1px solid rgba(248,81,73,0.3); }

/* ===== Login Page ===== */
.login-container {
    display: flex; justify-content: center; align-items: center; min-height: 100vh;
}
.login-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; width: 360px; }
.login-box h1 { text-align: center; color: var(--cyan); margin-bottom: 0.3rem; font-size: 1.5rem; }
.login-box .subtitle { text-align: center; color: var(--text-dim); margin-bottom: 1.5rem; font-size: 0.9rem; }
.login-box .form-group { margin-bottom: 1rem; }
.login-box label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 0.3rem; }
.login-box input { width: 100%; }
.login-box .btn { width: 100%; justify-content: center; margin-top: 0.5rem; }
.login-box .switch { text-align: center; margin-top: 1rem; font-size: 0.85rem; color: var(--text-dim); }

/* Settings Modal */
.settings-field { margin-bottom: 0.75rem; }
.settings-label { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 0.2rem; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .module-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-grid { grid-template-columns: 1fr; }
    .secondary-grid { grid-template-columns: 1fr; }
    .weather-hero-layout { flex-direction: column; align-items: center; }
}

@media (max-width: 500px) {
    .module-grid { grid-template-columns: 1fr; }
    .top-bar { padding: 0 0.75rem; }
    .top-bar-brand { font-size: 1rem; letter-spacing: 2px; }
    .top-bar-user { display: none; }
    .main-content { padding: 60px 0.75rem 1.5rem; }
    .breadcrumb { padding: 54px 0.75rem 0; }
    .cal-grid { font-size: 0.75rem; }
    .cal-day { min-height: 50px; }
    .meal-grid { grid-template-columns: 60px repeat(7, 1fr); font-size: 0.7rem; }
    .budget-summary { grid-template-columns: 1fr; }
    .habit-dots { overflow-x: auto; }
    .card-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; }
    .form-row input, .form-row select { width: 100%; }
    .plan-grid { grid-template-columns: 1fr; }
    .quick-links { justify-content: center; }
    .weather-temp { font-size: 1.5rem; }
    .weather-icon { font-size: 2rem; }
    .food-slot-summary { flex-direction: column; }
    .goal-options { flex-direction: column; }
    .goal-option { text-align: center; }
    .alien-character { width: 90px; height: 140px; }
    .alien-character svg { width: 90px; height: 140px; }
    .grocery-strip-items { overflow-x: auto; flex-wrap: nowrap; }
}

/* ===== Alien Character ===== */
.alien-character {
    position: relative;
    width: 120px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.alien-character svg {
    width: 120px;
    height: 180px;
    filter: drop-shadow(0 2px 8px rgba(0,212,255,0.15));
}

/* ===== Weather Effects ===== */
.weather-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    border-radius: 12px;
}
.weather-sunny {
    background: radial-gradient(circle at 50% 30%, rgba(255,215,0,0.12) 0%, transparent 60%);
    animation: sunPulse 3s ease-in-out infinite;
}
@keyframes sunPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
.weather-rainy .raindrop {
    position: absolute;
    top: -10px;
    width: 2px;
    height: 12px;
    background: linear-gradient(180deg, transparent, rgba(100,180,255,0.6));
    border-radius: 0 0 2px 2px;
    animation: rainFall linear infinite;
}
@keyframes rainFall {
    0% { transform: translateY(-10px); opacity: 1; }
    100% { transform: translateY(200px); opacity: 0; }
}
.weather-snowy .snowflake {
    position: absolute;
    top: -10px;
    color: rgba(255,255,255,0.6);
    animation: snowFall linear infinite;
}
@keyframes snowFall {
    0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(200px) rotate(360deg); opacity: 0; }
}
.weather-clouds .cloud {
    position: absolute;
    width: 60px;
    height: 25px;
    background: rgba(200,200,220,0.08);
    border-radius: 20px;
    animation: cloudDrift linear infinite;
}
.cloud.c1 { top: 10%; left: -60px; animation-duration: 12s; }
.cloud.c2 { top: 40%; left: -60px; animation-duration: 16s; animation-delay: 4s; width: 45px; }
.cloud.c3 { top: 65%; left: -60px; animation-duration: 20s; animation-delay: 8s; width: 70px; }
@keyframes cloudDrift {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(100% + 200px)); }
}

/* ===== Grocery Strip ===== */
.grocery-strip {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}
.grocery-strip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.grocery-strip-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}
.grocery-chip {
    padding: 0.3rem 0.7rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}
.grocery-chip:hover {
    border-color: var(--cyan);
}
.grocery-chip.checked {
    opacity: 0.4;
    text-decoration: line-through;
    background: transparent;
}
.grocery-strip-add {
    display: flex;
    gap: 0.4rem;
}

/* ===== AI Planner Card ===== */
.planner-suggestions {
    margin-top: 0.5rem;
}

/* ===== Sticky Notes Corkboard ===== */
.corkboard {
    background: linear-gradient(135deg, #2a1f14, #1a1510);
    border: 1px solid #3d2e1f;
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    min-height: 200px;
}
.sticky-note {
    padding: 1rem;
    border-radius: 2px;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    color: #1a1a2e;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    position: relative;
}
.sticky-note:hover {
    transform: rotate(0deg) scale(1.03) !important;
    box-shadow: 4px 6px 16px rgba(0,0,0,0.4);
    z-index: 2;
}
.sticky-pin {
    position: absolute;
    top: -4px;
    right: 8px;
    font-size: 1.1rem;
}
.sticky-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.4rem;
    line-height: 1.2;
}
.sticky-body {
    font-size: 0.8rem;
    line-height: 1.4;
    flex: 1;
    opacity: 0.8;
    overflow: hidden;
}
.sticky-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    opacity: 0.6;
}
.sticky-delete {
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.15s;
}
.sticky-delete:hover {
    opacity: 1;
    color: #e74c3c;
}
.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s;
    display: inline-block;
}
.color-dot:hover {
    transform: scale(1.15);
}
.color-dot.active {
    border-color: var(--cyan);
    box-shadow: 0 0 6px rgba(0,212,255,0.4);
}

@media (max-width: 900px) {
    .corkboard { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
    .corkboard { grid-template-columns: 1fr; padding: 1rem; }
}


/* ===== Cosmo Scene ===== */
.cosmo-scene {
    position: relative;
    width: 160px;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}
.cosmo-scene.night {
    background: linear-gradient(180deg, #0a0e1a 0%, #1a1f3a 60%, #1e2540 100%);
}
.cosmo-scene.day {
    background: linear-gradient(180deg, #87CEEB 0%, #B0E0FF 60%, #D4EFFF 100%);
}
.cosmo-scene svg.cosmo-svg {
    position: relative;
    z-index: 2;
    width: 120px;
    height: 180px;
    margin: 20px auto 0;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0,212,255,0.2));
}
.scene-moon {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: #f0e68c;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(240,230,140,0.4), inset -6px -2px 0 #0a0e1a;
    z-index: 1;
}
.scene-star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    z-index: 1;
    animation: twinkle 2s ease-in-out infinite;
}
@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}
.scene-sun {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #FFD700, #FFA500);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255,215,0,0.5);
    z-index: 1;
    animation: sunPulse 3s ease-in-out infinite;
}
.scene-raindrop {
    position: absolute;
    top: -10px;
    width: 2px;
    height: 14px;
    background: linear-gradient(180deg, transparent, rgba(100,180,255,0.7));
    border-radius: 0 0 2px 2px;
    z-index: 3;
    animation: sceneRain linear infinite;
}
@keyframes sceneRain {
    0% { transform: translateY(-10px); opacity: 0.8; }
    100% { transform: translateY(230px); opacity: 0; }
}
.scene-snowflake {
    position: absolute;
    top: -8px;
    color: rgba(255,255,255,0.7);
    z-index: 3;
    animation: sceneSnow linear infinite;
    font-size: 10px;
}
@keyframes sceneSnow {
    0% { transform: translateY(-8px) rotate(0deg); opacity: 0.9; }
    100% { transform: translateY(230px) rotate(360deg); opacity: 0; }
}
.scene-cloud {
    position: absolute;
    width: 50px;
    height: 20px;
    background: rgba(200,200,220,0.15);
    border-radius: 20px;
    z-index: 1;
    animation: sceneCloudDrift linear infinite;
}
@keyframes sceneCloudDrift {
    0% { transform: translateX(-60px); }
    100% { transform: translateX(220px); }
}
.cosmo-name {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
}
.antenna-glow {
    animation: antennaePulse 2s ease-in-out infinite;
}
@keyframes antennaePulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; filter: drop-shadow(0 0 4px #00d4ff); }
}

@media (max-width: 500px) {
    .cosmo-scene { width: 120px; height: 180px; }
    .cosmo-scene svg.cosmo-svg { width: 90px; height: 140px; margin-top: 15px; }
}


/* ===== Page Weather Backgrounds ===== */
body.weather-bg-night {
    background: linear-gradient(180deg, #0a0e1a 0%, #0f1525 40%, #141a2e 100%) !important;
}
body.weather-bg-day {
    background: linear-gradient(180deg, #0d1117 0%, #131a24 50%, #0d1117 100%) !important;
}
body.weather-bg-rain {
    background: linear-gradient(180deg, #0b0f18 0%, #111824 50%, #0d1117 100%) !important;
}
body.weather-bg-snow {
    background: linear-gradient(180deg, #101520 0%, #151d2e 50%, #0d1117 100%) !important;
}

/* Page-wide weather effects container */
.page-weather-fx {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Page stars for night */
.page-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    animation: pageStarTwinkle 3s ease-in-out infinite;
}
@keyframes pageStarTwinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.8; }
}

/* Page moon */
.page-moon {
    position: absolute;
    top: 60px;
    right: 40px;
    width: 40px;
    height: 40px;
    background: #f0e68c;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(240,230,140,0.3), inset -10px -3px 0 #0a0e1a;
}

/* Page rain */
.page-raindrop {
    position: absolute;
    top: -20px;
    width: 1px;
    height: 20px;
    background: linear-gradient(180deg, transparent, rgba(100,160,255,0.3));
    animation: pageRainFall linear infinite;
}
@keyframes pageRainFall {
    0% { transform: translateY(-20px); opacity: 0.6; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* Page snow */
.page-snowflake {
    position: absolute;
    top: -10px;
    color: rgba(255,255,255,0.4);
    font-size: 8px;
    animation: pageSnowFall linear infinite;
}
@keyframes pageSnowFall {
    0% { transform: translateY(-10px) rotate(0deg); opacity: 0.6; }
    100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* ===== Pip Robot Character ===== */
.pip-container {
    position: relative;
    width: 100px;
    height: 140px;
    flex-shrink: 0;
}
.pip-container svg {
    width: 100px;
    height: 140px;
    filter: drop-shadow(0 2px 12px rgba(0,212,255,0.15));
}
.pip-vibe {
    text-align: center;
    font-size: 0.75rem;
    color: var(--purple);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 4px;
}
.pip-name {
    text-align: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.6;
}

/* Local weather effects around Pip */
.pip-weather-fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}
.pip-raindrop {
    position: absolute;
    top: -8px;
    width: 2px;
    height: 12px;
    background: linear-gradient(180deg, transparent, rgba(100,180,255,0.6));
    border-radius: 0 0 2px 2px;
    animation: pipRain linear infinite;
}
@keyframes pipRain {
    0% { transform: translateY(-8px); opacity: 0.7; }
    100% { transform: translateY(150px); opacity: 0; }
}
.pip-snowflake {
    position: absolute;
    top: -6px;
    color: rgba(255,255,255,0.6);
    font-size: 8px;
    animation: pipSnow linear infinite;
}
@keyframes pipSnow {
    0% { transform: translateY(-6px) rotate(0deg); opacity: 0.8; }
    100% { transform: translateY(150px) rotate(360deg); opacity: 0; }
}

@media (max-width: 500px) {
    .pip-container { width: 80px; height: 110px; }
    .pip-container svg { width: 80px; height: 110px; }
    .page-moon { width: 28px; height: 28px; top: 55px; right: 15px; }
}
