:root {
    --sidebar-width: 220px;
    --page-padding-x: 56px;
    --page-padding-y: 48px;
    --page-gap: 24px;
    --page-surface: #f4f1ea;
    --panel-surface: #ffffff;
    --text-primary: #0f2117;
}

*, *::before, *::after {
    box-sizing: border-box;
}

h1, h2, h3, .sidebar-title {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}
html {
    background-color: var(--page-surface);
    overflow-x: hidden;
}
body {
	background-color: var(--page-surface);
	color: var(--text-primary);
    font-family: 'Inter', 'Plus Jakarta Sans', sans-serif;
	margin: 0;
	min-height: 100vh;
	line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
}
.page-content {
    min-height: 100vh;
    padding: var(--page-padding-y) var(--page-padding-x) calc(var(--page-padding-y) + 24px) calc(var(--sidebar-width) + var(--page-gap));
    box-sizing: border-box;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}
body.no-sidebar .page-content {
    padding: var(--page-padding-y) var(--page-padding-x);
}
body.auth-page .page-content {
	display: flex;
	justify-content: center;
    align-items: center;
}
body.onboarding-page .page-content {
    display: flex;
    justify-content: center;
    padding-top: 72px;
    padding-bottom: 72px;
}
body.waiting-page .page-content {
    padding: 0;
}
.container {
	flex-grow: 1;
    width: 100%;
    max-width: 1100px;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
    box-sizing: border-box;
}
.hero-section {
	margin-bottom: 32px;
	width: 100%;
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
}
.hero-section h1 {
	font-size: 2.8rem;
	font-weight: 700;
	color: #1a3c34;
	line-height: 1.2;
	margin-bottom: 8px;
	word-wrap: break-word;
	overflow-wrap: break-word;
}
.hero-section p {
	font-size: 1.1rem;
	color: #1a3c34;
	margin-bottom: 0px;
	line-height: 1.5;
}

/* ====== Dashboard Grid & Cards ====== */
.dashboard-grid {
	display: flex;
	flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.dashboard-card {
    background: var(--panel-surface);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(15, 33, 23, 0.06);
    box-sizing: border-box;
}

/* Health Insight Card (Tip + Score) */
.health-insight-card {
    display: flex;
    justify-content: space-between;
	align-items: center;
    gap: 40px;
}

.insight-content {
    flex: 1;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8e5dd;
}

.gut-tip-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #4a4a4a;
    margin: 16px 0 24px;
}

.action-btn {
    background: #1a6b5c;
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #155a4d;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 107, 92, 0.25);
}

.action-btn.secondary {
    background: #2d3436;
}

.action-btn.secondary:hover {
    background: #1e2324;
}

/* Circular Gut Score */
.gut-score-ring {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 160px;
    position: relative;
}

.score-circle {
    width: 140px;
    height: 140px;
    transform: rotate(-90deg);
}

.score-bg {
    fill: none;
    stroke: #b8d4b8;
    stroke-width: 10;
}

.score-progress {
    fill: none;
    stroke: #2d7a2d;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.8rem;
    font-weight: 600;
    color: #1a3c34;
    margin-top: -14px;
}

.score-label {
    font-size: 0.95rem;
    color: #1a3c34;
    margin: 4px 0 0;
    font-weight: 500;
}

/* Macro Tracker Card */
.macro-tracker-card {
    padding: 32px;
}

.macro-tracker-card .card-title {
    text-align: center;
    margin-bottom: 24px;
}

/* Meal Card */
.meal-card-wrapper {
    padding: 32px;
}

.meal-card-content {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.meal-card-content .meal-image img {
    width: 140px;
    height: 140px;
    border-radius: 12px;
    object-fit: cover;
}

.meal-details {
    flex: 1;
}

.meal-details h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.meal-details p {
    color: #555;
    margin: 0 0 16px;
    line-height: 1.6;
}

.meal-details ul {
    padding-left: 20px;
    margin: 0;
    color: #666;
}

.meal-details li {
    margin-bottom: 4px;
}

/* Actions Row - no card background */
.actions-row {
    display: flex;
    justify-content: center;
    padding: 16px 0;
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* Centered form actions */
.form-actions-centered {
    display: flex;
    justify-content: center;
    padding: 16px 0;
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .health-insight-card {
        flex-direction: column;
        text-align: center;
    }
    
    .gut-score-ring {
        margin-top: 20px;
    }
    
    .meal-card-content {
        flex-direction: column;
    }
}

/* Report Items */
.reports-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-item {
    background: #f9f8f5;
    border-radius: 12px;
	padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.report-item:hover {
    background: #f0efe9;
    transform: translateY(-2px);
}

.report-item h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.report-item p {
    color: #666;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.empty-state {
    text-align: center;
    color: #888;
    padding: 40px;
}

/* Upload Form */
.upload-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.upload-form .form-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 400px;
}

/* Meal Planner Form */
.meal-planner-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.meal-planner-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
}

.meal-planner-form .action-btn {
    align-self: flex-start;
}

.form-label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: block;
}

.form-select {
    width: 100%;
    padding: 14px 40px 14px 16px;
    border: 1px solid #e0ddd5;
    border-radius: 12px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
    font-size: 1rem;
    color: var(--text-primary);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-select:hover {
    border-color: #c5c2ba;
}

.form-select:focus {
    outline: none;
    border-color: #1a6b5c;
    box-shadow: 0 0 0 3px rgba(26, 107, 92, 0.1);
}

/* Analysis Content */
.analysis-content {
    line-height: 1.7;
    color: #333;
}

.analysis-content pre {
    background: #f9f8f5;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}


/* Date Navigation - no card background */
.date-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 16px 0;
    margin-bottom: 16px;
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.date-navigation span {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 140px;
    text-align: center;
}

.arrow-btn {
    background: #f9f8f5;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    line-height: 1;
    padding: 0;
}

.arrow-btn:hover:not(:disabled) {
    background: #1a6b5c;
    color: #fff;
}

.arrow-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.chat-container {
	width: 100%;
	max-width: 1100px;
	background: var(--panel-surface);
	color: var(--text-primary);
	border-radius: 20px;
	box-shadow: 0 4px 24px rgba(15, 33, 23, 0.06);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	padding: 28px;
	box-sizing: border-box;
	margin-top: 10px;
	margin-left: auto;
	margin-right: auto;
	height: clamp(420px, calc(100vh - 260px), 640px);
}
@media (max-width: 1024px) {
	.chat-container {
		height: auto;
		min-height: 400px;
	}
}
.chat-container.fade-in {
	opacity: 1;
	transform: translateY(0);
}
.chat-box {
    width: 100%;
    flex: 1;
    padding: 16px;
    overflow-y: auto; /* Enable vertical scrolling */
    border-bottom: 1px solid #dad6c9;
    scrollbar-width: thin;
    box-sizing: border-box;
    color: #000000;
}
.input-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
	width: 100%;
    padding: 10px;
    background-color: #ffffff; /* Light background for the container */
}

#user-input {
    flex-grow: 1; /* Ensures the text area takes up most of the space */
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px; /* Rounded corners for the input */
    font-size: 1rem;
    color: #333333; /* Subtle text color */
    background-color: #ffffff;
    outline: none; /* Remove default browser focus styles */
    resize: none; /* Prevent resizing of the text area */
    box-sizing: border-box; /* Ensures padding is included in width */
}

#user-input:focus {
    border-color: #333333; /* Highlighted border on focus */
	box-shadow: 0 0 8px #333333;
    transform: scale(1.02); /* Slightly enlarge on focus */
    outline: none;
}

