html, body {
    font-family: 'Inter', 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA5LjQ3NUMyNjcuODYgNjkuNzMwOSAyNjcuODc5IDY5LjU4NzcgMjY3Ljg3OSA2OS4zMTc5IDI2Ny44NzkgNjcuMTE4MiAyNjYuNDQ4IDY2LjAxODMgMjYzLjU4NiA2Ni4wMTgzWk0yNjMuNTc2IDg2LjA1NDdDMjYxLjA0OSA4Ni4wNTQ3IDI1OS43ODYgODcuMzAwNSAyNTkuNzg2IDg5Ljc5MjEgMjU5Ljc4NiA5Mi4yODM3IDI2MS4wNDkgOTMuNTI5NSAyNjMuNTc2IDkzLjUyOTUgMjY2LjExNiA5My41Mjk1IDI2Ny4zODcgOTIuMjgzNyAyNjcuMzg3IDg5Ljc5MjEgMjY3LjM4NyA4Ny4zMDA1IDI2Ni4xMTYgODYuMDU0NyAyNjMuNTc2IDg2LjA1NDdaIiBmaWxsPSIjRkZFNTAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L2c+PC9zdmc+) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* ═══════════════════════════════════════════════════
   WARM CONSUMER DESIGN SYSTEM
   Inspired by Apple HIG — soft, personal, tactile
   ═══════════════════════════════════════════════════ */

/* ── Page Background — subtle gradient ── */
.mud-application {
    background: linear-gradient(160deg, #ede9f7 0%, #e4f2ef 40%, #f2eaef 80%, #eae7f2 100%) !important;
    min-height: 100vh;
}

.mud-theme-dark .mud-application {
    background: linear-gradient(160deg, #111113 0%, #131318 50%, #121215 100%) !important;
    min-height: 100vh;
}

/* ── AppBar — clean, minimal, iOS-style ── */
.mud-appbar {
    background: var(--mud-palette-surface) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: none !important;
    color: var(--mud-palette-text-primary) !important;
}

.mud-theme-dark .mud-appbar {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.mud-appbar .mud-icon-button {
    color: var(--mud-palette-text-primary) !important;
}

/* ── Cards — original gradient border, warm shadows ── */
.mud-card {
    border-top: none !important;
    border-image: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06),
                0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.mud-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08),
                0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

.mud-theme-dark .mud-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3),
                0 2px 6px rgba(0, 0, 0, 0.2) !important;
}

.mud-card:active {
    transform: scale(0.985);
}

.mud-theme-dark .mud-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2),
                0 2px 8px rgba(0, 0, 0, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ── Card entrance — spring animation with stagger ── */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.mud-card {
    animation: fadeSlideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.mud-card:nth-child(2) { animation-delay: 0.05s; }
.mud-card:nth-child(3) { animation-delay: 0.10s; }
.mud-card:nth-child(4) { animation-delay: 0.15s; }
.mud-card:nth-child(5) { animation-delay: 0.20s; }
.mud-card:nth-child(6) { animation-delay: 0.25s; }
.mud-card:nth-child(7) { animation-delay: 0.30s; }
.mud-card:nth-child(8) { animation-delay: 0.35s; }

/* ── Typography — warm, readable ── */
.mud-typography-h4 {
    background: none;
    -webkit-text-fill-color: inherit;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

.mud-typography {
    font-variant-numeric: tabular-nums;
}

/* ── Buttons — pill-shaped, tactile ── */
.mud-button-root {
    border-radius: 100px !important;
    text-transform: none !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
}

.mud-button-filled {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.mud-button-filled:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.mud-button-filled:active {
    transform: scale(0.96);
    box-shadow: none;
}

/* ── Chips — rounder, softer ── */
.mud-chip {
    animation: chipPopIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes chipPopIn {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.04); }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Drawer — clean, warm ── */
.mud-drawer {
    border-right: none !important;
    box-shadow: 1px 0 12px rgba(0, 0, 0, 0.03) !important;
}

.mud-theme-dark .mud-drawer {
    box-shadow: 1px 0 12px rgba(0, 0, 0, 0.2) !important;
}

/* ── Nav Grid — icon tiles with colored backgrounds ── */
.nav-grid-container {
    padding: 12px 8px;
    overflow-y: auto;
}

.nav-grid-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.nav-grid-small {
    grid-template-columns: repeat(4, 1fr);
}

.nav-grid-divider {
    height: 1px;
    background: var(--mud-palette-lines-default);
    margin: 12px 8px;
}

.nav-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border-radius: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
}

.nav-tile:hover {
    background: rgba(0, 0, 0, 0.03);
    transform: scale(1.04);
}

.nav-tile:active {
    transform: scale(0.92);
}

.mud-theme-dark .nav-tile:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-tile-active {
    background: rgba(0, 0, 0, 0.04);
}

.mud-theme-dark .nav-tile-active {
    background: rgba(255, 255, 255, 0.06);
}

.nav-tile-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.nav-tile-active .nav-tile-icon {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-tile-sm .nav-tile-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.nav-tile-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-align: center;
    line-height: 1.1;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-tile-active .nav-tile-label {
    color: var(--mud-palette-text-primary);
    font-weight: 700;
}

.nav-tile-sm .nav-tile-label {
    font-size: 0.6rem;
}

/* ── Floating Dock — compact pill at bottom center ── */
.floating-dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 100px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.15);
}

.mud-theme-dark .floating-dock {
    background: rgba(44, 44, 54, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.15) !important;
}

/* Fallback: dark mode dock via data attribute */
.floating-dock[data-dark="true"] {
    background: rgba(44, 44, 54, 0.94) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.15) !important;
}

.floating-dock[data-dark="true"] .dock-item,
.floating-dock[data-dark="true"] .dock-item .mud-icon-root,
.floating-dock[data-dark="true"] .dock-item svg {
    color: rgba(255, 255, 255, 0.75) !important;
    fill: rgba(255, 255, 255, 0.75) !important;
}

.floating-dock[data-dark="true"] .dock-active,
.floating-dock[data-dark="true"] .dock-active .mud-icon-root,
.floating-dock[data-dark="true"] .dock-active svg {
    background: rgba(255, 255, 255, 0.12);
    color: #fff !important;
    fill: #fff !important;
}

.dock-item {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--mud-palette-text-secondary);
}

