/* ==================== CSS Variables ==================== */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #f97316;
    --secondary-light: #fb923c;
    --accent: #ec4899;
    --accent-light: #f472b6;
    --success: #22c55e;
    --success-light: #4ade80;
    --warning: #eab308;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-warm: linear-gradient(135deg, #f97316 0%, #fb923c 50%, #fbbf24 100%);
    --gradient-fresh: linear-gradient(135deg, #22c55e 0%, #4ade80 50%, #a3e635 100%);
    --gradient-sky: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #38bdf8 100%);
    --gradient-sunset: linear-gradient(135deg, #f43f5e 0%, #fb7185 50%, #fda4af 100%);
    
    --bg-primary: #faf5ff;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f3e8ff;
    --bg-pattern: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    
    --text-primary: #1e1b4b;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    --border-color: #e9d5ff;
    --shadow-sm: 0 2px 4px rgba(99, 102, 241, 0.08);
    --shadow-md: 0 8px 16px rgba(99, 102, 241, 0.12);
    --shadow-lg: 0 20px 40px rgba(99, 102, 241, 0.15);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.2);
    
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;
    
    --sidebar-width: 280px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==================== Animations ==================== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-soft {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

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

@keyframes bounce-in {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes slide-up {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slide-in-right {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* ==================== Reset & Base ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    background-image: var(--bg-pattern);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* ==================== Layout ==================== */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2.5rem;
    max-width: calc(100vw - var(--sidebar-width));
    animation: slide-up 0.5s ease-out;
}

/* ==================== Sidebar ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.sidebar-header {
    padding: 1.75rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--gradient-primary);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.logo-mark {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #fffaf0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    flex-shrink: 0;
}

.logo-wordmark {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.logo-text {
    font-size: 1.35rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.logo-text .brand-little { color: #e8f5c8; }
.logo-text .brand-bowl { color: #ffd4a8; }

.logo-tagline {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    white-space: nowrap;
}

.toddler-info {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
}

.toddler-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--gradient-warm);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    animation: float 3s ease-in-out infinite;
    border: 3px solid white;
}

.toddler-details {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.toddler-name {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.toddler-age {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.toddler-age::before {
    content: "👶";
    font-size: 0.9rem;
}

.toddler-switch {
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    background: white;
    transition: all var(--transition-fast);
}

.toddler-switch:hover {
    border-color: var(--primary);
}

.nav-menu {
    list-style: none;
    padding: 1.25rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 600;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.nav-item a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.nav-item a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.nav-item a:hover::before {
    opacity: 0.08;
}

.nav-item.active a {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
    transform: scale(1.02);
}

.nav-item.active a::before {
    opacity: 0;
}

.nav-item i {
    width: 24px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
    position: relative;
    z-index: 2;
}

.add-toddler-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, white 100%);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 700;
    transition: all var(--transition-normal);
}

.add-toddler-btn:hover {
    border-color: var(--primary);
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

/* ==================== Page Header ==================== */
.page-header {
    margin-bottom: 2.5rem;
    position: relative;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: slide-up 0.5s ease-out;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    animation: slide-up 0.5s ease-out 0.1s both;
}

/* ==================== Cards ==================== */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition-normal);
    animation: slide-up 0.5s ease-out;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(236, 72, 153, 0.03) 100%);
}

.card-header h2 {
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.75rem;
}

.card-footer {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(236, 72, 153, 0.03) 100%);
}

/* ==================== Dashboard Grid ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.75rem;
}

.dashboard-grid .full-width {
    grid-column: 1 / -1;
}

/* Staggered animation for cards */
.dashboard-grid > *:nth-child(1) { animation-delay: 0.1s; }
.dashboard-grid > *:nth-child(2) { animation-delay: 0.2s; }
.dashboard-grid > *:nth-child(3) { animation-delay: 0.3s; }
.dashboard-grid > *:nth-child(4) { animation-delay: 0.4s; }
.dashboard-grid > *:nth-child(5) { animation-delay: 0.5s; }
.dashboard-grid > *:nth-child(6) { animation-delay: 0.6s; }