button {
	background: #000000;
	color: #ffffff;
    font-family: 'Mulish', sans-serif;
	border: none;
	padding: 12px 24px;
	border-radius: 12px;
	font-size: 1rem;
	font-weight: 600;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	cursor: pointer;
	transition: all 0.3s ease-in-out;
}
button:hover {
	background: #403f3f;
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.user-message, .ai-message {
	margin-bottom: 10px;
	padding: 12px 20px;
	border-radius: 20px;
	transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
	animation: messageFadeIn 0.5s ease-in-out;
	width: fit-content;
	max-width: 80%;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.user-message {
	background-color: #fee1d8;
	color: #000000;
	align-self: flex-end;
	margin-left: auto;
	text-align: left;
}
.ai-message {
    display: flex;
    align-items: flex-start;
    gap: 10px; /* Space between logo and text */
    margin-bottom: 10px;
}

.ai-message img {
    width: 24px; /* Logo size */
    height: 24px;
    border-radius: 50%; /* Optional circular logo */
}

.ai-message p, .ai-message ul, .ai-message li {
    margin: 0;
    padding: 0;
    color: #000000;
}

.ai-message ul {
    margin-left: 20px; /* Indent lists */
    padding-left: 0;
    list-style-type: disc;
}
@keyframes messageFadeIn {
	0% {
		transform: translateY(10px);
		opacity: 0;
	}
	100% {
		transform: translateY(0);
		opacity: 1;
	}
}
.loading-container {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	margin-top: 10px;
}
.loading-spinner {
	border: 4px solid rgba(0, 0, 0, 0.1);
	border-top: 4px solid #3498db;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	animation: spin 1s linear infinite;
}
@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}
.loading-text {
	margin-top: 5px;
	font-size: 14px;
	color: #555;
}
.form-wrapper {
	width: 100%;
	max-width: 600px;
	background: var(--panel-surface);
	border-radius: 20px;
	box-shadow: 0 4px 24px rgba(15, 33, 23, 0.06);
	padding: 32px;
	text-align: center;
	animation: fadeIn 0.8s ease-in-out;
}
h1 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: bold;
    color: #333333;
    text-align: left;
    margin-bottom: 20px;
}