.dock-item:active {
    transform: scale(0.85);
}

.dock-active {
    background: rgba(0, 0, 0, 0.06);
    color: var(--mud-palette-text-primary);
}

.mud-theme-dark .dock-item,
.mud-theme-dark .dock-item .mud-icon-root {
    color: rgba(255, 255, 255, 0.75) !important;
}

.mud-theme-dark .dock-active,
.mud-theme-dark .dock-active .mud-icon-root {
    background: rgba(255, 255, 255, 0.12);
    color: #fff !important;
}

.dock-ai {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5B4FE8, #1DB886);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(91, 79, 232, 0.35);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    animation: aiGlow 3s ease-in-out infinite;
    margin: -12px 4px;
}

.dock-ai:active {
    transform: scale(0.88);
}

@keyframes aiGlow {
    0%, 100% { box-shadow: 0 4px 16px rgba(91, 79, 232, 0.35); }
    50% { box-shadow: 0 4px 24px rgba(91, 79, 232, 0.55), 0 0 8px rgba(29, 184, 134, 0.3); }
}

/* ── FAB — softer pulse ── */
@keyframes fabPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); }
    50% { box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25); }
}

.fab-primary {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
}

.fab-primary .mud-fab {
    animation: fabPulse 3s ease-in-out infinite;
}

.fab-secondary {
    position: fixed;
    bottom: 88px;
    right: 24px;
    z-index: 100;
}

@media (max-width: 959.98px) {
    .fab-primary { bottom: 90px; right: 16px; }
    .fab-secondary { bottom: 154px; right: 16px; }
}

/* ── Progress bar ── */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.mud-progress-linear .mud-progress-linear-bar {
    background-size: 200% auto !important;
    background-image: linear-gradient(90deg,
        var(--mud-palette-primary) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        var(--mud-palette-primary) 100%
    ) !important;
    animation: shimmer 2s linear infinite;
}

/* ── Dialogs — frosted glass ── */
.mud-dialog {
    border-top: none;
    border-image: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12),
                0 4px 16px rgba(0, 0, 0, 0.06) !important;
    border-radius: 24px !important;
}

.mud-theme-dark .mud-dialog {
    border-color: rgba(255, 255, 255, 0.1);
}

.mud-overlay {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ── Scrollbar — minimal ── */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.25); }

.mud-theme-dark ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); }
.mud-theme-dark ::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

/* ── Tab transitions ── */
.mud-tabs-panels {
    animation: fadeSlideUp 0.2s ease-out;
}