/* ==================== Stats Cards ==================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.logging-stats-row {
    margin-top: -0.75rem;
}

.stat-sub {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    animation: slide-up 0.5s ease-out;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.stat-card:hover::before {
    transform: scale(1.5);
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.25s; }

a.stat-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.stat-card-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.card-title-link {
    text-decoration: none;
    color: inherit;
}

.card-title-link:hover {
    color: var(--primary);
}

a.card-body-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.card-body-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    position: relative;
    z-index: 1;
}

.stat-icon.primary { 
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: var(--primary);
}
.stat-icon.success { 
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(74, 222, 128, 0.15) 100%);
    color: var(--success);
}
.stat-icon.warning { 
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15) 0%, rgba(251, 191, 36, 0.15) 100%);
    color: var(--warning);
}
.stat-icon.danger { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(248, 113, 113, 0.15) 100%);
    color: var(--danger);
}

.stat-content {
    position: relative;
    z-index: 1;
}

.stat-content h3 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
    font-weight: 600;
}

/* ==================== Nutrition Progress ==================== */
.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

.nutrient-card {
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, white 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

button.nutrient-card-btn {
    display: block;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.nutrition-hint {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.nutrient-include {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px dashed var(--border-color);
    text-align: left;
}

.nutrient-include-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.nutrient-include-foods {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.nutrient-include-tip {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.35;
}

.alert-include-label {
    margin: 0.65rem 0 0.35rem;
    font-size: 0.85rem;
}

.alert-tips {
    margin: 0.65rem 0 0;
    padding-left: 1.15rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.alert-tips li {
    margin-bottom: 0.25rem;
}

.milk-option-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.milk-type-btn.active {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.45);
    color: var(--primary-dark, #4f46e5);
    font-weight: 700;
}

.nutrient-card:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

/* Nutrition breakdown modal */
body.nutrition-modal-open {
    overflow: hidden;
}

.nutrition-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.nutrition-modal[hidden] {
    display: none !important;
}

.nutrition-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 24, 16, 0.45);
}

.nutrition-modal-panel {
    position: relative;
    width: min(720px, 100%);
    max-height: min(88vh, 900px);
    overflow: auto;
    background: var(--bg-secondary, #fff);
    border-radius: 18px 18px 0 0;
    padding: 1.25rem 1.25rem 1.75rem;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .nutrition-modal {
        align-items: center;
        padding: 1rem;
    }
    .nutrition-modal-panel {
        border-radius: 16px;
    }
}

.nutrition-modal-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.nutrition-modal-header h2 {
    margin: 0;
    font-size: 1.2rem;
}

.nutrition-modal-sub {
    margin: 0.25rem 0 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.nutrition-modal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.nutrition-filter-chip {
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary, #f5f5f0);
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.nutrition-filter-chip.active {
    background: rgba(107, 143, 60, 0.15);
    border-color: var(--primary, #6b8f3c);
    font-weight: 700;
}

.nutrition-meal-block {
    margin-bottom: 1.25rem;
}

.nutrition-meal-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.nutrition-meal-head h3 {
    margin: 0;
    font-size: 1rem;
}

.nutrition-item-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 0.55rem;
    background: var(--bg-tertiary, #fafaf6);
}

.nutrition-item-top,
.nutrition-item-values,
.nutrition-focus-summary {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: baseline;
}

.nutrition-item-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.45rem;
}

.nutrition-item-chips span {
    font-size: 0.75rem;
    background: rgba(107, 143, 60, 0.1);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
}

.nutrition-item-formula {
    margin: 0.45rem 0 0;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.nutrition-item-warn {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: #b45309;
}

.nutrition-focus-summary {
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.nutrient-preview {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.nutrient-preview span {
    font-size: 0.75rem;
    background: rgba(107, 143, 60, 0.12);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
}

.nutrient-preview.muted span {
    background: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

.meal-nutrient-total {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px dashed var(--border-color);
    font-size: 0.85rem;
    font-weight: 700;
}

.nutrient-header {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.875rem;
}

.nutrient-icon {
    font-size: 1.5rem;
    animation: pulse-soft 2s ease-in-out infinite;
}

.nutrient-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.nutrient-bar {
    height: 10px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.625rem;
    position: relative;
}

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

.nutrient-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
    background-size: 200% 100%;
}

.nutrient-fill.good { background: var(--gradient-fresh); }
.nutrient-fill.moderate { background: var(--gradient-warm); }
.nutrient-fill.low { background: var(--gradient-sunset); }
.nutrient-fill.excess { background: var(--gradient-sky); }

.nutrient-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ==================== Meal Schedule ==================== */
.meal-schedule {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.meal-slot {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, white 100%);
    border-radius: var(--radius-md);
    gap: 1.25rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    animation: slide-in-right 0.5s ease-out;
}

.meal-slot:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.meal-slot.completed {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(74, 222, 128, 0.05) 100%);
    border: 2px solid var(--success);
}

.meal-slot.completed .meal-time-icon {
    background: var(--gradient-fresh);
    color: white;
}

.meal-slot.pending {
    border: 2px dashed var(--border-color);
}

.meal-time-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.meal-slot:hover .meal-time-icon {
    animation: wiggle 0.5s ease-in-out;
}

.meal-info {
    flex: 1;
}

.meal-type {
    font-weight: 800;
    font-size: 1rem;
    text-transform: capitalize;
    color: var(--text-primary);
}

.meal-food {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.meal-action {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.85rem;
    transition: all var(--transition-normal);
}

.meal-action.log-btn {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.meal-action.log-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.meal-action.done {
    background: var(--gradient-fresh);
    color: white;
}

/* ==================== Alerts ==================== */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    animation: slide-up 0.5s ease-out;
    border: 1px solid transparent;
    transition: all var(--transition-normal);
}

.alert:hover {
    transform: translateX(4px);
}

.alert.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(96, 165, 250, 0.05) 100%);
    border-color: rgba(59, 130, 246, 0.3);
}

.alert.warning {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
    border-color: rgba(234, 179, 8, 0.3);
}

.alert.critical {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(248, 113, 113, 0.05) 100%);
    border-color: rgba(239, 68, 68, 0.3);
}

.alert-icon {
    font-size: 1.5rem;
    margin-top: 0.125rem;
    animation: pulse-soft 2s ease-in-out infinite;
}

.alert.info .alert-icon { color: var(--info); }
.alert.warning .alert-icon { color: var(--warning); }
.alert.critical .alert-icon { color: var(--danger); }

.alert-content h4 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.alert-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.alert-foods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.food-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    background: white;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.food-chip:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-success {
    background: var(--gradient-fresh);
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.5);
}

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* ==================== Forms ==================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.625rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-input, .form-select {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: white;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.375rem;
}

/* Checkbox group */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.checkbox-item:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.checkbox-item input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.checkbox-item.checked {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.05) 100%);
    border-color: var(--primary);
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 2px solid var(--border-color);
    transition: all var(--transition-normal);
}

.radio-item:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.radio-item input {
    width: 22px;
    height: 22px;
    accent-color: var(--primary);
}

.radio-item.selected {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.05) 100%);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* ==================== Weekly Plan ==================== */
.week-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 0.75rem;
    flex: 1;
}

.week-nav-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-weight: 700;
    transition: all var(--transition-normal);
}

