/* ==========================================
   FN DIET PRO v2 - Design System
   Argon Glassmorphism + Dark Mode
   ========================================== */

/* === CSS Variables === */
:root {
    /* Primary Palette */
    --color-primary: #5e72e4;
    --color-primary-light: #818cf8;
    --color-primary-dark: #4c51bf;
    --color-secondary: #825ee4;
    --color-cyan: #11cdef;
    --color-emerald: #2dce89;
    --color-emerald-dark: #1aab65;
    --color-amber: #fb6340;
    --color-danger: #f5365c;
    --color-warning: #fbbf24;
    --color-muted: #8898aa;

    /* Surfaces */
    --bg-body: #f0f2f8;
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-card-hover: rgba(255, 255, 255, 0.98);
    --bg-surface: #f8fafc;
    --bg-input: #ffffff;
    --bg-pill: #f1f5f9;
    --bg-pill-active: var(--color-primary);
    --border-card: rgba(255, 255, 255, 0.75);
    --border-default: rgba(226, 232, 240, 0.8);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    /* Shadows */
    --shadow-card: 0 10px 30px -5px rgba(50, 50, 93, 0.07), 0 5px 15px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 45px -15px rgba(94, 114, 228, 0.15), 0 10px 20px -10px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 25px rgba(94, 114, 228, 0.3);
    --shadow-emerald-glow: 0 0 25px rgba(45, 206, 137, 0.25);

    /* Radii */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-default: 0.25s ease;
    --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Sidebar */
    --sidebar-width: 280px;
}

/* === Dark Mode === */
.dark {
    --bg-body: #0b1120;
    --bg-card: rgba(30, 41, 59, 0.88);
    --bg-card-hover: rgba(30, 41, 59, 0.95);
    --bg-surface: #1e293b;
    --bg-input: #1e293b;
    --bg-pill: #1e293b;
    --border-card: rgba(255, 255, 255, 0.08);
    --border-default: rgba(51, 65, 85, 0.8);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 45px -15px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--color-primary);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.3); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* === Typography === */
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--color-primary) !important; }
.dark .text-primary { color: var(--color-primary-light) !important; }
.text-emerald { color: var(--color-emerald) !important; }
.text-amber { color: var(--color-amber) !important; }
.text-cyan { color: var(--color-cyan) !important; }
.text-danger { color: var(--color-danger) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: #fff !important; }
.text-indigo-light { color: #a5b4fc !important; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mb-3 { margin-bottom: 0.75rem; }
.opacity-80 { opacity: 0.8; }
.hidden { display: none !important; }
.flex-1 { flex: 1; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* === Layout Utilities === */
.flex-row {
    display: flex;
    align-items: center;
}
.flex-wrap { flex-wrap: wrap; }
.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }

/* ============================================
   SPLASH SCREEN
   ============================================ */
#splash-screen {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #312e81, #5e72e4, #7c3aed);
    animation: splashFade 0.5s ease 1.5s forwards;
}
@keyframes splashFade {
    to { opacity: 0; pointer-events: none; }
}
.splash-content {
    text-align: center;
    color: white;
}
.splash-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
    animation: splashPulse 1s ease-in-out infinite;
}
@keyframes splashPulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.splash-content h1 {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}
.splash-content p {
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 16px;
}
.splash-bar {
    width: 180px;
    height: 4px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.2);
    margin: 0 auto;
    overflow: hidden;
}
.splash-bar-fill {
    width: 0;
    height: 100%;
    background: white;
    border-radius: var(--radius-full);
    animation: splashLoad 1.3s ease forwards;
}
@keyframes splashLoad {
    to { width: 100%; }
}

/* ============================================
   APP WRAPPER
   ============================================ */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    padding-bottom: 80px;
}
@media (min-width: 1024px) {
    .app-wrapper { padding-bottom: 16px; }
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    display: none;
    flex-direction: column;
    width: var(--sidebar-width);
    position: fixed;
    inset: 0;
    left: 0;
    z-index: 30;
    padding: 12px;
}
@media (min-width: 1024px) {
    .sidebar { display: flex; }
}