/* ── Snackbar — polished toasts ── */
.mud-snackbar {
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    animation: snackIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

@keyframes snackIn {
    from { opacity: 0; transform: translateY(16px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.mud-snackbar .mud-snackbar-content-message {
    font-weight: 600;
    font-size: 0.85rem;
}

/* ── User chip in AppBar ── */
.user-chip {
    background: var(--mud-palette-primary) !important;
    color: white !important;
    border: none !important;
}

/* ── Command bar AI FAB ── */
.command-bar-ai-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5B4FE8, #1DB886);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(91, 79, 232, 0.35);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    animation: aiGlow 3s ease-in-out infinite;
}

.command-bar-ai-fab:active {
    transform: scale(0.9);
}

.command-bar-fab-pulse {
    animation: fabPulse 2s ease-in-out infinite !important;
}

@keyframes fabPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(91, 79, 232, 0.35); }
    50% { box-shadow: 0 4px 24px rgba(91, 79, 232, 0.6), 0 0 0 8px rgba(91, 79, 232, 0.15); }
}

.command-bar-fab-tooltip {
    position: absolute;
    bottom: 8px;
    right: 64px;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    animation: tooltipFadeIn 0.4s ease-out 1.5s both;
    cursor: pointer;
}

.command-bar-fab-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid var(--mud-palette-surface);
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ═══════════════════════════════════════════════════
   LOGIN
   ═══════════════════════════════════════════════════ */
.login-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #6C63FF 0%, #00D9A6 50%, #FF6B9D 100%);
    position: relative;
}

@keyframes loginEnter {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-card {
    animation: loginEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.login-title {
    background: linear-gradient(135deg, #6C63FF, #00D9A6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.login-btn-primary {
    background: linear-gradient(135deg, #6C63FF, #00D9A6) !important;
    color: white !important;
    border: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.35);
}

.login-btn-warm {
    background: linear-gradient(135deg, #FF6B9D, #6C63FF) !important;
    color: white !important;
    border: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-btn-warm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.35);
}

/* ═══════════════════════════════════════════════════
   CHAT
   ═══════════════════════════════════════════════════ */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 64px);
    max-width: 800px;
    margin: 0 auto -72px;
    overflow: hidden;
}

@media (max-width: 959.98px) {
    .chat-container {
        height: calc(100dvh - 64px - 68px);
        margin-bottom: -84px;
    }
}

.chat-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 2rem;
}

.chat-bubble-row {
    display: flex;
    animation: fadeSlideUp 0.2s ease-out both;
}

.chat-bubble-right { justify-content: flex-end; }
.chat-bubble-left { justify-content: flex-start; }

.chat-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    line-height: 1.45;
    word-break: break-word;
}

.chat-bubble-user {
    background: var(--mud-palette-primary);
    color: white;
    border-bottom-right-radius: 6px;
}

.chat-bubble-assistant {
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.mud-theme-dark .chat-bubble-assistant {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.chat-thinking {
    display: flex;
    align-items: center;
    opacity: 0.8;
}

.chat-input-bar {
    padding: 12px 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
    background: var(--mud-palette-surface);
}

.chat-input-field { width: 100%; }
.chat-input-field .mud-input-outlined { border-radius: 24px !important; }

.streaming-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--mud-palette-primary);
    border-radius: 50%;
    margin-left: 4px;
    vertical-align: middle;
    animation: streamPulse 1s ease-in-out infinite;
}

@keyframes streamPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.chat-card { width: 100%; animation: fadeSlideUp 0.3s ease-out both; }
.chat-card-inner {
    border-top: none !important;
    border-image: none !important;
}

/* ═══════════════════════════════════════════════════
   COMMAND BAR
   ═══════════════════════════════════════════════════ */
.command-bar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1100;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.command-bar {
    background: var(--mud-palette-surface);
    border-radius: 24px;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 0, 0, 0.08);
    animation: commandBarIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    border: none;
}

@keyframes commandBarIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.command-bar-input .mud-input-outlined { border-radius: 24px !important; }

.command-bar-response {
    max-height: 50vh;
    overflow-y: auto;
    padding: 12px;
    background: var(--mud-palette-background);
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.command-bar-fab {
    position: fixed;
    bottom: 24px;
    right: 88px;
    z-index: 100;
}

@media (max-width: 959.98px) {
    .command-bar-fab { bottom: 90px; right: 88px; }
    .command-bar-overlay { padding-top: 5vh; }
    .command-bar { width: 95%; }
}

/* ── AI suggestion chips ── */
.ai-chips-row {
    margin-bottom: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ai-chips-row::-webkit-scrollbar { display: none; }
.ai-chips-row { -ms-overflow-style: none; scrollbar-width: none; }

/* ── Briefing card ── */
.briefing-card {
    border-left: 4px solid #F59E0B !important;
    border-top: none !important;
    border-image: none !important;
}

/* ═══════════════════════════════════════════════════
   COOK MODE
   ═══════════════════════════════════════════════════ */
.cook-mode {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - 64px);
    max-width: 800px;
    margin: 0 auto;
}

.cook-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    position: sticky;
    top: 0;
    background: var(--mud-palette-surface);
    z-index: 10;
}