.week-nav-btn:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
}

.week-title {
    font-weight: 800;
    font-size: 1.25rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.compact-plan-header {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.compact-plan-eyebrow {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.compact-plan-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.weekly-plan-subtitle-mobile {
    display: none;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1.25rem;
}

@media (max-width: 1200px) {
    .week-grid:not(.is-compact) {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .week-grid:not(.is-compact) {
        grid-template-columns: repeat(2, 1fr);
    }
}

.day-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all var(--transition-normal);
    animation: slide-up 0.5s ease-out;
}

.day-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.day-header {
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.day-header.today {
    background: var(--gradient-warm);
    position: relative;
}

.day-header.today::after {
    content: '✨';
    position: absolute;
    right: 8px;
    top: 8px;
    animation: pulse-soft 1s ease-in-out infinite;
}

.day-relative {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.95;
    margin-bottom: 0.2rem;
}

.day-name {
    font-weight: 800;
    font-size: 0.95rem;
}

.day-date {
    font-size: 0.8rem;
    opacity: 0.9;
}

.day-meals {
    padding: 1rem;
}

.day-meals-empty {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.day-meal {
    padding: 0.75rem;
    margin-bottom: 0.625rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, white 100%);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.day-meal:hover {
    transform: scale(1.02);
}

.day-meal:last-child {
    margin-bottom: 0;
}

.day-meal-type {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    letter-spacing: 0.5px;
}

.day-meal-icon {
    font-style: normal;
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: 0;
}

.day-meal-food {
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    word-break: break-word;
}

.plan-addins-block {
    margin-top: 0.45rem;
    padding: 0.5rem 0.65rem;
    border-radius: 10px;
    background: rgba(107, 143, 60, 0.08);
    border: 1px solid rgba(107, 143, 60, 0.22);
}
.plan-addins-title {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--primary-dark, #4a6b2a);
}
.plan-addins {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.plan-addin {
    font-size: 0.8rem;
    line-height: 1.35;
    color: var(--text-secondary);
}
.plan-addin strong {
    color: var(--text-primary);
    font-weight: 700;
}
.plan-addin.is-hidden-veggie strong {
    color: var(--primary-dark, #4a6b2a);
}
.plan-addin-to {
    display: inline;
    margin-left: 0.15rem;
}
.plan-addin-benefit,
.plan-addin-how {
    display: block;
    font-style: normal;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}
.meal-slot .plan-addins-block {
    margin-top: 0.4rem;
}
.plan-addins-inline {
    margin: 0.65rem 0 0.85rem;
}

.day-meal-recipes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.4rem;
}

.recipe-plan-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    background: rgba(107, 143, 60, 0.1);
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
}

.recipe-plan-link:hover {
    background: rgba(107, 143, 60, 0.18);
}

.weekly-plan-footer p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.45;
}

/* Phone: 3-day stack (yesterday / today / tomorrow) */
@media (max-width: 768px) {
    .weekly-plan-header h1 {
        font-size: 1.45rem;
    }

    .weekly-plan-subtitle-desktop {
        display: none;
    }

    .weekly-plan-subtitle-mobile {
        display: block;
        margin: 0.35rem 0 0;
        color: var(--text-secondary);
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .weekly-plan-card {
        border-radius: var(--radius-lg);
        overflow: hidden;
    }

    .weekly-plan-toolbar {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .weekly-plan-toolbar .weekly-plan-regen {
        width: auto;
        flex-shrink: 0;
        padding: 0.55rem 0.85rem;
    }

    .weekly-plan-toolbar .weekly-plan-regen span {
        display: none;
    }

    .week-navigation {
        display: none;
        margin-bottom: 0;
    }

    .week-grid,
    .week-grid.is-compact {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .weekly-plan-body {
        padding-top: 0.25rem;
    }

    .day-card {
        border-radius: 1rem;
        box-shadow: var(--shadow-sm);
    }

    .day-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }

    .day-card.is-today {
        border-color: transparent;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    }

    .day-card.is-yesterday,
    .day-card.is-tomorrow {
        opacity: 0.98;
    }

    .day-header {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.25rem 0.75rem;
        text-align: left;
        padding: 0.85rem 1rem;
    }

    .day-header.today::after {
        display: none;
    }

    .day-relative {
        width: 100%;
        font-size: 0.68rem;
        margin-bottom: 0;
    }

    .day-name {
        font-size: 1.05rem;
    }

    .day-date {
        font-size: 0.85rem;
        margin-left: auto;
    }

    .day-meals {
        padding: 0.65rem 0.75rem 0.85rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .day-meal {
        margin-bottom: 0;
        padding: 0.85rem 0.9rem;
        border-radius: 0.85rem;
        background: var(--bg-tertiary);
    }

    .day-meal:hover {
        transform: none;
    }

    .day-meal-type {
        font-size: 0.72rem;
        margin-bottom: 0.35rem;
    }

    .day-meal-food {
        font-size: 0.98rem;
        font-weight: 700;
    }

    .recipe-plan-link {
        min-height: 1.75rem;
        padding: 0.3rem 0.7rem;
        font-size: 0.78rem;
    }

    .weekly-plan-howto {
        display: none;
    }

    .weekly-plan-footer p {
        font-size: 0.82rem;
    }
}

/* ==================== Food Search ==================== */
.food-search-container {
    position: relative;
    margin-bottom: 1.25rem;
}

.food-search-input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 1rem;
    transition: all var(--transition-normal);
}

.food-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.food-search-icon {
    position: absolute;
    left: 1.125rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
}

.food-list {
    max-height: 350px;
    overflow-y: auto;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: white;
}

.food-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.food-item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(236, 72, 153, 0.02) 100%);
    padding-left: 1.5rem;
}

.food-item.selected {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.05) 100%);
    border-left: 4px solid var(--primary);
}

.food-item-info {
    flex: 1;
}

.food-item-name {
    font-weight: 700;
    color: var(--text-primary);
}

.food-item-hindi {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.food-item-category {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-full);
    text-transform: capitalize;
    font-weight: 600;
}

/* ==================== Reaction Buttons ==================== */
.reaction-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.reaction-btn {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-full);
    background: white;
    border: 2px solid var(--border-color);
    font-size: 0.95rem;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.reaction-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.reaction-btn.selected {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.reaction-btn.loved { 
    border-color: #ec4899;
    color: #ec4899;
}
.reaction-btn.loved.selected { 
    background: linear-gradient(135deg, #ec4899, #f472b6);
    color: white;
}

.reaction-btn.liked { 
    border-color: var(--success);
    color: var(--success);
}
.reaction-btn.liked.selected { 
    background: var(--gradient-fresh);
    color: white;
}

.reaction-btn.neutral { 
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}
.reaction-btn.neutral.selected { 
    background: var(--text-secondary);
    color: white;
}

.reaction-btn.disliked { 
    border-color: var(--warning);
    color: var(--warning);
}
.reaction-btn.disliked.selected { 
    background: var(--gradient-warm);
    color: white;
}

.reaction-btn.refused { 
    border-color: var(--danger);
    color: var(--danger);
}
.reaction-btn.refused.selected { 
    background: var(--gradient-sunset);
    color: white;
}

/* ==================== Portion Slider ==================== */
.portion-slider-container {
    margin: 1.25rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, white 100%);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.portion-slider {
    width: 100%;
    height: 10px;
    border-radius: var(--radius-full);
    -webkit-appearance: none;
    background: var(--border-color);
}

.portion-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.portion-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.portion-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ==================== Preferences ==================== */
.preference-section {
    margin-bottom: 2.5rem;
}

.preference-section h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--text-primary);
}

.preference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.preference-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-md);
    gap: 1rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.preference-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.preference-score {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.preference-score.liked { 
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(74, 222, 128, 0.2));
    color: var(--success);
}
.preference-score.disliked { 
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(248, 113, 113, 0.2));
    color: var(--danger);
}
.preference-score.neutral { 
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.preference-info {
    flex: 1;
}

.preference-food {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

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

/* ==================== Toast Notifications ==================== */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.toast {
    padding: 1.25rem 1.75rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slide-in-right 0.4s ease;
    min-width: 320px;
    border: 1px solid var(--border-color);
}

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

/* ==================== Onboarding ==================== */
.onboarding-container {
    max-width: 640px;
    margin: 2rem auto;
}

.onboarding-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.onboarding-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
}

.onboarding-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.onboarding-icon {
    font-size: 5rem;
    margin-bottom: 1.25rem;
    animation: float 3s ease-in-out infinite;
}

/* ==================== Mobile Header ==================== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.25rem;
    align-items: center;
    justify-content: space-between;
    z-index: 101;
    box-shadow: var(--shadow-sm);
}

.menu-toggle {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, white 100%);
    color: var(--text-primary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.menu-toggle:active {
    transform: scale(0.95);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.mobile-logo .logo-mark {
    width: 36px;
    height: 36px;
}

.mobile-logo .logo-text {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    background: none;
    -webkit-text-fill-color: initial;
}

.mobile-logo .brand-little { color: #6b8f3c; }
.mobile-logo .brand-bowl { color: #f97316; }

.mobile-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gradient-warm);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
}

a.mobile-avatar-link {
    text-decoration: none;
    color: white;
    flex-shrink: 0;
}

a.mobile-avatar-link:active {
    transform: scale(0.96);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity var(--transition-normal);
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    opacity: 1;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
    
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        transition: left var(--transition-normal);
        z-index: 100;
    }
    
    .sidebar.open {
        left: 0;
        z-index: 220; /* above mobile bottom nav so Account is tappable */
    }

    .sidebar-overlay.active {
        z-index: 210;
        pointer-events: auto;
    }

    .sidebar-footer {
        /* Keep account row clear of the fixed bottom nav */
        padding-bottom: calc(1.25rem + 72px + env(safe-area-inset-bottom, 0px));
    }
    
    .sidebar-overlay {
        display: block;
        pointer-events: none;
    }
    
    .sidebar-overlay.active {
        pointer-events: auto;
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100vw;
        padding: 1.25rem;
        padding-top: 80px;
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .card-header .btn {
        width: 100%;
    }
    
    .reaction-buttons {
        justify-content: center;
    }
    
    .reaction-btn {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
    
    .food-list {
        max-height: 280px;
    }
    
    .week-navigation {
        flex-direction: column;
        gap: 1.25rem;
    }
    
    .week-nav-btn {
        width: 100%;
        text-align: center;
    }

    /* Compact weekly plan owns its toolbar on phones — don't stretch regen full-width */
    .weekly-plan-toolbar.card-header {
        flex-direction: row;
        align-items: center;
    }

    .weekly-plan-toolbar .btn {
        width: auto;
    }
    
    body.sidebar-open {
        overflow: hidden;
    }
}

/* ==================== Mobile Bottom Navigation ==================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: white;
    border-top: 1px solid var(--border-color);
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    transition: all var(--transition-fast);
    padding: 0.625rem;
    position: relative;
}

.bottom-nav-item i {
    font-size: 1.35rem;
    transition: all var(--transition-fast);
}

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

.bottom-nav-item.active i {
    transform: scale(1.2);
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 0 0 4px 4px;
}

.bottom-nav-item:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    
    .main-content {
        padding-bottom: 90px;
    }
}

@media (max-width: 480px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .nutrition-grid {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        flex-direction: column;
    }
    
    .radio-group {
        flex-direction: column;
    }
    
    .reaction-buttons {
        flex-direction: column;
    }
    
    .reaction-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==================== PWA Install Banner ==================== */
.install-banner {
    display: none;
    position: fixed;
    bottom: 90px;
    left: 1.25rem;
    right: 1.25rem;
    padding: 1.25rem;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 99;
    align-items: center;
    gap: 1.25rem;
    animation: slide-up 0.5s ease-out;
}

.install-banner.show {
    display: flex;
}

.install-banner-text {
    flex: 1;
}

.install-banner-text h4 {
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.install-banner-text p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.install-banner-btn {
    padding: 0.75rem 1.25rem;
    background: white;
    color: var(--primary);
    border-radius: var(--radius-full);
    font-weight: 700;
    transition: all var(--transition-fast);
}

.install-banner-btn:hover {
    transform: scale(1.05);
}

.install-banner-close {
    padding: 0.5rem;
    color: white;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.install-banner-close:hover {
    opacity: 1;
}

/* ==================== Touch Optimizations ==================== */
@media (pointer: coarse) {
    .btn, .meal-action, .reaction-btn, .food-item, .nav-item a {
        min-height: 48px;
    }
    
    .form-input, .form-select {
        min-height: 52px;
        font-size: 16px;
    }
}

/* ==================== Safe Area Support ==================== */
@supports (padding: max(0px)) {
    .mobile-header {
        padding-top: max(0px, env(safe-area-inset-top));
        height: calc(64px + env(safe-area-inset-top));
    }
    
    .mobile-bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(70px + env(safe-area-inset-bottom));
    }
    
    .main-content {
        padding-bottom: calc(90px + env(safe-area-inset-bottom));
    }
}

/* ==================== Loading States ==================== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==================== Empty States ==================== */
.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
}

.empty-state-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.empty-state h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.625rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* ==================== Adult Meal Adapter ==================== */
.adult-meal-input {
    margin-bottom: 1.75rem;
}

.adult-meal-input textarea {
    width: 100%;
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    min-height: 100px;
    resize: vertical;
    transition: all var(--transition-normal);
}

.adult-meal-input textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.adaptation-results {
    margin-top: 1.75rem;
}

.adaptation-card {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, white 100%);
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
}