.sidebar-inner {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Sidebar Brand */
.sidebar-brand {
    padding: 16px 16px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-default);
}
.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    box-shadow: var(--shadow-glow);
    flex-shrink: 0;
}
.brand-title {
    display: flex;
    align-items: center;
    gap: 6px;
}
.brand-title span:first-child {
    font-weight: 900;
    font-size: 15px;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}
.brand-subtitle {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
}

/* Sidebar User Card */
.sidebar-user-card {
    margin: 10px 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--bg-pill);
    border: 1px solid var(--border-default);
}
.user-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.user-card-body {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-card-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-card-goal {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: var(--color-emerald);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0 10px 12px;
}
.nav-group-label {
    padding: 0 16px 4px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}
.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: 12px;
    color: var(--text-secondary);
    border: none;
    background: none;
    cursor: pointer;
    transition: var(--transition-default);
    text-align: left;
    margin-bottom: 2px;
    border-right: 3px solid transparent;
}
.nav-item:hover {
    background: rgba(94, 114, 228, 0.06);
}
.nav-item.active {
    background: linear-gradient(90deg, rgba(94, 114, 228, 0.12), transparent);
    color: var(--color-primary);
    font-weight: 800;
    border-right-color: var(--color-primary);
}
.dark .nav-item.active {
    background: linear-gradient(90deg, rgba(94, 114, 228, 0.2), transparent);
    color: var(--color-primary-light);
    border-right-color: var(--color-primary-light);
}
.nav-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.nav-icon.bg-indigo { background: rgba(94, 114, 228, 0.12); color: var(--color-primary); }
.nav-icon.bg-amber { background: rgba(251, 99, 64, 0.12); color: var(--color-amber); }
.nav-icon.bg-emerald { background: rgba(45, 206, 137, 0.12); color: var(--color-emerald); }
.nav-icon.bg-cyan { background: rgba(17, 205, 239, 0.12); color: var(--color-cyan); }
.nav-title {
    display: block;
    font-weight: 700;
    line-height: 1.2;
}
.nav-desc {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 400;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px;
}
.sidebar-footer-inner {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #0f172a, #1e1b4b, #0f172a);
    color: white;
}
.footer-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #a5b4fc;
    margin-bottom: 8px;
}
.footer-actions {
    display: flex;
    gap: 6px;
}
.btn-footer {
    flex: 1;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-default);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.btn-footer:hover { background: rgba(255,255,255,0.2); }

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
@media (min-width: 1024px) {
    .main-content { margin-left: var(--sidebar-width); }
}

/* ============================================
   HERO HEADER
   ============================================ */
.hero-header {
    background: linear-gradient(-45deg, #312e81, #5e72e4, #7c3aed, #0891b2, #059669);
    background-size: 300% 300%;
    animation: meshGradient 16s ease infinite;
    padding: 20px 16px 100px;
    color: white;
    position: relative;
    overflow: hidden;
}
.dark .hero-header {
    background: linear-gradient(-45deg, #090d16, #1e1b4b, #312e81, #0f766e, #0f172a);
    background-size: 300% 300%;
    animation: meshGradient 16s ease infinite;
}
@keyframes meshGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-orb {
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    filter: blur(40px);
    pointer-events: none;
    top: -60px;
    right: 40px;
    animation: floatOrb 8s ease-in-out infinite;
}
.hero-orb-2 {
    width: 160px;
    height: 160px;
    top: auto;
    bottom: -40px;
    left: 10%;
    animation-delay: -3s;
}
@keyframes floatOrb {
    0%,100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-14px) scale(1.04); }
}

.hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}
@media (min-width: 640px) {
    .hero-header { padding: 24px 24px 100px; }
}
@media (min-width: 1024px) {
    .hero-header { padding: 24px 32px 100px; }
}