.cook-ingredients {
    padding: 16px;
    background: var(--mud-palette-background);
    border-bottom: 1px solid var(--mud-palette-lines-default);
    max-height: 40vh;
    overflow-y: auto;
}

.cook-step-area {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.cook-step-prev {
    opacity: 0.35;
    font-size: 0.95rem;
    padding: 8px 0;
}

.cook-step-current {
    border-left: 4px solid var(--mud-palette-primary) !important;
}

.cook-step-current .mud-typography-h5 {
    -webkit-text-fill-color: inherit !important;
    background: none !important;
    font-size: 1.2rem;
}

.cook-timers-bar {
    padding: 8px 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: var(--mud-palette-surface);
}

.cook-nav {
    padding: 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    position: sticky;
    bottom: 0;
    background: var(--mud-palette-surface);
}

@media (max-width: 959.98px) {
    .cook-mode { min-height: calc(100dvh - 64px - 68px); }
    .cook-nav { padding-bottom: 84px; }
    .cook-step-current .mud-typography-h5 { font-size: 1.1rem; }
}

/* ═══════════════════════════════════════════════════
   SHARED COMPONENTS
   ═══════════════════════════════════════════════════ */

/* ── Empty states ── */
.empty-state img {
    animation: emptyBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes emptyBounce {
    0% { opacity: 0; transform: scale(0.8) translateY(20px); }
    100% { opacity: 0.85; transform: scale(1) translateY(0); }
}

.empty-state .mud-typography:first-of-type {
    animation: fadeSlideUp 0.4s ease-out 0.15s both;
}

.empty-state .mud-typography:nth-of-type(2) {
    animation: fadeSlideUp 0.4s ease-out 0.25s both;
}

.empty-state .mud-button-root {
    animation: fadeSlideUp 0.4s ease-out 0.35s both;
}

/* ── Page header ── */
.page-header .mud-icon-root {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--mud-palette-primary), var(--mud-palette-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Skeleton ── */
.mud-skeleton {
    animation: skeletonPulse 1.8s ease-in-out infinite;
}

@keyframes skeletonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Stats tile — colored icon background ── */
.stat-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease;
    flex: 1;
    min-width: 0;
}

.stat-tile:hover {
    transform: translateY(-2px);
}

.stat-tile:active {
    transform: scale(0.95);
}

.stat-tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-tile-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-tile-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--mud-palette-text-secondary);
}

/* ── Section header — visual break between dashboard sections ── */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.section-header-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-header-title {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

/* ── Category divider — sticky colored section headers ── */
.category-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 12px -4px 6px;
    border-radius: 12px;
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.category-divider-light {
    background: rgba(255, 255, 255, 0.85);
}

.mud-theme-dark .category-divider-light {
    background: rgba(28, 28, 32, 0.85);
}

/* ── Attention card variants ── */
.card-attention-urgent {
    border-left: 4px solid var(--mud-palette-error) !important;
    background: linear-gradient(135deg, rgba(232, 89, 110, 0.03), transparent) !important;
}

.mud-theme-dark .card-attention-urgent {
    background: linear-gradient(135deg, rgba(232, 89, 110, 0.08), transparent) !important;
}

.card-attention-warning {
    border-left: 4px solid var(--mud-palette-warning) !important;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.03), transparent) !important;
}

.mud-theme-dark .card-attention-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), transparent) !important;
}

.card-attention-info {
    border-left: 4px solid var(--mud-palette-info) !important;
}

.card-attention-success {
    border-left: 4px solid var(--mud-palette-success) !important;
    background: linear-gradient(135deg, rgba(46, 174, 106, 0.03), transparent) !important;
}

.mud-theme-dark .card-attention-success {
    background: linear-gradient(135deg, rgba(46, 174, 106, 0.08), transparent) !important;
}

/* ── Progress ring — chores weekly completion ── */
.progress-ring {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.progress-ring-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: -0.02em;
}

/* ── Leaderboard podium styling ── */
.podium-card {
    position: relative;
    padding: 16px 12px;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    flex: 1;
    min-width: 0;
}

.podium-card:hover {
    transform: translateY(-3px);
}