h2 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: bold;
    color: #333333;
    margin-bottom: 10px;
    border-bottom: 2px solid #000000;
    padding-bottom: 5px;
}
.form-container {
	background: var(--panel-surface);
	border-radius: 20px;
	box-shadow: 0 4px 24px rgba(15, 33, 23, 0.06);
	width: 100%;
	max-width: 600px;
	max-height: 85vh;
	overflow-y: auto;
	padding: 32px;
	text-align: left;
	animation: fadeIn 0.8s ease-in-out;
}
@keyframes fadeIn {
	0% {
		opacity: 0;
		transform: translateY(20px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}
::-webkit-scrollbar {
	width: 6px;
}
::-webkit-scrollbar-thumb {
	background-color: #313131;
	border-radius: 8px;
}
.form-group {
	margin-bottom: 15px;
	text-align: left;
}
.form-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 5px;
    font-weight: 600;
}
input[type="number"], input[type="text"],input[type="password"],textarea, select {
	width: 80%;
	padding: 12px;
	border-radius: 12px;
	border: 1px solid #dad6c9;
	background-color: #f5f5f5;
	gap: 15px;
	font-size: 1rem;
	margin-top: 5px;
	box-sizing: border-box;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	transition: border-color 0.3s ease-in-out, box-shadow 0.3s;
}
input::placeholder, textarea::placeholder {
	color: rgba(0, 0, 0, 0.6);
	font-style: italic;
}
input:focus, textarea:focus, select:focus {
	outline: none;
	border-color: #333333;
	box-shadow: 0 0 12px rgba(251, 77, 22, 0.4);
	transform: scale(1.02);
}
.submit-btn {
	background: #000000;
	color: white;
	border: none;
	padding: 15px;
	border-radius: 30px;
	cursor: pointer;
	font-size: 1.1rem;
	width: 100%;
	margin-top: 10px;
	transition: background-color 0.3s ease-in-out, transform 0.2s;
}
.submit-btn:hover {
	background: #313131;
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.submit-btn.primary {
	min-width: 180px;
	width: auto;
}

.content-panel {
	width: 100%;
	max-width: 1100px;
	background: var(--panel-surface);
	border-radius: 20px;
	box-shadow: 0 4px 24px rgba(15, 33, 23, 0.06);
	padding: 32px;
	box-sizing: border-box;
}
.settings-panel {
	display: flex;
	flex-direction: column;
	gap: 32px;
	width: 100%;
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
}
.settings-form {
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.settings-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 24px 28px;
}
.settings-grid .form-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-align: left;
	margin: 0;
}
.settings-grid label {
	font-weight: 600;
	color: #1f3626;
	font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
	font-size: 0.95rem;
}
.settings-grid input {
	border: 1px solid rgba(15, 33, 23, 0.15);
	border-radius: 14px;
	padding: 12px 14px;
	background: #f7f4ee;
	font-size: 1rem;
	color: #122419;
	width: 100%;
	box-shadow: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.settings-grid input:focus {
	outline: none;
	border-color: #0d452f;
	box-shadow: 0 0 0 3px rgba(8, 51, 34, 0.12);
	background: #fff;
	transform: none;
}
.settings-actions {
	display: flex;
	justify-content: flex-end;
}
.flash-messages.stacked {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.flash-messages .flash {
	padding: 14px 16px;
	border-radius: 16px;
	font-weight: 500;
	color: #0d291b;
	background: #e6f7ef;
}
.flash-messages .flash.error,
.flash-messages .flash.danger {
	background: #ffe8e4;
	color: #61150c;
}
.flash-messages .flash.success {
	background: #ddf5e7;
	color: #0f2f1e;
}
.empty-state {
	margin: 12px 0 0;
	color: rgba(15, 33, 23, 0.85);
}

@media (max-width: 720px) {
	.content-panel {
		padding: 28px 24px;
		border-radius: 22px;
	}
	.settings-actions {
		justify-content: stretch;
	}
	.settings-actions .submit-btn {
		width: 100%;
	}
}
.small-text {
	font-size: 0.85rem;
	color: #aaa;
	margin-top: 5px;
	text-align: left;
}
.actions-container {
	display: flex;
	justify-content: space-between;
	width: 100%;
	max-width: 600px;
	margin-top: 15px;
}
.send-btn, .clear-btn {
	padding: 12px 16px;
	border-radius: 12px;
	cursor: pointer;
	font-size: 16px;
	transition: background-color 0.3s ease-in-out;
}
.send-btn {
	background-color: #000000;
	color: white;
	border: none;
}
.clear-btn {
	background-color: #000000;
	color: white;
	border: none;
}
.send-btn:hover {
	background-color: #313131;
}
.clear-btn:hover {
	background-color: #313131;
}
input[type="date"], input[type="time"] {
	width: 100%;
	padding: 12px;
	border-radius: 12px;
	border: 1px solid #dad6c9;
	background-color: #f5f5f5;
	font-size: 1rem;
	color: #333;
	box-sizing: border-box;
	margin-top: 5px;
	transition: border-color 0.3s ease-in-out, box-shadow 0.3s;
	appearance: none;
}
input[type="date"]::before {
	content: attr(placeholder);
	color: rgba(0, 0, 0, 0.6);
	font-style: italic;
}
input[type="date"]:focus::before, input[type="time"]:focus::before {
	content: "";
}
input[type="date"]:focus, input[type="time"]:focus {
	outline: none;
	border-color: #313131;
	box-shadow: 0 0 8px rgba(251, 77, 22, 0.5);
	transform: scale(1.02);
}
input[type="date"]::-webkit-calendar-picker-indicator, input[type="time"]::-webkit-calendar-picker-indicator {
	filter: invert(0.5);
	cursor: pointer;
}
input[type="date"]::-webkit-inner-spin-button, input[type="time"]::-webkit-inner-spin-button {
	height: 18px;
	width: 18px;
}

.sidebar-container {
    position: fixed;
    top: 10px; /* Add a bit of space from the top */
    left: 10px; /* Add space for the rounded edge */
    width: 220px;
    height: calc(100vh - 20px); /* Adjust height for top and bottom spacing */
    background: #173530; /* Gradient for a modern look */
    color: #ffffff; /* Ensure the text is visible */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), 0 8px 20px rgba(0, 0, 0, 0.15); /* Enhanced shadow */
    border-radius: 16px; /* Rounded corners on all sides */
    transition: transform 0.4s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    box-sizing: border-box;
    z-index: 10;
    overflow: hidden; /* Prevent content overflow */
}

/* Optional: Add hover effect for a more dynamic feel */
.sidebar-container:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); /* Slightly stronger shadow */
}

.sidebar-header {
	text-align: center;
	margin-bottom: 30px;
}
.logo-icon {
	width: 150px;
	height: auto;
}

.sidebar-subtitle {
	font-size: 0.9rem;
	color: #ffffff;
}
.sidebar-title {
	font-size: 1.8rem;
	font-weight: 700;
	color: #000000;
	margin-bottom: 10px;
}
.sidebar-menu {
	list-style: none;
	width: 100%;
	padding: 0;
	margin: 20px 0;
}
.sidebar-item {
	margin-bottom: 15px;
}
.sidebar-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 6px;
	background: #173530;
	color: #ffffff;
	/* ffffff 073630 */
	text-decoration: none;
	border-radius: 12px;
	font-size: 1rem;
	font-weight: 500;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease-in-out;
}
.sidebar-link:hover {
	background: #e85b30;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 4px 10px rgba(251, 77, 22, 0.3);
}
.sidebar-link i {
	font-size: 1.2rem;
	color: #000000;
}
.sidebar-link:hover {
	color: #000000;
	transform: scale(1.05);
}
.sidebar-footer {
	margin-top: auto;
	text-align: center;
	font-size: 0.85rem;
	color: #ffffff;
}
.footer-link {
	color: #fffefe;
	text-decoration: none;
}
.footer-link:hover {
	color: #e38f75;
	text-decoration: underline;
}
@keyframes fadeInSidebar {
	from {
		opacity: 0;
		transform: translateX(-20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}
.main-container {
    width: 100%;
    max-width: 1200px;
    margin-left: 0;
    margin-right: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

@media (max-width: 1200px) {
    .main-container {
        max-width: 100%;
    }
}

.sidebar-button, .sidebar-clear-button {
	background: #000000;
	color: #ffffff;
	border: none;
	padding: 10px 16px;
	border-radius: 10px;
	font-size: 1rem;
	font-weight: bold;
	cursor: pointer;
	transition: background-color 0.3s ease, transform 0.3s ease;
	position: absolute;
	top: 20px;
	left: 20px;
	z-index: 12;
}
.sidebar-button:hover {
	background-color: #1d4b45;
	transform: scale(1.05);
}
.sidebar-button:active {
	transform: translateY(2px);
}
.sidebar-loading-spinner {
	border: 4px solid rgba(0, 0, 0, 0.1);
	border-top: 4px solid #3498db;
	border-radius: 50%;
	width: 30px;
	height: 30px;
	animation: spinSidebar 1s linear infinite;
}
@keyframes spinSidebar {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}
.sidebar-loading-text {
	margin-top: 5px;
	font-size: 14px;
	color: #555;
}
.form-group input[type="file"] {
	opacity: 0;
	position: absolute;
	left: 0;
	top: 0;
	cursor: pointer;
	z-index: 2;
}
.custom-file-label {
	display: inline-block;
	width: 100%;
	max-width: 1200px;
	padding: 14px 32px;
	background-color: #000000;
	color: #ffffff;
	text-align: center;
	border-radius: 10px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.3s ease;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
	z-index: 1;
	position: relative;
	box-sizing: border-box;
}
.custom-file-label:hover {
	background-color: #313131;
}
.selected-file {
	font-size: 0.9rem;
	color: #000000;
	margin-top: 10px;
	text-align: center;
	opacity: 0.8;
}
.analyse-btn {
	background: #000000;
	color: white;
	border: none;
	padding: 12px 24px;
	border-radius: 8px;
	font-size: 1rem;
	margin-top: 10px;
	cursor: pointer;
	transition: background-color 0.3s ease-in-out, transform 0.2s;
	width: 100%;
}
.analyse-btn:hover {
	background: #313131;
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.analysis-result, .error-message {
	margin-bottom: 20px;
	padding: 15px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.analysis-result {
	background-color: #e0f7fa;
	color: #5d726f;
}
.error-message {
	background-color: #ffebee;
	color: #b71c1c;
}
.box-container {
	background: #ffffff;
	color: #073630;
	border-radius: 16px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
	padding: 20px;
	margin: 20px 0;
}
.box-title {
	font-size: 1.5rem;
	font-weight: bold;
	color: #000000;
	margin-bottom: 10px;
}
.box-content {
	list-style-type: none;
	padding-left: 0;
	font-size: 1rem;
	line-height: 1.5;
}
.box-content li {
	margin-bottom: 10px;
}
.full-analysis-box {
    margin-top: 20px;
    padding: 25px;
    border-radius: 20px;
    background-color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    color: #333333;
    max-height: 65vh; /* Limit the maximum height to 60% of the viewport */
    overflow-y: auto; /* Enable vertical scrolling */
    text-align: left;
}
.full-analysis-box::-webkit-scrollbar {
	width: 8px;
}
.full-analysis-box::-webkit-scrollbar-track {
	background: #ffffff;
	border-radius: 10px;
}
.full-analysis-box::-webkit-scrollbar-thumb {
	background-color: #000000;
	border-radius: 10px;
	border: 2px solid #333333;
}
.full-analysis-box::-webkit-scrollbar-thumb:hover {
	background-color: #313131;
}
.analysis-content {
	font-size: 1.1em;
	line-height: 1.8;
	color: #000000;
}
.analysis-content ul, .analysis-content ol {
	margin-left: 20px;
	padding-left: 0;
}
.analysis-content li {
	margin-bottom: 8px;
	list-style-position: outside;
	margin-left: 20px;
	color: #333333;
}
.analysis-content h2 {
	color: #333333;
	margin-top: 20px;
	margin-bottom: 10px;
	font-size: 1.5em;
	border-bottom: 2px solid #313131;
	padding-bottom: 5px;
}
.analysis-content h3 {
	color: #333333;
	margin-top: 15px;
	margin-bottom: 8px;
	font-size: 1.3em;
}
.analysis-content strong {
	color: #333333;
	font-weight: bold;
}
.analysis-content blockquote {
	background-color: rgba(0, 0, 0, 0.1);
	border-left: 4px solid #000000;
	padding: 15px;
	margin: 15px 0;
	color: #333333;
	font-style: italic;
}
@media (max-width: 768px) {
	.container {
		width: 95%;
		padding: 20px;
	}
	.hero-section h1 {
		font-size: 2rem;
	}
	.hero-section p {
		font-size: 1rem;
	}
	.chat-container {
		padding: 15px;
	}
}
#loading-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.85);
	backdrop-filter: blur(8px);
	z-index: 1000;
	display: flex;
	justify-content: center;
	align-items: center;
	color: #ffffff;
}
.loading-content {
	text-align: center;
	max-width: 80%;
	display: flex;
	flex-direction: column;
	align-items: center;
}
.spinner {
	border: 8px solid #f3f3f3;
	border-top: 8px solid #000000;
	border-radius: 50%;
	width: 60px;
	height: 60px;
	animation: spin 1s linear infinite;
	margin-bottom: 20px;
}
@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}
.loading-content p {
	font-size: 1.2em;
	color: #ffffff;
}
#macro-result {
	margin-top: 20px;
	border-radius: 20px;
	background-color: 5d726f;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25), inset 0 2px 4px rgba(255, 255, 255, 0.1);
	color: #ffffff;
	overflow-y: auto;
	padding: 20px;
}
#macro-result h2 {
	color: #000000;
	font-size: 1.5em;
	margin-bottom: 10px;
}
#macro-content pre {
	background-color: 5d726f;
	color: #ffffff;
	padding: 20px;
	border-radius: 12px;
	font-family: "Courier New", Courier, monospace;
	white-space: pre-wrap;
	line-height: 1.6em;
}

.previous-results-container {
    margin-top: 20px;
    margin:0 auto;
    padding: 12px 20px;
    background-color: #000000;
    color: #ffffff;
    border-radius: 15px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    display: inline-block;
    width: fit-content;
    margin: 10 auto;
}

