body {
    font-family: sans-serif;
    background-color: #1a1a1a; /* Dark background */
    color: #f2f2f2; /* Light text */
    margin: 0;
    padding: 0;
}
a {
    color: #b3d7ffff; /* Light Blue links */
}
.navbar {
    background-color: #333; /* Darker navbar */
    overflow: hidden;
    width: 100%;
    display: flex;
    align-items: center;
}
.navbar a {
    float: left;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
}
.navbar a:hover {
    background-color: #555; /* Lighter hover for dark theme */
    color: white;
}
.navbar a.active {
    background-color: #007bff; /* A blue for active, stands out on dark */
    color: white;
}
.navbar a.top-level-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    font-size: 120%;
    font-weight: bold;
}

.navbar a.top-level-nav-item i {
    margin-bottom: 5px;
}
.env-bar {
    color: white;
    text-align: center;
    padding: 5px;
    font-size: 15px;
    font-weight: bold;
}
.env-bar.production, .env-bar.staging {
    background-color: red;
}
.env-bar.local {
    background-color: green;
}
.impersonation-bar {
    background-color: #ffc107;
    color: #212529;
    text-align: center;
    padding: 5px;
    font-size: 15px;
    font-weight: bold;
}
.sub-navbar {
    background-color: #444; /* Slightly lighter than the main navbar */
    overflow: hidden;
    width: 100%;
}
.content {
    padding: 10px; /* Add horizontal padding */
}
h1, h2 {
    color: #f2f2f2; /* Light headings */
}

.log-entries-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.log-entries-table th,
.log-entries-table td {
    border: 1px solid #444; /* Darker borders */
    padding: 8px;
    text-align: left;
}
.log-entries-table th {
    background-color: #3a3a3a; /* Darker table header */
    color: #f2f2f2; /* Light text */
}
.macro-totals-table {
    float: left;
    width: auto;
    margin-left: auto;
    margin-right: auto;
}
.form-container {
    margin: 20px 0; /* Left-align the form and add vertical margin */
    padding: 20px;
    background-color: #2a2a2a; /* Slightly lighter background for the form */
    border-radius: 8px;
}
.button {
    display: inline-block;
    background-color: #007bff; /* Blue for primary actions */
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 10px;
    margin-right: 5px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}
.button.edit {
    background-color: #ffc107; /* Yellow for edit */
    color: #333; /* Dark text for yellow button */
}
.button.delete {
    background-color: #dc3545; /* Red for delete */
}
.button:hover {
    background-color: #0056b3; /* Darker blue on hover */
}
.button.edit:hover {
    background-color: #e0a800; /* Darker yellow on hover */
}
.button.delete:hover {
    background-color: #c82333; /* Darker red on hover */
}
.button.create {
    background-color: #28a745; /* Green for add */
    color: white;
}
.button.create::before {
    content: '+';
    margin-right: 0.5rem;
}
a.button.create {
    display: inline-block;
    background-color: #28a745; /* Green for add */
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 10px;
    margin-right: 5px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}
a.button.create::before {
    content: '+';
    margin-right: 0.5rem;
}
.button.demure {
    background-color: #6c757d; /* Gray for less prominent actions */
}
.button.active {
    background-color: #0056b3; /* Darker blue for active state, same as for hover */
}
/* Form specific styles for dark theme */
.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.form-group label {
    flex: 0 0 120px; /* Fixed width for labels */
    margin-right: 10px;
    text-align: right;
    color: #f2f2f2;
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    flex: 1; /* Take remaining space */
    padding: 8px;
    border-radius: 5px;
    background-color: #3a3a3a;
    color: #f2f2f2;
    border: 1px solid #555;
}
.forms-container-wrapper {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}
.form-container {
    flex: 1;
    min-width: 300px; /* Adjust as needed */
}
.form-container h3 {
    margin-top: 0; /* Remove top margin */
    margin-bottom: 15px; /* Add some bottom margin for spacing */
    color: #f2f2f2; /* Ensure consistent heading color */
}
.form-row {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap */
    align-items: flex-start; /* Align items to the top */
    margin-bottom: 10px;
}
.form-row label {
    flex: 0; /* Adjust label width */
    margin-right: 10px;
    text-align: right;
}
.form-row input[type="text"],
.form-row input[type="number"],
.form-row select {
    width: 100%; /* Take full width of parent */
    box-sizing: border-box; /* Include padding and border in width */
    padding: 8px;
    border-radius: 5px;
    background-color: #3a3a3a;
    color: #f2f2f2;
    border: 1px solid #555;
}
.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 5px; /* Space between checkbox and label */
}

.form-group-checkbox label {
    flex: none; /* Override flex: 0 0 120px from .form-group label */
    text-align: left; /* Align text to the left */
    margin-left: 5px; /* Add some space between checkbox and label */
}

.form-group-checkbox input[type="checkbox"] {
    /* Adjust checkbox alignment if needed */
    margin-left: 140px; /* Align checkbox with text input fields */
}
.success-message-box {
    background-color: #28a745; /* Darker green for success */
    color: white; /* White text */
    border: 1px solid #218838; /* Slightly darker green border */
    padding: 15px; /* Add padding */
    margin: 20px 0;
    border-radius: 5px; /* Slightly rounded corners */
}



.error-message-box {
    background-color: #dc3545; /* Red for error */
    color: white; /* White text */
    border: 1px solid #c82333; /* Slightly darker red border */
    padding: 15px; /* Add padding */
    margin: 20px 0;
    border-radius: 5px; /* Slightly rounded corners */
}