.podium-card-leader {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(234, 179, 8, 0.04));
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.mud-theme-dark .podium-card-leader {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(234, 179, 8, 0.06));
    border-color: rgba(245, 158, 11, 0.25);
}

.podium-card-default {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
}

/* ── Quick actions — colorful icon buttons ── */
.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.15s ease;
    min-width: 72px;
    flex-shrink: 0;
    text-decoration: none;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
}

.quick-action-btn:active {
    transform: scale(0.93);
}

.quick-action-btn-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-action-btn-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    text-align: center;
    line-height: 1.15;
    max-width: 72px;
}

/* ── Activity feed — cleaner timeline ── */
.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
    box-shadow: 0 0 0 3px var(--mud-palette-surface);
}

.activity-line {
    width: 2px;
    flex: 1;
    margin: 2px 0;
    opacity: 0.4;
}

/* ── Mobile breathing room ── */
@media (max-width: 959.98px) {
    .mud-card {
        border-radius: 18px !important;
    }

    .page-header {
        padding: 4px 4px 0;
    }

    .stat-tile {
        padding: 10px 4px;
    }

    .stat-tile-value {
        font-size: 1.25rem;
    }
}

/* ═══════════════════════════════════════════════════
   MOBILE ADJUSTMENTS
   ═══════════════════════════════════════════════════ */
@media (max-width: 959.98px) {
    .mud-main-content {
        padding-bottom: 84px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* ── Page transitions — opacity only (transform breaks position:fixed FABs) ── */
.page-transition {
    animation: pageIn 0.25s ease-out both;
}

@keyframes pageIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ── Animated numbers ── */
.animated-number {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ── Animated checkmark ── */
.check-done {
    animation: checkDone 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes checkDone {
    0% { opacity: 1; transform: scale(1); }
    30% { transform: scale(1.08); background: rgba(46, 174, 106, 0.08); }
    100% { opacity: 0; transform: scale(0.8) translateX(40px); height: 0; padding: 0; margin: 0; overflow: hidden; }
}

/* ── Swipe item ── */
.swipe-item {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
}

.swipe-item-content {
    position: relative;
    z-index: 1;
    background: var(--mud-palette-surface);
    transition: transform 0.2s ease;
}

.swipe-reveal-right {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    background: #2EAE6A;
    display: flex;
    align-items: center;
    padding-left: 20px;
    color: white;
    font-weight: 700;
}

.swipe-reveal-left {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    background: #E05D6F;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
    color: white;
    font-weight: 700;
}

/* ── Parallax header ── */
.parallax-header {
    position: relative;
    overflow: hidden;
}

/* ── Sticky note rotations for Pinboard ── */
.sticky-note {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sticky-note:nth-child(3n+1) { transform: rotate(-1.5deg); }
.sticky-note:nth-child(3n+2) { transform: rotate(0.8deg); }
.sticky-note:nth-child(3n+3) { transform: rotate(-0.5deg); }
.sticky-note:nth-child(3n) { transform: rotate(1.2deg); }
.sticky-note:hover {
    transform: rotate(0deg) scale(1.02) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    z-index: 2;
}

/* ── Weather icon animations ── */
@keyframes sunSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.weather-sun {
    animation: sunSpin 20s linear infinite;
    display: inline-block;
}

@keyframes rainDrop {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(3px); opacity: 0.6; }
}
.weather-rain {
    animation: rainDrop 1.5s ease-in-out infinite;
    display: inline-block;
}

/* ── Achievement unlock overlay ── */
.achievement-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fadeIn 0.2s ease-out;
}

.achievement-badge {
    animation: achievementIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    text-align: center;
}

@keyframes achievementIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.achievement-glow {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EAB308, #F59E0B);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 0 40px rgba(234, 179, 8, 0.4), 0 0 80px rgba(234, 179, 8, 0.2);
    animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 40px rgba(234, 179, 8, 0.4), 0 0 80px rgba(234, 179, 8, 0.2); }
    50% { box-shadow: 0 0 60px rgba(234, 179, 8, 0.6), 0 0 100px rgba(234, 179, 8, 0.3); }
}

/* ── Meal plan day cards ── */
.meal-day-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}
.meal-day-card:hover {
    transform: translateY(-2px);
}
.meal-day-today {
    border-left: 4px solid var(--mud-palette-primary) !important;
}

/* ═══════════════════════════════════════════════════
   SEXY UI UPGRADE — Premium Visual Enhancements
   ═══════════════════════════════════════════════════ */

/* ── 1. Bento Grid Dashboard ── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.bento-grid > * {
    min-width: 0;
}

.bento-span-2 {
    grid-column: span 2;
}

.bento-tall {
    grid-row: span 2;
}

@media (min-width: 960px) {
    .bento-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

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

/* ── 2. Gradient Mesh Card Backgrounds ── */
.card-mesh-primary {
    background: linear-gradient(135deg,
        rgba(var(--mud-palette-primary-rgb, 91,79,232), 0.04) 0%,
        transparent 50%,
        rgba(var(--mud-palette-secondary-rgb, 29,184,134), 0.03) 100%) !important;
}

.mud-theme-dark .card-mesh-primary {
    background: linear-gradient(135deg,
        rgba(var(--mud-palette-primary-rgb, 139,130,248), 0.08) 0%,
        transparent 50%,
        rgba(var(--mud-palette-secondary-rgb, 61,217,164), 0.05) 100%) !important;
}

.card-mesh-warm {
    background: linear-gradient(135deg,
        rgba(245, 158, 11, 0.05) 0%,
        rgba(234, 179, 8, 0.02) 40%,
        transparent 100%) !important;
}

.mud-theme-dark .card-mesh-warm {
    background: linear-gradient(135deg,
        rgba(245, 158, 11, 0.10) 0%,
        rgba(234, 179, 8, 0.04) 40%,
        transparent 100%) !important;
}

.card-mesh-cool {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.04) 0%,
        rgba(6, 182, 212, 0.03) 50%,
        transparent 100%) !important;
}