.previous-results-container:hover {
    background-color: #313131;
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.previous-results-container:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.previous-results-container p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.previous-results-container p::before {
    content: "📂";
    font-size: 1.5rem;
    animation: fadeIn 0.5s ease-in-out;
}
/* Reports List Styling */
.reports-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
    padding: 10px;
    overflow-y: auto;
    max-height: 60vh; /* Limit height with scroll for long lists */
}

.reports-list p {
color:#0b0b0b;
}
.reports-list::-webkit-scrollbar {
    width: 8px;
}

.reports-list::-webkit-scrollbar-thumb {
    background-color: #000000;
    border-radius: 10px;
}

.reports-list::-webkit-scrollbar-thumb:hover {
    background-color: #333333;
}



.report-card h2 {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.report-card p {
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 400;
}

/* Scrollbar Styling for Modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
    background-color: #000000;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background-color: #333333;
}



@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.report-card {
    padding: 20px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}
.report-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in-out;
}

.modal[style*="display: flex"] {
    display: flex !important;
}

.modal-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 450px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.4s ease-in-out;
    color: #0b0b0b;
    margin: 16px;
}

.modal-content h2 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #333333;
    text-align: center;
    border-bottom: 1px solid #e8e5dd;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.modal-content p {
    font-size: 1rem;
    color: #0b0b0b;
    line-height: 1.6;
    margin: 10px 0;
}

.modal-content ul {
    margin-left: 20px;
    list-style: disc;
    color: #333333;
}

.modal-content ul li {
    margin-bottom: 10px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #000000;
    transition: transform 0.2s ease-in-out;
}

.close-btn:hover {
    transform: scale(1.2);
    color: #1d4b45;
}

/* Modal Form Styling */
.modal-content .form-group {
    margin-bottom: 16px;
}

.modal-content .form-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.modal-content .form-group input,
.modal-content .form-group select {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #f9f8f5;
    transition: border-color 0.2s ease;
}

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

.modal-content button[type="submit"],
.modal-content .submit-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s ease;
}

.modal-content button[type="submit"]:hover,
.modal-content .submit-btn:hover {
    background: #333;
}

/* Macro image upload section */
.macro-image-upload {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.macro-image-upload .extract-image-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.macro-image-upload .extract-image-btn:hover {
    background: #333;
}

#meal-image-status {
    display: block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

/* Macro image result modal (goal tracker) */
.macro-result-modal {
    max-width: 640px;
}

.macro-result-layout {
    display: flex;
    gap: 20px;
    margin: 16px 0 20px 0;
    align-items: flex-start;
}

.macro-image-preview {
    flex: 0 0 180px;
    border-radius: 16px;
    overflow: hidden;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(15, 33, 23, 0.08);
}

.macro-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Slightly smaller preview when used in sidebar extract macros page */
.macro-image-preview.sidebar {
    flex-basis: 140px;
    max-width: 140px;
}

.macro-result-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.macro-meal-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}

.macro-macros-summary {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
}

.macro-result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.macro-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.macro-tag {
    padding: 4px 10px;
    border-radius: 999px;
    background: #e6f7ef;
    color: #0f2f1e;
    font-size: 0.8rem;
    font-weight: 500;
}

.macro-insight {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #555;
}

@media (max-width: 640px) {
    .macro-result-layout {
        flex-direction: column;
    }

    .macro-image-preview {
        width: 100%;
        flex-basis: auto;
    }

    .macro-result-actions {
        flex-direction: column;
    }
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal-content {
        padding: 24px 20px;
        margin: 12px;
        max-height: 90vh;
    }
    
    .modal-content h2 {
        font-size: 1.3rem;
        padding-bottom: 10px;
        margin-bottom: 16px;
    }
    
    .modal-content .form-group {
        margin-bottom: 14px;
    }
    
    .modal-content .form-group label {
        font-size: 0.9rem;
    }
    
    .modal-content .form-group input,
    .modal-content .form-group select {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .modal-content button[type="submit"],
    .modal-content .submit-btn {
        padding: 10px 16px;
        font-size: 0.95rem;
    }
    
    .close-btn {
        top: 8px;
        right: 12px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 20px 16px;
        margin: 10px;
        border-radius: 14px;
    }
    
    .modal-content h2 {
        font-size: 1.2rem;
        margin-bottom: 14px;
    }
    
    .modal-content .form-group {
        margin-bottom: 12px;
    }
    
    .modal-content .form-group label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }
    
    .modal-content .form-group input,
    .modal-content .form-group select {
        padding: 10px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    .modal-content button[type="submit"],
    .modal-content .submit-btn {
        padding: 10px 14px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    .close-btn {
        top: 6px;
        right: 10px;
        font-size: 1.2rem;
    }
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    vertical-align: middle;
}

.flash-messages {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}
.flash-messages .info {
    color: #0056b3;
    background-color: #cce5ff;
    border: 1px solid #b8daff;
}
.flash-messages .error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}
.flash-messages .success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.sidebar-menu .logout-link:hover{
    font-weight: bold;
}

/* Profile Menu */
/* Profile Menu Container */
.profile-menu-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

/* Popup / toast under profile icon */
.profile-toast {
    position: absolute;
    top: 64px;
    right: 0;
    max-width: 280px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    box-shadow: 0 8px 24px rgba(15, 33, 23, 0.20);
    background: #e6f7ef; /* matches existing flash background */
    color: #0d291b;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    display: none;
}

.profile-toast.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.profile-toast.profile-toast-error {
    background: #ffe8e4;
    color: #61150c;
}

.profile-toast.profile-toast-success {
    background: #ddf5e7;
    color: #0f2f1e;
}

.profile-toast.profile-toast-info {
    background: #e6f7ef;
    color: #0d291b;
}

/* Generic toast used on pricing/config pages (right side popup) */
.pricing-toast {
    position: fixed;
    top: 80px;
    right: 40px;
    max-width: 320px;
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    box-shadow: 0 8px 24px rgba(15, 33, 23, 0.18);
    background: #e6f7ef;
    color: #0d291b;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    display: none;
    z-index: 2200;
}

.pricing-toast.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.pricing-toast.error {
    background: #ffe8e4;
    color: #61150c;
}

.pricing-toast.success {
    background: #ddf5e7;
    color: #0f2f1e;
}

.pricing-toast.info {
    background: #e6f7ef;
    color: #0d291b;
}

/* Profile Icon */
.profile-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.profile-icon:hover {
    transform: scale(1.1);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dropdown Menu */
.profile-menu {
    position: absolute;
    top: 60px;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
    min-width: 160px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

/* Animation: Slide Down */
.animate-slide-down {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Menu Options */
.profile-options {
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-option {
    padding: 12px 20px;
    text-align: left;
    font-size: 14px;
    transition: background 0.3s ease;
}

.profile-option:hover {
    background: #f4f4f4;
}

.profile-option a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
}

.profile-option:hover a {
    color: #007bff;
}

/* Hidden Class */
.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.box-container {
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    color: #073630;
    text-align: center;
}

.box-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #000000;
}

.chart-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap; /* Allows charts to wrap on smaller screens */
}

/* Chart Box Animation */
.chart-box {
    flex: 1 1 calc(50% - 20px); /* Two equal boxes per row */
    max-width: 450px;
    min-width: 300px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    box-sizing: border-box;
    text-align: center;
    height: 400px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 1s ease forwards;
    animation-delay: calc(var(--animation-delay, 0) * 0.3s);
}

/* Individual Chart Delays */
.chart-box:nth-child(1) { --animation-delay: 1; }
.chart-box:nth-child(2) { --animation-delay: 2; }
.chart-box:nth-child(3) { --animation-delay: 3; }
.chart-box:nth-child(4) { --animation-delay: 4; }

/* Hover Effect for Charts */
.chart-box:hover {
    transform: scale(1.03);
    transition: transform 0.3s ease;
}

.chart-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #313131;
    margin-bottom: 10px;
}

.chart-box canvas {
    flex: 1; /* Ensures chart canvas expands within the container */
    width: 100% !important;
    height: 100% !important;
    max-height: 300px;
    object-fit: contain;
}


.button-container {
	margin-top: 30px;
	text-align: center;
}

.reports-btn {
    background-color: #000000;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s;
}

.reports-btn:hover {
    background-color: #313131;
    transform: scale(1.05) translateY(-3px);
}


/* Gut Tip Animation */
.gut-tip-box {
    background: #ffffff;
    border-left: 5px solid #313131;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    text-align: left;
    align-self: center;
    color: #000000;
    animation: fadeIn 1s ease-out;
	width: 1100px;
}

.gut-tip-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #000000;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.gut-tip-title:hover {
    color: #313131;
    transform: scale(1.005);
}