.hero-top {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
@media (min-width: 1024px) {
    .hero-top { flex-direction: row; align-items: center; justify-content: space-between; }
}
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}
.hero-title {
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: -0.3px;
    line-height: 1.3;
}
@media (min-width: 640px) {
    .hero-title { font-size: 1.5rem; }
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* Member Switcher Bar */
.member-switcher-bar {
    margin-top: 16px;
    padding: 10px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
@media (min-width: 768px) {
    .member-switcher-bar { flex-direction: row; align-items: center; justify-content: space-between; }
}
.members-list {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.member-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    align-self: flex-end;
}
@media (min-width: 768px) {
    .member-actions { align-self: center; }
}

.member-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 8px;
    border-radius: var(--radius-full);
    border: 2px solid transparent;
    background: rgba(255,255,255,0.1);
    cursor: pointer;
    transition: var(--transition-default);
    flex-shrink: 0;
    color: rgba(255,255,255,0.8);
    font-size: 12px;
    font-weight: 700;
}
.member-pill:hover { background: rgba(255,255,255,0.15); }
.member-pill.active {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    color: white;
}

/* ============================================
   KPI SECTION
   ============================================ */
.kpi-section {
    max-width: 1280px;
    width: 100%;
    margin: -70px auto 24px;
    padding: 0 16px;
    position: relative;
    z-index: 20;
}
@media (min-width: 640px) {
    .kpi-section { padding: 0 24px; }
}
@media (min-width: 1024px) {
    .kpi-section { padding: 0 32px; }
}
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 1024px) {
    .kpi-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

.kpi-card {
    padding: 18px;
}
@media (min-width: 640px) {
    .kpi-card { padding: 22px; }
}
.kpi-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
.kpi-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.kpi-value {
    font-size: 1.25rem;
    font-weight: 900;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    margin-top: 4px;
}
@media (min-width: 640px) {
    .kpi-value { font-size: 1.5rem; }
}
.kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 15px;
    flex-shrink: 0;
}
.kpi-bottom {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}
.kpi-link {
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: none;
    font-family: 'JetBrains Mono', monospace;
    text-decoration: underline;
    text-decoration-style: dotted;
}
.kpi-link:hover { color: var(--color-primary); }

/* ============================================
   MAIN SECTIONS
   ============================================ */
.main-sections {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px 48px;
}
@media (min-width: 640px) {
    .main-sections { padding: 0 24px 48px; }
}
@media (min-width: 1024px) {
    .main-sections { padding: 0 32px 48px; }
}

.tab-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ============================================
   GLASS CARD (Shared)
   ============================================ */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    transition: var(--transition-default);
}
.glass-card:hover {
    box-shadow: var(--shadow-xl);
}

.card-section {
    padding: 22px;
}
@media (min-width: 640px) {
    .card-section { padding: 28px; }
}

.card-highlight-emerald {
    border: 2px solid rgba(45, 206, 137, 0.25);
}

.card-dark {
    border-radius: var(--radius-xl);
    padding: 28px;
    background: linear-gradient(135deg, #0f172a, #1e1b4b, #0f172a);
    color: white;
    box-shadow: var(--shadow-xl);
}

/* Card Header */
.card-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
@media (min-width: 640px) {
    .card-header { flex-direction: row; align-items: center; justify-content: space-between; }
}
.card-header-stacked {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}
@media (min-width: 768px) {
    .card-header-stacked { flex-direction: row; align-items: center; justify-content: space-between; }
}
.card-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.card-dark .card-title { color: white; }

.card-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-default);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

/* ============================================
   BADGES & LABELS
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}
.badge-sm { font-size: 9px; padding: 2px 7px; }
.badge-primary { background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); color: white; }
.badge-emerald { background: var(--color-emerald); color: white; }
.badge-glass { background: rgba(255,255,255,0.15); color: white; border: 1px solid rgba(255,255,255,0.2); }
.badge-soft-indigo { background: rgba(94, 114, 228, 0.12); color: var(--color-primary); }
.dark .badge-soft-indigo { color: var(--color-primary-light); }
.badge-soft-emerald { background: rgba(45, 206, 137, 0.12); color: var(--color-emerald); }
.badge-soft-amber { background: rgba(251, 99, 64, 0.12); color: var(--color-amber); }

.label-tiny {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}
.link-tiny {
    font-size: 10px;
    font-weight: 800;
    color: var(--color-primary);
    border: none;
    background: none;
    cursor: pointer;
    text-decoration: none;
}
.link-tiny:hover { text-decoration: underline; }

/* Status Dot */
.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-emerald);
}
.status-dot.pulse { animation: pulse 2s ease-in-out infinite; }
.status-dot.bg-amber { background: var(--color-amber); }
@keyframes pulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* ============================================
   AVATARS
   ============================================ */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}