.mud-theme-dark .card-mesh-cool {
    background: linear-gradient(135deg,
        rgba(59, 130, 246, 0.08) 0%,
        rgba(6, 182, 212, 0.05) 50%,
        transparent 100%) !important;
}

.card-mesh-aurora {
    background: linear-gradient(135deg,
        rgba(123, 104, 238, 0.05) 0%,
        rgba(236, 72, 153, 0.03) 30%,
        rgba(6, 182, 212, 0.04) 60%,
        transparent 100%) !important;
}

.mud-theme-dark .card-mesh-aurora {
    background: linear-gradient(135deg,
        rgba(123, 104, 238, 0.10) 0%,
        rgba(236, 72, 153, 0.06) 30%,
        rgba(6, 182, 212, 0.07) 60%,
        transparent 100%) !important;
}

/* ── 3. Animated Number Counters ── */
@keyframes countUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.animated-counter {
    display: inline-block;
    animation: countUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
    font-variant-numeric: tabular-nums;
}

.animated-counter:nth-child(1) { animation-delay: 0.1s; }
.animated-counter:nth-child(2) { animation-delay: 0.2s; }
.animated-counter:nth-child(3) { animation-delay: 0.3s; }
.animated-counter:nth-child(4) { animation-delay: 0.4s; }

/* ── 4. Richer Card Hierarchy ── */
.card-hero {
    border: none !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 4px 24px rgba(0, 0, 0, 0.04) !important;
    position: relative;
    overflow: hidden;
}

.card-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--mud-palette-primary), var(--mud-palette-secondary));
    opacity: 0.7;
}

.mud-theme-dark .card-hero {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25), 0 4px 24px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.card-hero .mud-typography-h4,
.card-hero .mud-typography-h5,
.card-hero .mud-typography-h6 {
    font-size: 1.15em;
}

.card-compact {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.card-compact .mud-card-content {
    padding: 8px 12px !important;
}

/* ── 6. Expandable FAB Menu ── */
.fab-menu {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 12px;
}

@media (max-width: 959.98px) {
    .fab-menu { bottom: 90px; right: 16px; }
}

.fab-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: scale(0.3) translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.fab-menu-open .fab-menu-item {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.fab-menu-open .fab-menu-item:nth-child(2) { transition-delay: 0.05s; }
.fab-menu-open .fab-menu-item:nth-child(3) { transition-delay: 0.10s; }
.fab-menu-open .fab-menu-item:nth-child(4) { transition-delay: 0.15s; }

.fab-menu-label {
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
}

.mud-theme-dark .fab-menu-label {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.fab-menu-trigger {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fab-menu-open .fab-menu-trigger {
    transform: rotate(45deg);
}

/* ── 7. Avatar Gradients ── */
.avatar-gradient {
    position: relative;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

.avatar-ring {
    box-shadow: 0 0 0 2px var(--mud-palette-surface), 0 0 0 4px var(--mud-palette-primary);
}

.avatar-online::after {
    content: '';
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2EAE6A;
    border: 2px solid var(--mud-palette-surface);
}

/* ── 8. Shimmer Skeleton Upgrade ── */
@keyframes skeletonShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.mud-skeleton {
    animation: skeletonShimmer 1.8s ease-in-out infinite !important;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.06) 25%,
        rgba(0, 0, 0, 0.12) 50%,
        rgba(0, 0, 0, 0.06) 75%
    ) !important;
    background-size: 200% 100% !important;
}

.mud-theme-dark .mud-skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.10) 50%,
        rgba(255, 255, 255, 0.04) 75%
    ) !important;
    background-size: 200% 100% !important;
}