.adaptation-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.adaptation-card h4 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.adaptation-tips {
    list-style: none;
}

.adaptation-tips li {
    padding: 0.625rem 0;
    padding-left: 1.75rem;
    position: relative;
    color: var(--text-secondary);
}

.adaptation-tips li::before {
    content: "💡";
    position: absolute;
    left: 0;
    font-size: 1rem;
}

/* ==================== Meal Type Icons ==================== */
.meal-type-icon {
    display: inline-block;
    margin-right: 0.5rem;
}

.meal-type-icon.breakfast::before { content: "🌅"; }
.meal-type-icon.mid_morning_snack::before { content: "🍎"; }
.meal-type-icon.lunch::before { content: "🍱"; }
.meal-type-icon.evening_snack::before { content: "🥛"; }
.meal-type-icon.dinner::before { content: "🌙"; }

/* ==================== Decorative Elements ==================== */
.decorative-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    z-index: -1;
    pointer-events: none;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: rgba(99, 102, 241, 0.3);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.blob-2 {
    width: 200px;
    height: 200px;
    background: rgba(236, 72, 153, 0.3);
    bottom: -50px;
    left: -50px;
    animation: float 6s ease-in-out infinite reverse;
}

/* ==================== Success Animation ==================== */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: var(--gradient-fresh);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce-in 0.6s ease-out;
}