.avatar-md { width: 36px; height: 36px; border-radius: 12px; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; border-radius: 14px; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: var(--transition-bounce);
    white-space: nowrap;
    text-decoration: none;
}
.btn:active { transform: translateY(0) scale(0.97); }

.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-xs { padding: 6px 12px; font-size: 11px; border-radius: var(--radius-sm); }

.btn-primary { background: var(--color-primary); color: white; box-shadow: 0 4px 12px rgba(94,114,228,0.3); }
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-gradient { background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); color: white; box-shadow: 0 4px 12px rgba(94,114,228,0.3); }
.btn-emerald { background: var(--color-emerald); color: white; box-shadow: 0 4px 12px rgba(45,206,137,0.3); }
.btn-emerald:hover { background: var(--color-emerald-dark); }
.btn-danger { background: var(--color-danger); color: white; }
.btn-white { background: white; color: var(--color-primary); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.btn-white:hover { background: #f8fafc; }
.btn-glass { background: rgba(255,255,255,0.12); color: white; border: 1px solid rgba(255,255,255,0.2); }
.btn-glass:hover { background: rgba(255,255,255,0.2); }
.btn-glass-green { background: rgba(45,206,137,0.2); color: #86efac; border: 1px solid rgba(45,206,137,0.3); }
.btn-glass-green:hover { background: rgba(45,206,137,0.3); }
.btn-outline { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-default); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline-emerald { background: rgba(45,206,137,0.1); color: var(--color-emerald); border: none; }
.btn-outline-emerald:hover { background: rgba(45,206,137,0.2); }
.btn-outline-danger { background: rgba(245,54,92,0.08); color: var(--color-danger); border: none; }
.btn-outline-danger:hover { background: rgba(245,54,92,0.15); }

.btn-icon-glass {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-default);
    font-size: 14px;
}
.btn-icon-glass:hover { background: rgba(255,255,255,0.2); }

.lift {
    transition: var(--transition-bounce);
}
.lift:hover { transform: translateY(-2px); }
.lift:active { transform: translateY(0) scale(0.98); }

/* ============================================
   SELECT & INPUT (Glass)
   ============================================ */
.select-glass {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    padding: 6px 14px;
    color: white;
    font-size: 12px;
}
.select-glass select {
    background: transparent;
    border: none;
    color: white;
    font-size: 12px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    outline: none;
}
.select-glass select option {
    background: #1e293b;
    color: white;
}
.select-glass i { color: rgba(165, 243, 252, 0.8); font-size: 12px; }

.select-styled {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    outline: none;
    cursor: pointer;
}

.search-box {
    position: relative;
    min-width: 180px;
}
.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 12px;
}
.search-box input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition-default);
}
.search-box input:focus { border-color: var(--color-primary); }

/* ============================================
   TOGGLE GROUP
   ============================================ */
.toggle-group {
    display: flex;
    align-items: center;
    padding: 3px;
    border-radius: var(--radius-sm);
    background: var(--bg-pill);
}
.toggle-btn {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-default);
    display: flex;
    align-items: center;
    gap: 4px;
}
.toggle-btn.active {
    background: white;
    color: var(--color-primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.dark .toggle-btn.active {
    background: var(--bg-surface);
    color: var(--color-primary-light);
}
.toggle-dark { background: rgba(255,255,255,0.08); }
.toggle-dark .toggle-btn { color: rgba(255,255,255,0.5); }
.toggle-dark .toggle-btn.active { background: var(--color-primary); color: white; }

/* ============================================
   FILTER PILLS
   ============================================ */
.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.pill {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 800;
    border: none;
    background: var(--bg-pill);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-default);
}
.pill:hover { background: rgba(94, 114, 228, 0.1); }
.pill.active {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(94,114,228,0.3);
}

/* ============================================
   WEEK PILLS
   ============================================ */
.week-pills-scroll {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 16px;
}
.week-pills-list {
    display: flex;
    gap: 6px;
}
.week-pill {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 800;
    border: none;
    background: var(--bg-pill);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-default);
}
.week-pill:hover { background: rgba(94, 114, 228, 0.12); color: var(--color-primary); }
.week-pill.active {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    box-shadow: 0 4px 12px rgba(94,114,228,0.3);
}

