:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --secondary: #764ba2;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: var(--gray-800);
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--gray-200);
    padding: 24px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--gray-100);
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 8px;
}

.nav-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu li.active a {
    background: var(--primary);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-200);
}

.page-header h1 {
    font-size: 32px;
    color: var(--gray-800);
}

/* Cards */
.nutrition-card,
.water-card,
.supplements-card,
.meals-card,
.chart-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.nutrition-card h3,
.water-card h3,
.supplements-card h3,
.meals-card h3,
.chart-card h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--gray-800);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.wide {
    grid-column: span 3;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .wide {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 100;
    }
    .main-content {
        margin-left: 0;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .wide {
        grid-column: span 1;
    }
}

/* Nutrition Gauge Component */
.nutrition-gauge {
    margin-bottom: 20px;
}

.gauge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.gauge-label {
    font-weight: 600;
    color: var(--gray-600);
}

.gauge-values {
    font-size: 14px;
    color: var(--gray-600);
}

.gauge-values .current {
    font-weight: 700;
    font-size: 16px;
}

.gauge-bar-container {
    position: relative;
    background: var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
}

.gauge-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease, background-color 0.3s;
}

.gauge-status {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 4px;
    font-weight: 500;
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-add {
    width: 100%;
    padding: 16px;
    background: var(--gray-100);
    border: 2px dashed var(--gray-300);
    border-radius: 8px;
    color: var(--gray-600);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 16px;
}

.btn-add:hover {
    background: var(--primary);
    color: white;
    border-style: solid;
    border-color: var(--primary);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-800);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}