/* =========================================
   Modern Reset & Base Styles
========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f6f9;
    color: #333;
    display: flex;
    min-height: 100vh;
}

/* =========================================
   Layout & Navigation
========================================= */
.app-container {
    display: flex;
    width: 100%;
}

nav {
    width: 250px;
    background-color: #1e293b;
    color: #fff;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
}

nav h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

nav a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

nav a:hover, nav a.active {
    background-color: #334155;
    color: #fff;
}

nav form {
    margin-top: auto;
}

nav button {
    width: 100%;
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

nav button:hover {
    background-color: #dc2626;
}

main {
    flex: 1;
    padding: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

h1, h2 {
    color: #0f172a;
    margin-bottom: 1.5rem;
}

/* =========================================
   Dashboard & Grid Layouts
========================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.calorie-metric {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.calorie-metric h3 {
    font-size: 1rem;
    text-transform: uppercase;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.calorie-metric .number {
    font-size: 3rem;
    font-weight: 700;
    margin-top: 0.5rem;
}

.card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.card h3 {
    margin-bottom: 1.25rem;
    color: #1e293b;
    font-size: 1.25rem;
}

/* =========================================
   Forms & Inputs
========================================= */
form p {
    margin-bottom: 1.25rem;
}

form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #475569;
}

form input, form select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    background-color: #f8fafc;
    transition: border-color 0.2s;
}

form input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

form input:focus {
    outline: none;
    border-color: #0284c7;
    background-color: #fff;
}

/* Base Primary Form Button */
button[type="submit"].log-btn, .btn-primary {
    background-color: #10b981;
    color: white;
    border: none;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

button[type="submit"].log-btn:hover, .btn-primary:hover {
    background-color: #059669;
}

/* =========================================
   Lists (Entries & Goals)
========================================= */
.entry-list, .goals-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.entry-item, .goal-item {
    background: #f8fafc;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
}

/* =========================================
   Authentication Pages (Login & Sign Up)
========================================= */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 2rem;
}

.auth-card {
    background: white;
    padding: 3rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.auth-card h2 {
    margin-bottom: 2rem;
    color: #1e293b;
    font-size: 1.75rem;
}

.auth-card input {
    margin-bottom: 1.25rem;
    /* Overriding the default input a bit for standalone forms */
    padding: 0.85rem; 
}

.auth-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

.auth-footer a {
    color: #0284c7;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}