/* ============================================
   DAY STRIP
   ============================================ */
.day-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    padding: 4px;
    border-radius: var(--radius-md);
    background: var(--bg-pill);
    margin-bottom: 16px;
}
.day-btn {
    padding: 8px 6px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 800;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-default);
    text-align: center;
}
.day-btn.active {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(94,114,228,0.3);
}
.day-btn:hover:not(.active) { background: rgba(94, 114, 228, 0.1); color: var(--color-primary); }

/* ============================================
   SVG RINGS
   ============================================ */
.rings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 4px 0;
}
.ring-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
}
.ring-container {
    position: relative;
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ring-container svg { width: 100%; height: 100%; }
.ring-bg { color: var(--border-default); }
.ring-progress {
    transition: stroke-dashoffset 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
}
.ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ring-label { font-size: 9px; font-weight: 800; text-transform: uppercase; color: var(--text-muted); }
.ring-value { font-size: 1.1rem; font-weight: 900; font-family: 'JetBrains Mono', monospace; }
.ring-pct { font-size: 9px; font-weight: 700; color: var(--text-muted); }
.ring-msg { margin-top: 8px; font-size: 12px; font-weight: 800; }

/* ============================================
   WATER TRACKER
   ============================================ */
.water-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-default);
}
.water-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 8px;
}
.water-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 6px;
}
.water-glass {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-default);
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-bounce);
    opacity: 0.4;
}
.water-glass.filled {
    opacity: 1;
    background: rgba(17, 205, 239, 0.1);
    border-color: var(--color-cyan);
}
.water-glass:hover { transform: scale(1.05); }

/* ============================================
   TWO COLUMN LAYOUT
   ============================================ */
.two-col-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}
@media (min-width: 1024px) {
    .two-col-layout { grid-template-columns: 5fr 7fr; }
}
.col-left, .col-right { display: flex; flex-direction: column; justify-content: space-between; }

/* Charts specific layout */
.col-chart-left, .col-chart-right { min-height: 300px; }
@media (min-width: 1024px) {
    .two-col-layout:has(.col-chart-left) { grid-template-columns: 8fr 4fr; }
}
.chart-wrapper { height: 260px; position: relative; }

/* ============================================
   MEALS LIST
   ============================================ */
.meals-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.meal-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    transition: var(--transition-default);
    cursor: pointer;
}
.meal-item:hover {
    border-color: rgba(94,114,228,0.3);
    box-shadow: 0 4px 12px rgba(94,114,228,0.08);
}
.meal-item.checked {
    border-color: var(--color-emerald);
    background: rgba(45, 206, 137, 0.05);
}
.meal-icon {
    font-size: 22px;
    flex-shrink: 0;
}
.meal-info { flex: 1; min-width: 0; }
.meal-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.meal-detail { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.meal-macros {
    display: flex;
    gap: 12px;
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    flex-shrink: 0;
}
.meal-check {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-default);
    flex-shrink: 0;
    background: var(--bg-input);
    color: transparent;
    font-size: 12px;
}
.meal-check.done {
    background: var(--color-emerald);
    border-color: var(--color-emerald);
    color: white;
}
.meal-assign-btn {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    border: 1px dashed var(--border-default);
    background: transparent;
    color: var(--color-primary);
    cursor: pointer;
    transition: var(--transition-default);
}
.meal-assign-btn:hover { border-style: solid; background: rgba(94,114,228,0.05); }

/* ============================================
   BENTO GRID (Schedule)
   ============================================ */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
@media (min-width: 768px) {
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
    .bento-grid { grid-template-columns: repeat(3, 1fr); }
}