.gut-tip-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #313131;
}
.meal-of-the-day {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 20px;
    color: #313131;
    text-align: center;
    animation: fadeIn 1.2s ease-out;
    /* Reserve a fixed width or min-width */
    min-width: 1100px; /* Adjust as needed */
}


.meal-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000000;
    margin-bottom: 15px;
}

.meal-card {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    /* Ensure the card always occupies the same width */
    width: 100%;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 1.5s;
}

.meal-image img {
    flex-shrink: 0;
    width: 150px;
    height: 150px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    transition: transform 0.3s ease;
}

.meal-image img:hover {
    transform: rotate(3deg) scale(1.05);
}

.meal-content {
    text-align: left;
    flex-grow: 1;
    /* Reserve some minimum width to prevent collapse */
    min-width: 300px;
}

.meal-content h3 {
    font-size: 1.2rem;
    color: #000000;
    margin-bottom: 10px;
}

.meal-content p {
    font-size: 1rem;
    line-height: 1.5;
    color: #313131;
}

.meal-content h4 {
    margin-top: 10px;
    color: #000000;
    font-size: 1.1rem;
}

.meal-content ul {
    list-style-type: disc;
    margin-left: 20px;
    padding: 0;
    color: #333;
    line-height: 1.4;
}
.goal-tracker-container {
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    color: #073630;
    margin-bottom: 40px;
}

/* Center goal progress and blend with weight cards */
.goal-progress-card {
    flex: 1;
    text-align: center;
    background: linear-gradient(145deg, #f7faf9, #ffffff);
    border: 2px solid #d6e7e2;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05), inset 0 2px 4px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.goal-progress-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.goal-weight-slider {
    width: 100%;
    margin: 10px 0;
    accent-color: #1d4b45; /* Green color */
}
.small-progress-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(#333333 var(--progress, 0%), #d6e7e2 var(--progress, 0%));
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 24px auto 0 auto;
    position: relative;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.05), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.small-progress-circle::after {
    content: "";
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: #ffffff;
    position: absolute;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.05);
}

.progress-text {
    z-index: 1;
    position: relative;
    font-size: 1.1rem;
    font-weight: bold;
    color: #333333;
}


/* Weight Section */
.weight-section {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    background: var(--panel-surface);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 24px rgba(15, 33, 23, 0.06);
    width: 100%;
    overflow: hidden;
}

.weight-card {
    flex: 1;
    background: transparent;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    transition: transform 0.2s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.weight-card:hover {
    background: rgba(0,0,0,0.02);
}



.weight-card h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    border-bottom: 1px solid #e8e5dd;
    padding-bottom: 10px;
}

.weight-card .weight-value {
    font-size: 2rem;
    font-weight: bold;
    color: #333333;
}


/* Combined Macros Card */
.macros-combined-card {
    background: var(--panel-surface);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(15, 33, 23, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    overflow: hidden;
}

/* Calorie Tracker */
.calorie-tracker {
    text-align: center;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    width: 100%;
}

.calorie-tracker h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
    border-bottom: 1px solid #e8e5dd;
    padding-bottom: 10px;
}

.calories-circle {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(#508ff5 var(--progress, 0%), #badff7 var(--progress, 0%));
    margin: 0 auto;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.calories-circle::after{
    content: '';
    width: 96px;
    height: 96px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.05);
}

.macro-circle {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: conic-gradient(var(--primary-color, #053161) var(--progress, 0%), var(--secondary-color, #2f4b68) var(--progress, 0%));
    --progress: 0%;
}

.macro-circle::after {
    content: '';
    width: 90px;
    height: 90px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.05);
}
/* Carbohydrates */
.macro-circle.carbohydrates {
    --primary-color: #4CAF50; /* Green for carbohydrates */
    --secondary-color: #A5D6A7; /* Light green for background */
}

/* Protein */
.macro-circle.protein {
    --primary-color: #FFC107; /* Yellow for protein */
    --secondary-color: #FFF8E1; /* Light yellow for background */
}

/* Fat */
.macro-circle.fat {
    --primary-color: #FF5722; /* Red for fat */
    --secondary-color: #FFAB91; /* Light red for background */
}

/* Default fallback for other macros */
.macro-circle.default {
    --primary-color: #053161; /* Default green */
    --secondary-color: #2f4b68; /* Default light green */
}
.inner-text {
    position: absolute;
    text-align: center;
    font-size: 0.85rem;
    font-weight: bold;
    color: #333333;
    z-index: 2;
    line-height: 1.3;
}

.inner-text p {
    margin: 0;
}


/* Styling for Macros Title */
.macro-title, .calories-remaining {
    font-size: 0.9rem;
    font-weight: bold;
    color: #666666;
    text-align: center;
    margin-top: 10px;
}


.calories-remaining {
    margin-top: 10px;
    font-size: 1rem;
    color: #666666;
}

/* Macros Section */
.macros-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    width: 100%;
}

.macros-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #073630;
    margin-bottom: 20px;
}

.macros-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 100%;
    margin: 0 auto;
}

.macro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.macro-title {
    font-size: 0.9rem;
    font-weight: bold;
    color: #333333;
    margin-top: 8px;
}

/* Meal Planner */
.meal-planner {
    background: var(--panel-surface);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 24px rgba(15, 33, 23, 0.06);
    text-align: left;
    width: 100%;
    overflow: hidden;
}

.meal-planner h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    border-bottom: 1px solid #e8e5dd;
    padding-bottom: 10px;
}

.meal-planner p {
    font-size: 1rem;
    color: #333333;
    line-height: 1.5;
}

.meal-planner-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.meal-planner-grid .meal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: transparent;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    transition: background 0.2s ease;
    opacity: 1;
    transform: none;
    animation: none;
}

.meal-planner-grid .meal-card:hover {
    background: rgba(0,0,0,0.02);
}

.meal-planner-grid .meal-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.meal-planner-grid .meal-card .meal-name {
    flex: 1;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.meal-planner-grid .meal-card .details-btn {
    width: 100%;
    white-space: nowrap;
}

.meal-name {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 12px;
}

.details-btn {
    background: var(--text-primary);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.details-btn:hover {
    background: #2a5a50;
}

.add-btn {
    background: linear-gradient(145deg, #4caf50, #073630);
    color: white;
    border: none;
    border-radius: 12px;
    width: 52px;
    height: 52px;
    font-size: 2.2rem;
    font-weight: 300;
    font-family: system-ui, -apple-system, sans-serif;
    line-height: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), inset 0 2px 4px rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease-in-out, background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    margin: 10px auto;
    padding: 0 0 2px 0;
    text-align: center;
    vertical-align: middle;
}

.add-btn:hover {
    background: linear-gradient(145deg, #073630, #43a047); /* Brighter gradient on hover */
    transform: scale(1.15); /* Slight zoom effect */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25); /* Enhanced shadow on hover */
}

.add-btn:active {
    transform: scale(1.05); /* Pressed down effect */
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.3); /* Inner shadow */
}

/* Distinct styles for Weight and Macros buttons if needed */
.weight-btn {
    margin-top: 15px;
}

.macros-btn {
    margin: 8px auto;
}

/* Missing Days Section */
.missing-days-section {
    padding: 24px;
    background: var(--panel-surface);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
    max-width: 100%;
}

.missing-days-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    border-bottom: 1px solid #e8e5dd;
    padding-bottom: 10px;
}