/* ── 9. Collapsible Category Headers ── */
.category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin: 12px -4px 6px;
    border-radius: 14px;
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
    user-select: none;
}

.category-header:hover {
    background: rgba(0, 0, 0, 0.05);
}

.mud-theme-dark .category-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.category-header:active {
    transform: scale(0.98);
}

.category-header-light {
    background: rgba(255, 255, 255, 0.88);
}

.mud-theme-dark .category-header-light {
    background: rgba(28, 28, 32, 0.88);
}

.category-header-chevron {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-left: auto;
}

.category-header-collapsed .category-header-chevron {
    transform: rotate(-90deg);
}

.category-items {
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
    max-height: 2000px;
    opacity: 1;
}

.category-items-collapsed {
    max-height: 0 !important;
    opacity: 0;
}

/* ── 10. Bottom Sheet Dialogs (Mobile) ── */
@media (max-width: 599.98px) {
    .mud-dialog-container {
        align-items: flex-end !important;
    }

    .mud-dialog {
        margin: 0 !important;
        border-radius: 24px 24px 0 0 !important;
        max-height: 90vh !important;
        width: 100% !important;
        max-width: 100% !important;
        animation: bottomSheetIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both !important;
    }

    .mud-dialog .mud-dialog-content {
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@keyframes bottomSheetIn {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Bottom sheet drag handle */
.bottom-sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.2);
    margin: 8px auto 4px;
}

.mud-theme-dark .bottom-sheet-handle {
    background: rgba(255, 255, 255, 0.2);
}

/* Show handle on mobile dialogs */
@media (max-width: 599.98px) {
    .mud-dialog::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        border-radius: 2px;
        background: rgba(0, 0, 0, 0.2);
        margin: 12px auto 4px;
    }

    .mud-theme-dark .mud-dialog::before {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* ── 11. Progress Rings ── */
.progress-ring-animated {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.progress-ring-animated svg {
    transform: rotate(-90deg);
}

.progress-ring-animated circle.progress-ring-track {
    fill: none;
    stroke: rgba(0, 0, 0, 0.08);
    stroke-width: 4;
}

.mud-theme-dark .progress-ring-animated circle.progress-ring-track {
    stroke: rgba(255, 255, 255, 0.08);
}

.progress-ring-animated circle.progress-ring-fill {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s cubic-bezier(0.22, 1, 0.36, 1);
    animation: ringFillIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ringFillIn {
    from { stroke-dashoffset: var(--ring-circumference); }
    to { stroke-dashoffset: var(--ring-offset); }
}

.progress-ring-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

/* ── 12. Enhanced Swipe Actions ── */
.swipe-reveal-right {
    background: linear-gradient(90deg, #2EAE6A, #34C77E) !important;
}

.swipe-reveal-left {
    background: linear-gradient(90deg, #E86B6B, #E05D6F) !important;
}

.swipe-hint {
    animation: swipeHint 2s ease-in-out 1s 1;
}

@keyframes swipeHint {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-20px); }
    50% { transform: translateX(20px); }
    75% { transform: translateX(0); }
}

/* ── 13. Theme-Aware Illustrations ── */
.empty-state img {
    filter: saturate(0.85);
    transition: filter 0.3s ease;
}

.mud-theme-dark .empty-state img {
    filter: brightness(0.85) saturate(0.8) contrast(1.1);
}

.empty-state:hover img {
    filter: saturate(1);
}

.mud-theme-dark .empty-state:hover img {
    filter: brightness(0.95) saturate(0.9);
}

/* ── 14. Micro-Animation Polish ── */

/* Checkbox morphing */
@keyframes checkMorph {
    0% { transform: scale(1); }
    30% { transform: scale(0.8) rotate(-10deg); }
    60% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.check-morph {
    animation: checkMorph 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Star / Favorite bounce + burst */
@keyframes starBurst {
    0% { transform: scale(1); }
    20% { transform: scale(0.7); }
    50% { transform: scale(1.4); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.star-burst {
    animation: starBurst 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.star-burst::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3) 0%, transparent 70%);
    animation: starBurstGlow 0.5s ease-out forwards;
    pointer-events: none;
}

@keyframes starBurstGlow {
    from { opacity: 1; transform: scale(0.5); }
    to { opacity: 0; transform: scale(2); }
}

/* Delete shrink */
@keyframes deleteShrink {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.95); }
    100% { opacity: 0; transform: scale(0.8); max-height: 0; padding: 0; margin: 0; overflow: hidden; }
}

.delete-shrink {
    animation: deleteShrink 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Tab crossfade */
@keyframes crossfade {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.mud-tab-panel {
    animation: crossfade 0.25s ease-out both;
}

/* ── 15. Enhanced Stat Tiles ── */
.stat-tile {
    position: relative;
    overflow: hidden;
}

.stat-tile::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    opacity: 0.06;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.stat-tile:hover::before {
    opacity: 0.12;
}

/* ── Glass card variant ── */
.mud-card.card-glass {
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.mud-theme-dark .mud-card.card-glass {
    background: rgba(28, 28, 32, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
}

/* ── Gradient text utility ── */
.gradient-text {
    background: linear-gradient(135deg, var(--mud-palette-primary), var(--mud-palette-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Glow border on focus/active for inputs ── */
.mud-input-outlined .mud-input-outlined-border {
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    box-shadow: 0 0 0 3px rgba(var(--mud-palette-primary-rgb, 91,79,232), 0.12);
}

.mud-theme-dark .mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    box-shadow: 0 0 0 3px rgba(var(--mud-palette-primary-rgb, 139,130,248), 0.15);
}

/* ── Enhanced Podium Cards ── */
.podium-card-leader {
    position: relative;
    overflow: hidden;
}

.podium-card-leader::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #EAB308, #F59E0B, #FBBF24);
}

.podium-card-leader::after {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.08);
    pointer-events: none;
}

.mud-theme-dark .podium-card-leader::after {
    background: rgba(245, 158, 11, 0.12);
}

/* ── Section divider with label ── */
.section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 16px;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--mud-palette-lines-default);
}

.section-divider-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--mud-palette-text-secondary);
    white-space: nowrap;
}

/* ── Pulsing dot indicator ── */
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulseDot 2s ease-in-out infinite;
}

/* ── Card hover glow for premium feel ── */
.card-glow:hover {
    box-shadow: 0 4px 20px rgba(var(--mud-palette-primary-rgb, 91,79,232), 0.12),
                0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.mud-theme-dark .card-glow:hover {
    box-shadow: 0 4px 20px rgba(var(--mud-palette-primary-rgb, 139,130,248), 0.18),
                0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

/* ── Staggered list entrance ── */
@keyframes listItemIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

.stagger-in > * {
    animation: listItemIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stagger-in > *:nth-child(1) { animation-delay: 0.03s; }
.stagger-in > *:nth-child(2) { animation-delay: 0.06s; }
.stagger-in > *:nth-child(3) { animation-delay: 0.09s; }
.stagger-in > *:nth-child(4) { animation-delay: 0.12s; }
.stagger-in > *:nth-child(5) { animation-delay: 0.15s; }
.stagger-in > *:nth-child(6) { animation-delay: 0.18s; }
.stagger-in > *:nth-child(7) { animation-delay: 0.21s; }
.stagger-in > *:nth-child(8) { animation-delay: 0.24s; }
.stagger-in > *:nth-child(9) { animation-delay: 0.27s; }
.stagger-in > *:nth-child(10) { animation-delay: 0.30s; }

/* ── Improved Activity Feed ── */
.activity-dot {
    position: relative;
}

.activity-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    opacity: 0.2;
}

/* ── Refined Fortune Cookie ── */
.fortune-quote {
    position: relative;
    padding-left: 16px;
}

.fortune-quote::before {
    content: '\201C';
    position: absolute;
    left: 0;
    top: -8px;
    font-size: 2rem;
    font-weight: 800;
    opacity: 0.15;
    line-height: 1;
}

/* ── Weather card enhancements ── */
.weather-temp {
    font-variant-numeric: tabular-nums;
    background: linear-gradient(135deg, var(--mud-palette-text-primary), var(--mud-palette-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Smooth number flip ── */
@keyframes numberFlip {
    0% { opacity: 0; transform: translateY(-100%); }
    100% { opacity: 1; transform: translateY(0); }
}

.number-flip {
    display: inline-block;
    animation: numberFlip 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
    font-variant-numeric: tabular-nums;
}