.bento-card {
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    transition: var(--transition-default);
}
.bento-card:hover {
    border-color: rgba(94,114,228,0.2);
    box-shadow: 0 4px 16px rgba(94,114,228,0.06);
}
.bento-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.bento-day-name {
    font-weight: 800;
    font-size: 14px;
    color: var(--text-primary);
}
.bento-meal-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(226,232,240,0.4);
    font-size: 12px;
}
.dark .bento-meal-row { border-bottom-color: rgba(51,65,85,0.4); }
.bento-meal-row:last-child { border-bottom: none; }
.bento-meal-icon { font-size: 14px; flex-shrink: 0; }
.bento-meal-name {
    flex: 1;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.bento-meal-name:hover { color: var(--color-primary); }
.bento-macro-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    flex-shrink: 0;
}
.bento-macro-tag.protein { background: rgba(45,206,137,0.1); color: var(--color-emerald); }
.bento-macro-tag.calo { background: rgba(251,99,64,0.1); color: var(--color-amber); }

.bento-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border-default);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

/* ============================================
   DATA TABLE
   ============================================ */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-default);
}
.data-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
    font-size: 12px;
}
.data-table thead tr {
    background: var(--bg-pill);
}
.data-table th {
    padding: 12px 16px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    white-space: nowrap;
}
.data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-default);
    color: var(--text-secondary);
}
.data-table tbody tr:hover {
    background: rgba(94, 114, 228, 0.03);
}
.data-table tbody tr:last-child td { border-bottom: none; }

/* ============================================
   DISHES GRID
   ============================================ */
.dishes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 768px) {
    .dishes-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .dishes-grid { grid-template-columns: repeat(3, 1fr); }
}