.missing-days-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f0a500;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    min-width: 35px;
}

.missing-days-info {
    text-align: center;
    color: #666;
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.missing-days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
    max-height: 450px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Scrollbar styling for missing days grid */
.missing-days-grid::-webkit-scrollbar {
    width: 8px;
}

.missing-days-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.missing-days-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.missing-days-grid::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.missing-day-card {
    background: #ffffff;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    transition: all 0.2s ease;
}

.missing-day-card:hover {
    border-color: #f0a500;
    box-shadow: 0 2px 6px rgba(240, 165, 0, 0.15);
    transform: translateY(-1px);
}

.missing-day-card label {
    display: block;
    font-weight: 600;
    color: #1a3c34;
    margin-bottom: 6px;
    font-size: 0.9rem;
    line-height: 1.3;
}

.missing-day-card .date-label {
    display: block;
    font-size: 0.75rem;
    color: #999;
    font-weight: 400;
    margin-top: 1px;
}

.missing-day-card input[type="number"],
.missing-day-card .weight-input {
    width: 100%;
    padding: 10px;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.missing-day-card input[type="number"]:focus,
.missing-day-card .weight-input:focus {
    outline: none;
    border-color: #f0a500;
    box-shadow: 0 0 0 2px rgba(240, 165, 0, 0.1);
}

.missing-day-card .weight-input.skipped {
    opacity: 0.5;
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.weight-input-group {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.weight-input-group .weight-input {
    flex: 1;
    margin: 0;
}

.skip-day-btn {
    padding: 10px 16px;
    background: #f0f0f0;
    color: #666;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.skip-day-btn:hover {
    background: #e0e0e0;
    border-color: #bbb;
    color: #333;
}

.skip-day-btn:active {
    background: #d0d0d0;
    transform: scale(0.98);
}

.filling-progress {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 12px;
    padding: 8px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.missing-days-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 24px;
}

.submit-all-btn, .skip-all-btn {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.submit-all-btn {
    background: #000000;
    color: #ffffff;
}

.submit-all-btn:hover {
    background-color: #333333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.skip-all-btn {
    background: #f0f0f0;
    color: #333;
}

.skip-all-btn:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.ai-analysis-section {
    padding: 16px 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    color: var(--text-primary);
    text-align: center;
    overflow: hidden;
}

.ai-analysis-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-align: center;
    border-bottom: none;
    padding-bottom: 0;
}

.generate-ai-btn {
    display: block;
    margin: 0 auto 20px auto;
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out, transform 0.2s;
}

.generate-ai-btn:hover {
    background-color: #333333;
    transform: translateY(-2px);
}

.goal-weight-test-section {
    padding: 16px 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    color: var(--text-primary);
    text-align: center;
}

.goal-weight-test-section h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-align: center;
    border-bottom: none;
    padding-bottom: 0;
}

.generate-goal-weight-btn {
    display: block;
    margin: 0 auto 20px auto;
    background: #000000;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out, transform 0.2s;
}

.generate-goal-weight-btn:hover {
    background-color: #333333;
    transform: translateY(-2px);
}

.goal-weight-result {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    font-size: 1rem;
    color: #333333;
    line-height: 1.6;
    text-align: center;
}

#aiAnalysisResult {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto; /* Adds a scrollbar if content overflows */
    max-height: 300px; /* Limit the height to ensure content fits nicely */
    word-wrap: break-word; /* Ensure long words or text wrap within the container */
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #333333;
    line-height: 1.6;
}

#aiAnalysisResult pre {
    white-space: pre-wrap; /* Preserve whitespace while wrapping text */
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    background-color: #ffffff;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto; /* Allow horizontal scrolling for wide content */
}

#aiAnalysisResult::-webkit-scrollbar {
    width: 8px;
}

#aiAnalysisResult::-webkit-scrollbar-thumb {
    background-color: #cccccc;
    border-radius: 8px;
}

#aiAnalysisResult::-webkit-scrollbar-thumb:hover {
    background-color: #aaaaaa;
}

/* Each Meal Block */
.meal-block {
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fafafa;
    padding: 10px;
    margin-bottom: 15px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  }
    
  .meal-block h2 {
    margin: 0 0 5px 0;
    font-weight: 600;
    color:#000000;
  }
  .meal-block h3 {
    margin: 0 0 5px 0;
    font-weight: 600;
    color:#000000;
  }
  
  .meal-block h4 {
    margin: 5px 0;
    font-size: 1rem;
    color: #000000;
  }
  
  .meal-block p {
    margin: 5px 0;
    line-height: 1.4;
    color:#333333;
  }
  
  .meal-block ul {
    list-style-type: disc;
    padding-left: 20px;
    margin: 5px 0;
  }
/* Meal Plan Form */
.meal-plan-form {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
  }
  
  
  /* Meal Plan Display */
  .meal-plan-display {
    background: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    display: none;
  }
  
  .meal-plan-display h2 {
    font-family: 'Mulish', sans-serif;
    color: #000000;
    text-align: center;
    margin-bottom: 20px;
  }
  
  
  /* Action Buttons */
  .action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
  }
  
  .accept-btn {
    background: #173530;
    color: #fff;
    font-weight: bold;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
  }
  
  .accept-btn:hover {
    background-color: #0b7d57;
  }
  
  .reject-btn {
    background: #b71c1c;
    color: #fff;
    font-weight: bold;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
  }
  
  .reject-btn:hover {
    background-color: #d32f2f;
  }

  .sidebar-active {
    background-color: #e85b30;
    color: #fff !important;
    border-radius: 8px;
    transition: background-color 0.3s ease-in-out;
}
.sidebar-active:hover {
    background-color: #e85b30;
}

.success-message {
    position: fixed; /* or absolute if you want it inside the modal */
    top: 70px;       /* adjust if needed */
    right: 20px;     /* adjust if needed */
    background-color: #4caf50;  /* Green background for success */
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    z-index: 2000;   /* ensure it’s on top */
    animation: fadeInOut 2.5s forwards;
  }
  
  /* Keyframes fade in for a bit, then fade out */
  @keyframes fadeInOut {
    0% {
      opacity: 0;
      transform: translateY(-10px);
    }
    10% {
      opacity: 1;
      transform: translateY(0);
    }
    80% {
      opacity: 1;
      transform: translateY(0);
    }
    100% {
      opacity: 0;
      transform: translateY(-10px);
    }
  }
  
/* Gut Score Section */
.gut-score-bar-container {
    text-align: center;
    margin-top: 20px;
}

.gut-score-bar {
    width: 100%;
    max-width: 300px;
    height: 20px;
    background: #ddd;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px auto;
}

.gut-score-fill {
    height: 100%;
    width: 0;
    transition: width 1s ease-in-out;
}

/* Title */
.tracker-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

/* Calendar Wrapper */
.calendar-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 64px);
    gap: 10px;
    background: #ffffff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Individual Day Block */
.calendar-day {
    width: 64px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 12px;
    background: #f5f5f5;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calendar-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Day Label */
.day-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    line-height: 1;
}

.progress-ring {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    aspect-ratio: 1;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    text-shadow: none;
    background: #ddd;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover Effect */
.progress-ring:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}