.success-checkmark i {
    color: white;
    font-size: 2.5rem;
}

/* ==================== Skeleton Loading ==================== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border-color) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

/* ==================== Tooltip ==================== */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 0.5rem 0.875rem;
    background: var(--text-primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    z-index: 100;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* ==================== Auth Section in Sidebar ==================== */
.auth-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.auth-profile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    cursor: pointer;
    position: relative;
    z-index: 3;
    -webkit-tap-highlight-color: rgba(107, 143, 60, 0.2);
}

.auth-profile-link:hover {
    background: var(--bg-secondary);
}

.auth-profile-link:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.auth-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.auth-chevron {
    color: var(--text-muted);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.auth-info {
    flex: 1;
    overflow: hidden;
}

.auth-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-email {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-section.guest {
    text-align: center;
}

.guest-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.guest-notice i {
    color: var(--warning);
}

.auth-signup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.auth-signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.auth-login-link {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
}

.auth-login-link strong {
    color: var(--primary);
}

.auth-login-link:hover strong {
    text-decoration: underline;
}

/* Flash Messages */
.flash-messages {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
}

.flash-message {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slide-in-right 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flash-message.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.flash-message.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.flash-message.info {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.flash-message.warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

/* ==================== Recipes library ==================== */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.recipe-card {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, white 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.recipe-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}

.recipe-media {
    position: relative;
    margin: -1.25rem -1.25rem 1rem;
}

.recipe-cover {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    background: #e8efe0;
}

.recipe-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 700;
}

.recipe-video-link {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
}

.recipe-embed-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-bottom: 0.85rem;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.recipe-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.recipe-card-top {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.recipe-category {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.recipe-badge {
    font-size: 0.7rem;
    font-weight: 800;
    background: var(--gradient-warm, linear-gradient(135deg, #f59e0b, #ef4444));
    color: #fff;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
}

.recipe-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    align-items: center;
}

.recipe-filters input,
.recipe-filters select {
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 0 12px;
    font-family: inherit;
    min-width: 160px;
}

.recipe-filters input[type="search"] {
    flex: 1;
    min-width: 200px;
}

.recipe-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.recipe-steps {
    background: rgba(34, 197, 94, 0.08);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.9rem;
    color: #166534;
}

.recipe-meta {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.recipe-card.is-highlighted {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(107, 143, 60, 0.2), var(--shadow-md);
}

.recipe-habit-banner {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0 0 1.1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(107, 143, 60, 0.1);
    border: 1px solid rgba(107, 143, 60, 0.28);
}
.recipe-habit-banner strong {
    font-size: 0.95rem;
    color: var(--primary-dark, #4a6b2a);
}
.recipe-habit-banner span {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.recipe-hidden-veggies {
    margin-top: 0.85rem;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-md);
    background: rgba(107, 143, 60, 0.08);
    border: 1px dashed rgba(107, 143, 60, 0.35);
}
.recipe-hidden-veggies strong {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--primary-dark, #4a6b2a);
    font-size: 0.9rem;
}
.recipe-hidden-veggies ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.recipe-hidden-veggies li {
    font-size: 0.85rem;
    line-height: 1.35;
    color: var(--text-secondary);
}
.recipe-hv-name {
    font-weight: 700;
    color: var(--text-primary);
}
.recipe-hv-to {
    margin-left: 0.2rem;
}
.recipe-hv-how {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ===== Notification settings (profile) + dashboard banner ===== */
.notify-settings {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.notify-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(107, 143, 60, 0.12), rgba(196, 163, 90, 0.1));
    border: 1px solid rgba(107, 143, 60, 0.18);
}
.notify-lead {
    margin: 0;
    color: var(--text-secondary, #6b7a5a);
    line-height: 1.45;
    font-size: 0.95rem;
}
.notify-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}
.notify-badge-on {
    background: rgba(34, 197, 94, 0.15);
    color: #166534;
}
.notify-badge-off {
    background: rgba(239, 68, 68, 0.12);
    color: #991b1b;
}
.notify-badge-pending {
    background: rgba(245, 158, 11, 0.16);
    color: #92400e;
}
.notify-toggles {
    display: grid;
    gap: 0.65rem;
}
.notify-toggle-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border: 1.5px solid var(--border-color, #d7e0c8);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
}
.notify-toggle-card input {
    margin-top: 0.2rem;
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--primary, #6b8f3c);
    flex-shrink: 0;
}
.notify-toggle-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.notify-toggle-copy strong {
    font-size: 0.98rem;
}
.notify-toggle-copy small {
    color: var(--text-muted, #6b7a5a);
    font-size: 0.82rem;
    line-height: 1.35;
    font-weight: 500;
}
.notify-times {
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    border: 1.5px solid var(--border-color, #d7e0c8);
    background: rgba(255, 250, 240, 0.65);
    transition: opacity 0.15s ease;
}
.notify-times.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}
.notify-times-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}
.notify-times-head h4 {
    margin: 0;
    font-size: 0.95rem;
}
.notify-times-hint {
    font-size: 0.78rem;
    color: var(--text-muted, #6b7a5a);
}
.notify-time-grid {
    display: grid;
    gap: 0.45rem;
}
.notify-time-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
}
.notify-time-row input[type="time"] {
    border: 1.5px solid var(--border-color, #d7e0c8);
    border-radius: 10px;
    padding: 0.45rem 0.6rem;
    font: inherit;
    background: #fff;
}
.notify-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}
.notify-status {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary, #6b7a5a);
}
.notify-status.is-ok { color: #166534; }
.notify-status.is-error { color: #991b1b; }

.notify-banner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    border-radius: 14px;
    border: 1.5px solid transparent;
}
.notify-banner[hidden] { display: none !important; }
.notify-banner-info {
    background: rgba(107, 143, 60, 0.1);
    border-color: rgba(107, 143, 60, 0.25);
}
.notify-banner-warn {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
}
.notify-banner-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(107, 143, 60, 0.18);
    color: var(--primary, #6b8f3c);
    flex-shrink: 0;
}
.notify-banner-warn .notify-banner-icon {
    background: rgba(245, 158, 11, 0.2);
    color: #92400e;
}
.notify-banner-copy {
    flex: 1;
    min-width: 0;
}
.notify-banner-copy strong {
    display: block;
    margin-bottom: 0.15rem;
}
.notify-banner-copy p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-secondary, #6b7a5a);
    line-height: 1.35;
}
@media (max-width: 560px) {
    .notify-hero { flex-direction: column; }
    .notify-banner { flex-wrap: wrap; }
}