.dish-card {
    padding: 20px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-card);
    transition: var(--transition-default);
    position: relative;
    overflow: hidden;
}
.dish-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.dish-card.meal-Sáng::before { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.dish-card.meal-Trưa::before { background: linear-gradient(90deg, #38bdf8, #0ea5e9); }
.dish-card.meal-Tối::before { background: linear-gradient(90deg, #818cf8, #6366f1); }
.dish-card.meal-Phụ::before { background: linear-gradient(90deg, #34d399, #10b981); }

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

.dish-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}
.dish-name { font-size: 14px; font-weight: 800; color: var(--text-primary); }
.dish-meal-badge {
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    background: var(--bg-pill);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.dish-ings {
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.dish-ing-tag {
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
    background: rgba(94,114,228,0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(94,114,228,0.08);
}

.dish-stats {
    display: flex;
    gap: 10px;
    font-family: 'JetBrains Mono', monospace;
}
.dish-stat {
    flex: 1;
    padding: 8px;
    border-radius: var(--radius-sm);
    text-align: center;
}
.dish-stat-label { font-size: 9px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; display: block; }
.dish-stat-val { font-size: 15px; font-weight: 800; display: block; margin-top: 2px; }

.dish-actions {
    margin-top: 12px;
    display: flex;
    gap: 6px;
}
.dish-action-btn {
    flex: 1;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    border: 1px solid var(--border-default);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-default);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.dish-action-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.dish-action-btn.danger:hover { border-color: var(--color-danger); color: var(--color-danger); }

/* ============================================
   COMPARISON GRID
   ============================================ */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
@media (min-width: 768px) {
    .comparison-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

.compare-card {
    padding: 18px;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-default);
    background: var(--bg-surface);
    transition: var(--transition-default);
}
.compare-card.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(94,114,228,0.12);
}
.compare-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.compare-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.compare-stat {
    padding: 8px;
    border-radius: 8px;
    background: var(--bg-pill);
    text-align: center;
}
.compare-stat-label { font-size: 9px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; display: block; }
.compare-stat-val { font-size: 14px; font-weight: 800; font-family: 'JetBrains Mono', monospace; display: block; margin-top: 2px; }

/* ============================================
   SHOPPING GRID
   ============================================ */
.shopping-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 640px) {
    .shopping-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .shopping-grid { grid-template-columns: repeat(3, 1fr); }
}

.shopping-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    font-size: 13px;
}
.shopping-item-name { font-weight: 700; color: var(--text-primary); }
.shopping-item-amount {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 12px;
    color: var(--color-primary);
    white-space: nowrap;
}

/* ============================================
   BACKUP GRID
   ============================================ */
.backup-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
}
@media (min-width: 640px) {
    .backup-grid { grid-template-columns: repeat(3, 1fr); }
}
.backup-card {
    padding: 18px;
    border-radius: var(--radius-md);
    color: white;
    text-align: left;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.bg-emerald { background: var(--color-emerald); }
.bg-indigo { background: var(--color-primary); }
.backup-upload {
    padding: 18px;
    border-radius: var(--radius-md);
    border: 2px dashed var(--border-default);
    background: rgba(94,114,228,0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: var(--transition-default);
    text-align: center;
}
.backup-upload:hover { border-color: var(--color-primary); }
.backup-upload input { display: none; }
.icon-box {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.bg-emerald-soft { background: rgba(45,206,137,0.12); }

/* ============================================
   GRADIENTS
   ============================================ */
.bg-gradient-emerald { background: linear-gradient(135deg, #34d399, #059669); }
.bg-gradient-amber { background: linear-gradient(135deg, #fbbf24, #ea580c); }
.bg-gradient-indigo { background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); box-shadow: var(--shadow-glow); }
.bg-gradient-cyan { background: linear-gradient(135deg, #22d3ee, #0284c7); }

/* ============================================
   MOBILE BOTTOM DOCK
   ============================================ */
.mobile-dock {
    display: flex;
    position: fixed;
    bottom: 10px;
    left: 10px;
    right: 10px;
    z-index: 40;
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 6px;
    align-items: center;
    justify-content: space-around;
}
@media (min-width: 1024px) {
    .mobile-dock { display: none; }
}

.dock-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-bounce);
    position: relative;
    font-size: 15px;
}
.dock-btn span:not(.dock-dot) { font-size: 9px; font-weight: 800; }
.dock-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition-default);
}
.dock-btn.active {
    color: var(--color-primary);
    transform: translateY(-3px);
}
.dark .dock-btn.active { color: var(--color-cyan); }
.dock-btn.active .dock-dot {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 51;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.modal.show {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    transform: translateY(10px);
    transition: transform 0.25s ease;
}
.modal.show .modal-content { transform: translateY(0); }
.modal-lg { max-width: 640px; }
.modal-sm { max-width: 380px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-default);
}
.modal-title { font-size: 15px; font-weight: 800; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--bg-pill);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-default);
}
.modal-close:hover { background: rgba(245,54,92,0.1); color: var(--color-danger); }

.modal-body { padding: 22px; }
.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px;
    border-top: 1px solid var(--border-default);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: 14px;
}
.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}
.form-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition-default);
}
.form-input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(94,114,228,0.12); }

.form-row {
    display: flex;
    gap: 12px;
}
.form-stat {
    flex: 1;
    padding: 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    text-align: center;
}

.dish-ing-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dish-ing-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dish-ing-row select, .dish-ing-row input {
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    outline: none;
}
.dish-ing-row select { flex: 2; }
.dish-ing-row input { flex: 1; }
.dish-ing-remove {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: rgba(245,54,92,0.08);
    color: var(--color-danger);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

/* Meal Assign Modal */
.meal-assign-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
}
.meal-assign-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: var(--bg-surface);
    cursor: pointer;
    transition: var(--transition-default);
}
.meal-assign-option:hover {
    border-color: var(--color-primary);
    background: rgba(94,114,228,0.04);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
#toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
    width: 100%;
    pointer-events: none;
}
.toast {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    box-shadow: var(--shadow-xl);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(20px); }
}
.toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}
.toast-success .toast-icon { background: rgba(45,206,137,0.15); color: var(--color-emerald); }
.toast-error .toast-icon { background: rgba(245,54,92,0.15); color: var(--color-danger); }
.toast-info .toast-icon { background: rgba(94,114,228,0.15); color: var(--color-primary); }

/* ============================================
   HIDE MOBILE / DESKTOP ONLY
   ============================================ */
@media (max-width: 639px) {
    .hide-mobile { display: none !important; }
}