/* Progress Colors Based on Percentage */
.progress-ring[data-progress="0"] {
    background: conic-gradient(#ddd 100%, #ddd 0%);
    color: #333;
}

.progress-ring[data-progress^="2"], 
.progress-ring[data-progress^="3"] {
    background: conic-gradient(#FFC107 25%, #ddd 0%);
}

.progress-ring[data-progress^="4"], 
.progress-ring[data-progress^="5"] {
    background: conic-gradient(#FF9800 50%, #ddd 0%);
}

.progress-ring[data-progress^="6"], 
.progress-ring[data-progress^="7"] {
    background: conic-gradient(#FF5722 75%, #ddd 0%);
}

.progress-ring[data-progress^="8"], 
.progress-ring[data-progress^="9"] {
    background: conic-gradient(#1b5e20 100%, #ddd 0%);
}

/* Overconsumption - Red Alert */
.progress-ring.over-limit {
    box-shadow: 0 0 10px rgba(211, 47, 47, 0.8);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Mobile Sidebar Toggle Button */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    background: #173530;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #1a6b5c;
}

.toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.sidebar-toggle.active .toggle-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.sidebar-toggle.active .toggle-bar:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle.active .toggle-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Remove old sidebar-indicator */
.sidebar-indicator {
    display: none;
}

/* Tablet Breakpoint (1024px) */
@media (max-width: 1024px) {
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar-overlay {
        display: block;
        pointer-events: none;
    }
    
    .sidebar-overlay.active {
        pointer-events: auto;
    }
    
    .sidebar-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile browsers */
        border-radius: 0 16px 16px 0;
        transform: translateX(-100%);
        z-index: 1000;
        padding: 20px;
        overflow-y: auto;
    }
    
    .sidebar-container.open {
        transform: translateX(0);
    }
    
    .sidebar-header {
        margin-bottom: 20px;
    }
    
    .logo-icon {
        width: 120px;
    }
    
    .sidebar-menu {
        margin: 16px 0;
    }
    
    .sidebar-item {
        margin-bottom: 10px;
    }
    
    .sidebar-link {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .sidebar-footer {
        padding-top: 16px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    .page-content {
        padding: var(--page-padding-y) 24px !important;
        padding-top: 80px !important;
    }
    
    .main-container {
        max-width: 100%;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .dashboard-grid {
        gap: 20px;
    }
    
    .dashboard-card {
        padding: 24px;
    }
    
    .health-insight-card {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    
    .gut-score-ring {
        margin: 0 auto;
    }
    
    .weight-section {
        flex-direction: column;
    }
    
    .goal-tracker-container {
        padding: 20px;
    }
    
    /* Macros combined card responsive */
    .macros-combined-card {
        padding: 20px;
        gap: 12px;
    }
    
    /* Macros grid responsive for tablet */
    .macros-grid {
        gap: 32px;
    }
    
    .macro-circle {
        width: 100px;
        height: 100px;
    }
    
    .macro-circle::after {
        width: 80px;
        height: 80px;
    }
    
    .calories-circle {
        width: 110px;
        height: 110px;
    }
    
    .calories-circle::after {
        width: 88px;
        height: 88px;
    }
    
    .inner-text {
        font-size: 0.8rem;
    }
    
    /* Meal planner grid responsive */
    .meal-planner-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .meal-planner-grid .meal-card {
        padding: 16px;
    }
    
    .meal-planner-grid .meal-card h3 {
        font-size: 1rem;
    }
    
    .meal-planner-grid .meal-card .meal-name {
        font-size: 0.9rem;
    }
    
    .meal-planner-grid .meal-card .details-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
    
    .chat-container {
        height: auto;
        min-height: 400px;
        max-height: calc(100vh - 200px);
    }
}

/* Mobile Breakpoint (768px) */
@media (max-width: 768px) {
    :root {
        --page-padding-x: 16px;
        --page-padding-y: 24px;
    }
    
    /* Sidebar mobile adjustments */
    .sidebar-container {
        width: 260px;
        padding: 16px;
    }
    
    .logo-icon {
        width: 100px;
    }
    
    .sidebar-subtitle {
        font-size: 0.8rem;
    }
    
    .sidebar-link {
        padding: 8px 10px;
        font-size: 0.9rem;
        gap: 10px;
    }
    
    .sidebar-icon {
        width: 20px;
        height: 20px;
    }
    
    .page-content {
        padding: 70px 16px 24px !important;
    }
    
    .hero-section {
        padding: 0 0 16px;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section p {
        font-size: 0.95rem;
    }
    
    .dashboard-grid {
        gap: 16px;
    }
    
    .dashboard-card {
        padding: 20px;
        border-radius: 16px;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
    
    .action-btn {
        padding: 12px 20px;
        font-size: 0.95rem;
        width: 100%;
    }
    
    .meal-planner-form .action-btn {
        align-self: stretch;
    }
    
    .form-actions-centered {
        width: 100%;
    }
    
    .form-actions-centered .action-btn {
        width: 100%;
    }

    /* Missing days section mobile */
    .missing-days-section {
        padding: 16px 12px;
    }

    .missing-days-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        max-height: 350px;
        padding: 10px;
    }

    .missing-day-card {
        padding: 10px;
    }
    
    .weight-input-group {
        flex-direction: column;
        gap: 6px;
    }
    
    .skip-day-btn {
        width: 100%;
        padding: 8px 12px;
    }

    .missing-days-actions {
        flex-direction: column;
        gap: 10px;
    }

    .submit-all-btn, .skip-all-btn {
        width: 100%;
        padding: 12px 24px;
    }
    
    .filling-progress {
        font-size: 0.85rem;
        padding: 6px;
    }
    
    /* Weight cards stack on mobile */
    .weight-section {
        padding: 16px;
    }
    
    .weight-card {
        padding: 16px;
    }
    
    .weight-card h2 {
        font-size: 1.2rem;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }
    
    .weight-card .weight-value {
        font-size: 1.5rem;
    }
    
    /* Macros section */
    .macros-section {
        padding: 20px;
    }
    
    .calorie-tracker {
        padding: 20px;
    }
    
    /* Macros combined card mobile */
    .macros-combined-card {
        padding: 16px;
        gap: 10px;
    }
    
    /* Macros grid responsive for mobile */
    .macros-grid {
        gap: 16px;
        justify-content: center;
    }
    
    .macro-circle {
        width: 85px;
        height: 85px;
    }
    
    .macro-circle::after {
        width: 68px;
        height: 68px;
    }
    
    .calories-circle {
        width: 95px;
        height: 95px;
    }
    
    .calories-circle::after {
        width: 76px;
        height: 76px;
    }
    
    .inner-text {
        font-size: 0.7rem;
    }
    
    .inner-text p {
        line-height: 1.2;
    }
    
    .small-progress-circle {
        width: 70px;
        height: 70px;
    }
    
    .small-progress-circle::after {
        width: 56px;
        height: 56px;
    }
    
    .progress-text {
        font-size: 0.75rem;
    }
    
    /* Meal planner grid responsive */
    .meal-planner-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .meal-planner-grid .meal-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        padding: 12px 14px;
        gap: 12px;
    }
    
    .meal-planner-grid .meal-card h3 {
        flex: 0 0 70px;
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    
    .meal-planner-grid .meal-card .meal-name {
        flex: 1;
        font-size: 0.8rem;
        margin-bottom: 0;
        line-height: 1.3;
    }
    
    .meal-planner-grid .meal-card .details-btn {
        flex: 0 0 auto;
        width: auto;
        font-size: 0.75rem;
        padding: 6px 10px;
    }
    
    .meal-planner {
        padding: 16px;
    }
    
    .meal-planner h2 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    /* AI analysis section */
    .ai-analysis-section, .goal-weight-test-section {
        padding: 20px;
    }
    
    .ai-analysis-section h2, .goal-weight-test-section h2 {
        font-size: 1.2rem;
    }
    
    .generate-ai-btn, .generate-goal-weight-btn {
        width: 100%;
        padding: 12px 20px;
    }
    
    /* Calendar grid responsive */
    .macro-tracker-card {
        padding: 16px;
        overflow: hidden;
    }
    
    .calendar-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -8px;
        padding: 0 8px;
    }
    
    .calendar-grid {
        gap: 8px;
        padding: 16px;
        min-width: 320px;
    }
    
    .calendar-day {
        width: 36px;
        height: 75px;
        padding: 6px;
        border-radius: 10px;
    }
    
    .day-label {
        font-size: 0.75rem;
    }
    
    .progress-ring {
        width: 32px;
        height: 32px;
        font-size: 0.6rem;
    }
    
    /* Chat container mobile */
    .chat-container {
        border-radius: 16px;
        padding: 16px;
    }
    
    .chat-box {
        padding: 12px;
    }
    
    /* Chat messages smaller text for mobile */
    .user-message, .ai-message {
        padding: 10px 14px;
        font-size: 0.9rem;
        max-width: 90%;
    }
    
    .ai-message p, .ai-message ul, .ai-message li {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .ai-message img {
        width: 20px;
        height: 20px;
    }
    
    .chat-input-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .chat-input-container input {
        width: 100%;
        font-size: 0.95rem;
    }
    
    .chat-input-container button {
        width: 100%;
    }
    
    /* Form elements */
    .form-select {
        padding: 12px 36px 12px 14px;
    }
    
    .custom-file-label {
        width: 100%;
        max-width: 100%;
        padding: 14px 24px;
        box-sizing: border-box;
    }
    
    .upload-form .form-group {
        width: 100%;
    }
    
    .selected-file {
        font-size: 0.85rem;
    }
    
    /* Goal tracker mobile */
    .goal-tracker-container {
        padding: 16px;
    }
    
    .date-navigation {
        gap: 16px;
    }
    
    .date-navigation span {
        font-size: 1rem;
        min-width: 120px;
    }
    
    .arrow-btn {
        width: 40px;
        height: 40px;
    }
    
    /* Meal planner cards */
    .meal-cards {
        grid-template-columns: 1fr;
    }
    
    .meal-card {
        padding: 16px;
    }
    
    .meal-card-wrapper {
        padding: 20px;
    }
    
    .meal-card-content {
        flex-direction: column;
    }
    
    .meal-image {
        width: 100%;
        max-width: 180px;
        margin: 0 auto 16px;
    }
    
    /* Reports list */
    .reports-list {
        gap: 12px;
    }
    
    .report-card {
        padding: 16px;
    }
    
    /* Meal planner */
    .meal-cards {
        grid-template-columns: 1fr;
    }
    
    .meal-card {
        padding: 16px;
    }
    
    /* Config/Settings */
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .content-panel {
        padding: 20px;
        border-radius: 16px;
    }
    
    /* Profile menu */
    .profile-menu-container {
        top: 12px;
        right: 12px;
    }
    
    .profile-icon {
        width: 36px;
        height: 36px;
    }
}

/* Small Mobile (480px) */
@media (max-width: 480px) {
    /* Sidebar small mobile */
    .sidebar-container {
        width: 240px;
        padding: 14px;
    }
    
    .sidebar-header {
        margin-bottom: 16px;
    }
    
    .logo-icon {
        width: 90px;
    }
    
    .sidebar-subtitle {
        font-size: 0.75rem;
    }
    
    .sidebar-menu {
        margin: 12px 0;
    }
    
    .sidebar-item {
        margin-bottom: 8px;
    }
    
    .sidebar-link {
        padding: 8px;
        font-size: 0.85rem;
        gap: 8px;
        border-radius: 10px;
    }
    
    .sidebar-icon {
        width: 18px;
        height: 18px;
    }
    
    .sidebar-footer {
        font-size: 0.8rem;
    }
    
    .sidebar-toggle {
        width: 40px;
        height: 40px;
        top: 12px;
        left: 12px;
    }
    
    .toggle-bar {
        width: 20px;
    }
    
    .page-content {
        padding: 65px 12px 20px !important;
    }
    
    .hero-section h1 {
        font-size: 1.4rem;
    }
    
    .hero-section p {
        font-size: 0.9rem;
    }
    
    .dashboard-card {
        padding: 14px;
        border-radius: 14px;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    /* Calendar small mobile */
    .calendar-grid {
        gap: 4px;
        padding: 10px;
        min-width: 280px;
    }
    
    .calendar-day {
        width: 30px;
        height: 60px;
        padding: 4px;
        border-radius: 8px;
    }
    
    .day-label {
        font-size: 0.65rem;
    }
    
    .progress-ring {
        width: 26px;
        height: 26px;
        font-size: 0.5rem;
    }
    
    .gut-score-ring svg {
        width: 110px;
        height: 110px;
    }
    
    .score-value {
        font-size: 2rem;
    }
    
    /* Upload form small mobile */
    .custom-file-label {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .selected-file {
        font-size: 0.8rem;
    }
    
    /* Chat small mobile */
    .chat-container {
        padding: 12px;
    }
    
    .user-message, .ai-message {
        padding: 8px 12px;
        font-size: 0.85rem;
        border-radius: 14px;
    }
    
    .ai-message p, .ai-message ul, .ai-message li {
        font-size: 0.85rem;
        line-height: 1.45;
    }
    
    .ai-message img {
        width: 18px;
        height: 18px;
    }
    
    .chat-input-container input {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    
    /* Goal tracker small mobile */
    .goal-tracker-container {
        padding: 12px;
    }
    
    .weight-section {
        padding: 12px;
        gap: 12px;
    }
    
    .weight-card {
        padding: 12px;
    }
    
    .weight-card h2 {
        font-size: 1.2rem;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }
    
    .weight-card .weight-value {
        font-size: 1.3rem;
    }
    
    .macros-section, .calorie-tracker {
        padding: 14px;
    }
    
    /* Macros combined card small mobile */
    .macros-combined-card {
        padding: 14px;
        gap: 8px;
    }
    
    /* Macros grid small mobile */
    .macros-grid {
        gap: 12px;
    }
    
    .macro-circle {
        width: 70px;
        height: 70px;
    }
    
    .macro-circle::after {
        width: 56px;
        height: 56px;
    }
    
    .calories-circle {
        width: 80px;
        height: 80px;
    }
    
    .calories-circle::after {
        width: 64px;
        height: 64px;
    }
    
    .inner-text {
        font-size: 0.6rem;
    }
    
    .macro-title, .calories-remaining {
        font-size: 0.7rem;
    }
    
    .small-progress-circle {
        width: 60px;
        height: 60px;
    }
    
    .small-progress-circle::after {
        width: 48px;
        height: 48px;
    }
    
    .progress-text {
        font-size: 0.65rem;
    }
    
    /* AI analysis small mobile */
    .ai-analysis-section, .goal-weight-test-section {
        padding: 14px;
    }
    
    .ai-analysis-section h2, .goal-weight-test-section h2 {
        font-size: 1.1rem;
        padding-bottom: 10px;
        margin-bottom: 12px;
    }
    
    .generate-ai-btn, .generate-goal-weight-btn {
        font-size: 0.9rem;
        padding: 10px 16px;
    }
    
    /* Meal planner small */
    .meal-card-wrapper {
        padding: 14px;
    }
    
    .meal-details h3 {
        font-size: 1rem;
    }
    
    .meal-details ul, .meal-details p {
        font-size: 0.85rem;
    }
    
    /* Meal planner grid small mobile */
    .meal-planner-grid {
        gap: 6px;
    }
    
    .meal-planner-grid .meal-card {
        flex-direction: row;
        padding: 10px 12px;
        gap: 8px;
    }
    
    .meal-planner-grid .meal-card h3 {
        flex: 0 0 60px;
        font-size: 0.8rem;
    }
    
    .meal-planner-grid .meal-card .meal-name {
        font-size: 0.75rem;
        line-height: 1.25;
    }
    
    .meal-planner-grid .meal-card .details-btn {
        font-size: 0.7rem;
        padding: 5px 8px;
    }
    
    .meal-planner {
        padding: 12px;
    }
    
    .meal-planner h2 {
        font-size: 1.1rem;
    }
    
    .score-value {
        font-size: 1.5rem;
    }
    
    .macro-circle-container {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .macro-circle {
        width: 70px;
        height: 70px;
    }
    
    /* Popup/Modal responsive */
    .popup-content {
        width: 95%;
        margin: 10px;
        padding: 20px;
    }
    
    .reports-list {
        gap: 12px;
    }
    
    .report-card {
        padding: 16px;
    }
}
.macro-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;        /* space between Submit and Extract buttons */
    margin-top: 1rem;
  }
  
  .macro-image-upload {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  /* Optional: make extract button look like a secondary action */
  .secondary-btn {
    background-color: #f5f5f5;
    color: #111;
    border: 1px solid #ddd;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    cursor: pointer;
  }
  
  .secondary-btn:hover {
    background-color: #e8e8e8;
  }