input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    border-color: #007bff;
    outline: none;
}
.error-message {
    color: #ff4d4d; /* Lighter red for errors */
}
.back-button {
    background-color: #6c757d;
    color: white;
}
.back-button:hover {
    background-color: #5a6268;
}
.date-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}
.date-link {
    background-color: #3a3a3a;
    color: #f2f2f2;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.date-link:hover {
    background-color: #555;
}
.date-link.active {
    background-color: #007bff;
    color: white;
}
.date-pick-label {
    padding: 8px 12px;
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none;
    }
}

.show-on-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none;
    }
    .show-on-mobile {
        display: block; /* or inline, inline-block depending on context */
    }
    .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    .form-row label {
        text-align: left;
        margin-bottom: 5px;
    }
    .content {
        padding: 5px; /* Even less padding on mobile */
    }
}

.nutrition-facts-label {
    border: 1px solid #555;
    padding: 10px;
    width: 300px;
    background-color: #2a2a2a;
    color: #f2f2f2;
    font-family: sans-serif;
}
.nutrition-facts-label h2 {
    font-size: 24px;
    margin: 0 0 5px 0;
    font-weight: bold;
    color: #f2f2f2;
}
.nutrition-facts-label .header {
    border-bottom: 10px solid #f2f2f2;
    padding-bottom: 5px;
}
.nutrition-facts-label .nutrient {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-top: 1px solid #ccc;
}
.nutrition-facts-label .nutrient.main {
    font-weight: bold;
}
.nutrition-facts-label .nutrient.indented {
    margin-left: 20px;
}
.nutrition-facts-label .nutrient .label {
    font-weight: normal;
}
.nutrition-facts-label .nutrient .value {
    font-weight: bold;
}

.calories-label,
.calories-value {
    font-size: 1.5em;
    font-weight: bold;
}
.cost-nutrient {
    background-color: #3a3a3a;
}

.meal-group {
    margin-bottom: 20px;
}

.meal-groups-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.nutrition-facts-label.main-totals {
    border: 2px solid #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
    background-color: #1a1a1a;
}

.nutrition-facts-label.main-totals h2,
.nutrition-facts-label.main-totals .nutrient {
    color: #00ff00;
}

.nutrition-facts-label.main-totals .header {
    border-bottom: 10px solid #00ff00;
}

.nutrition-facts-label.main-totals .nutrient {
    border-top-color: #00ff00;
}

footer {
    background-color: #333;
    color: #ccc;
    padding: 20px 0;
    margin-top: 40px;
}
.git-log {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 0 20px;
    font-size: 0.8em;
}
.date-link.today-date {
    border: 1px solid #ffc107; /* A subtle yellow border to highlight today's date */
}



.no-suggested-weight-available {
    color: #868686;
}

/* Lift Logs Table Styling Classes */
.comments-column {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-summary {
    font-size: 0.9em;
    color: #ccc;
}

.actions-flex {
    display: flex;
    gap: 5px;
}
/*
 Google Sign-in Button Styling */
.google-signin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 12px 24px;
    font-family: 'Google Sans', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.30), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    min-width: 200px;
}

.google-signin-btn:hover {
    background-color: #f8f9fa;
    box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.30), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
    color: #3c4043;
}

.google-signin-btn:active {
    background-color: #f1f3f4;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.30), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
}

.google-icon {
    flex-shrink: 0;
}

/* Dark mode variant for Google button */
@media (prefers-color-scheme: dark) {
    .google-signin-btn {
        background-color: #131314;
        color: #e8eaed;
        border: 1px solid #5f6368;
    }
    
    .google-signin-btn:hover {
        background-color: #232627;
        color: #e8eaed;
    }
    
    .google-signin-btn:active {
        background-color: #2d2e2f;
    }
}

/* Force dark mode styling for our dark theme */
body .google-signin-btn {
    background-color: #131314;
    color: #e8eaed;
    border: 1px solid #5f6368;
}

body .google-signin-btn:hover {
    background-color: #232627;
    color: #e8eaed;
}

body .google-signin-btn:active {
    background-color: #2d2e2f;
}
/* 
Login Form Mobile-Friendly Styling */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.login-form-wrapper {
    width: 100%;
    max-width: 400px;
    background-color: #2a2a2a;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.login-title {
    text-align: center;
    margin: 0 0 32px 0;
    color: #f2f2f2;
    font-size: 28px;
    font-weight: 600;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-form-group label {
    color: #f2f2f2;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.login-form-group input {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #555;
    background-color: #3a3a3a;
    color: #f2f2f2;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.login-form-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.login-checkbox-group {
    display: flex;
    align-items: center;
    margin: 8px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f2f2f2;
    font-size: 14px;
    cursor: pointer;
    margin: 0;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

.login-button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 8px;
}

.login-button:hover {
    background-color: #0056b3;
}

.login-button:active {
    background-color: #004085;
}

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #888;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: #555;
}

.divider span {
    padding: 0 16px;
}

.google-signin-container {
    display: flex;
    justify-content: center;
}

.google-signin-btn {
    width: 100%;
    justify-content: center;
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .login-container {
        padding: 16px;
    }
    
    .login-form-wrapper {
        padding: 24px;
    }
    
    .login-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
    
    .login-form-group input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .google-signin-btn {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Ensure error/success messages fit well */
.login-form-wrapper .error-message-box,
.login-form-wrapper .success-message-box {
    margin: 0 0 20px 0;
    border-radius: 8px;
}