:root {
    --verde-salvia: #778E5C;
    --off-white: #F9F9F7;
    --antracite: #2F3640;
    --terracota: #D6835F;
    --branco: #ffffff;
    --cinza-claro: #ececec;
    --cinza-medio: #666;
    --proteina: #3498db;
    --carbo: #e67e22;
    --gordura: #f1c40f;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--off-white); 
    color: var(--antracite); 
    line-height: 1.6; 
}
header {
    background: var(--branco);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.cardapio-header-fixo {
	position: sticky;
	top: 80px;
	z-index: 900;
	margin-bottom: 25px;
}
.logo-container { 
	display: flex; 
	align-items: center; 
	gap: 10px; 
}
.logo-icon { width: 50px; }
.logo-text { 
	font-family: 'Playfair Display', serif; 
	font-size: 1.6rem; 
	color: var(--antracite);
	font-weight: 700;
}
.macro-legend {
	display: flex;
	justify-content: center;
	gap: 25px;
	margin: 15px 0 30px;
	flex-wrap: wrap;
	font-size: 0.9rem;
}
.legend-item {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--cinza-medio);
}
.color-box {
	display: inline-block;
	width: 18px;
	height: 18px;
	border-radius: 4px;
}
.color-box.p { background-color: #3498db; }
.color-box.c { background-color: #e67e22; }
.color-box.g { background-color: #f1c40f; }
.db-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 20px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}
.meal-option {
	cursor: pointer;
	user-select: none;
}
.meal-option-ui {
	padding: 8px 16px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 0.9rem;
	font-weight: 600;
	transition: all 0.2s;
}
.meal-option input:checked + .meal-option-ui {
	background-color: var(--verde-salvia);
	color: white;
	border-color: var(--verde-salvia);
}
.meal-option input {
	position: absolute;
	opacity: 0;
}
.chips-container {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}
h1 { 
	font-size: 2.4rem; 
	margin-bottom: 1rem; 
	color: var(--antracite);
	letter-spacing: -0.5px;
	width: 100%;
	text-align: center;
}
.container { 
    padding: 3rem 5%; 
    max-width: 1200px; 
    margin: 0 auto; 
}
.cadastro-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.card, .filtro-container {
    background: var(--branco);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e1e1e1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 20px;
}
.item-atual {
	color: #778E5C;
	font-weight: 600;
}
input[type="range"] {
	accent-color: var(--verde-salvia);
	width: 100%;
}
.input-group {
	flex: 1;
	min-width: 260px;
}
.form-group, .input-group { margin-bottom: 20px; }
.form-group label, .input-group label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
    color: var(--cinza-medio);
    display: block;
    font-weight: 600;
}
input[type="text"], input[type="email"], input[type="password"], 
input[type="date"], input[type="number"], select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
	appearance: none;
	transition: 1s;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.btn-gerar, .btn-cadastro, .btn-salvar {
    background-color: var(--verde-salvia);
    color: var(--branco);
    padding: 0.85rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    text-align: center;
}
.btn-salvar { 
    background-color: var(--terracota); 
    box-shadow: 0 4px 15px rgba(214, 131, 95, 0.3);
}
.btn-gerar:hover, .btn-cadastro:hover { background-color: #5f724a; transform: translateY(-2px); }
.cardapio-header {
    display: flex; align-items: center; justify-content: space-between;
    background: white; padding: 20px; border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 30px;
    border-left: 5px solid var(--proteina); flex-wrap: wrap; gap: 15px;
}
.cardapio-grid-dinamico {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}
.dia-card {
    background: white;
	border: 1px solid #e0e0e0;
    border-radius: 10px;
	padding: 18px;
	transition: transform 0.25s, box-shadow 0.25s;
}
.dia-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.dia-titulo {
    font-family: 'Playfair Display', serif;
    color: var(--verde-salvia); font-size: 1.35rem;
    margin-bottom: 15px; padding-bottom: 8px; border-bottom: 2px solid #f0f0f0;
}
.refeicao-box { margin-bottom: 18px; }
.refeicao-nome {
    font-size: 0.82rem; text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--terracota); font-weight: 700; display: block; margin-bottom: 8px;
}
.alimento-info { flex: 1; }
.icon-substituir { transition: transform 0.4s ease; }
.btn-substituir {
	background: #f8f9f5;
	color: #778E5C;
	border: 1px solid #778E5C;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.35rem;
	cursor: pointer;
	transition: all 0.25s ease;
	flex-shrink: 0;
	box-shadow: 0 2px 6px rgba(119, 142, 92, 0.25);
}
.btn-substituir:hover {
	background: #778E5C;
	color: white;
}
.btn-substituir span { font-size: 1.1rem; }
.alimento-item {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	border-bottom: 1px dashed #f0f0f0;
	font-size: 0.96rem;
}
.macro-bar-container {
    display: flex; height: 8px; background-color: #eee;
    border-radius: 4px; overflow: hidden; margin: 12px 0 8px;
}
.macro-bar-segment {
	height: 100%;
	transition: width 0.4s ease;
}
.macro-bar-segment.p { background-color: var(--proteina); }
.macro-bar-segment.c { background-color: var(--carbo); }
.macro-bar-segment.g { background-color: var(--gordura); }
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
}
.modal-substituir-profissional {
    background: white; border-radius: 16px; width: 90%; max-width: 480px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); overflow: hidden;
}
.modal-header {
	padding: 20px 24px;
	border-bottom: 1px solid #eee;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.modal-header h3 {
	margin: 0;
	font-size: 1.25rem;
	color: #2F3640;
}
.modal-close-btn {
	background: none;
	border: none;
	font-size: 1.8rem;
	color: #aaa;
	cursor: pointer;
}
.modal-instrucao {
	padding: 16px 24px 8px;
	color: #666;
	font-size: 0.95rem;
}
.substitutos-list {
	padding: 8px 16px 24px;
	max-height: 420px;
	overflow-y: auto;
}
.substituto-item {
	padding: 16px 20px;
	margin: 6px 0;
	border: 1px solid #eee;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.25s;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.substituto-nome {
	font-weight: 600;
	font-size: 1.05rem;
	color: #2F3640;
}
.substituto-item:hover {
	border-color: #778E5C;
	background: #f8f9f5;
}
.substituto-detalhes {
	font-size: 0.9rem;
	color: #555;
	text-align: right;
}
.substituto-detalhes .prot {
	color: #778E5C;
	font-weight: 500;
}
.tab-buttons { display: flex; gap: 8px; margin-bottom: 20px; }
.tab-button {
    padding: 10px 18px; background: #eee; border-radius: 6px;
    cursor: pointer; font-weight: 600; font-size: 0.9rem;
}
.tab-button.active { background: var(--verde-salvia); color: white; }
@media (max-width: 768px) {
	h1 { font-size: 2rem; }
    .form-row { grid-template-columns: 1fr; }
	.db-header { flex-direction: column; align-items: stretch; }
    .cardapio-header { flex-direction: column; text-align: center; }
}
footer {
	width: 100%;
	font-size: 0.8rem;
	color: #333;
	text-align: center;
}

/* Container do item durante o loading */
.alimento-item.is-loading {
    position: relative;
    overflow: hidden;
    pointer-events: none;
    border-radius: 12px !important; /* Mesma curvatura do cardápio */
    border: 1px solid #eee !important;
    background: #fdfdfd !important;
}

/* O brilho sutil */
.alimento-item.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg, 
        rgba(255,255,255,0) 0, 
        rgba(0,0,0,0.03) 50%, 
        rgba(255,255,255,0) 100%
    );
    animation: loading-shimmer 1.8s infinite;
}

@keyframes loading-shimmer {
    100% { transform: translateX(100%); }
}

/* Container das notificações */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* Base da Notificação */
.toast-item {
    min-width: 280px;
    max-width: 450px;
    padding: 16px 24px;
    border-radius: 12px;
    color: #ffffff;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: translateX(50px);
    backdrop-filter: blur(4px); /* Efeito moderno */
}

.toast-item.show {
    opacity: 1;
    transform: translateX(0);
}

/* Variantes de cores */
.toast-success { background-color: rgba(40, 167, 69, 0.95); border-left: 5px solid #1e7e34; }
.toast-error   { background-color: rgba(220, 53, 69, 0.95); border-left: 5px solid #bd2130; }
.toast-warning { background-color: rgba(255, 193, 7, 0.95); color: #212529; border-left: 5px solid #d39e00; }