:root {
	--nt-ink: #17211c;
	--nt-muted: #46524b;
	--nt-line: #e2e8e3;
	--nt-bg: #f3f6f2;
	--nt-card: #ffffff;
	--nt-green: #174e37;
	--nt-green-2: #286747;
	--nt-lime: #c9f36a;
	--nt-sage: #e7efd9;
	--nt-amber: #f0b75b;
	--nt-red: #9d3b35;
	--nt-olive: #55661f;
	--nt-radius: 22px;
	--nt-shadow: 0 12px 34px rgba(29, 57, 43, .08);
}

html.nutrition-tracker-shell { width: 100%; margin: 0 !important; padding: 0 !important; min-height: 100%; overflow-x: hidden; overflow-y: auto; background: var(--nt-bg); }
html.nutrition-tracker-shell body { width: 100%; margin: 0 !important; padding: 0 !important; min-height: 100%; overflow-x: hidden; overflow-y: visible; overscroll-behavior-y: auto; }

.nt-app, .nt-app * { box-sizing: border-box; text-transform: none !important; }
.nt-app [hidden] { display: none !important; }
.nt-app {
	width: 100%;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	min-height: 100vh;
	min-height: 100dvh;
	background: var(--nt-bg);
	color: var(--nt-ink);
	font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	-webkit-font-smoothing: antialiased;
}
.nutrition-tracker-page { margin: 0; background: var(--nt-bg); }
.nutrition-tracker-page #wpadminbar { display: none !important; }
.nt-app button, .nt-app input, .nt-app select, .nt-app textarea { font: inherit; }
.nt-app button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

#wpcontent { padding-left: 0; }
#wpbody-content { padding-bottom: 0; }
.toplevel_page_nutrition-tracker #wpfooter { display: none; }
.toplevel_page_nutrition-tracker .wrap { margin: 0; }
.toplevel_page_nutrition-tracker .nt-topbar { top: 32px; }

.nt-topbar {
	height: 78px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 34px;
	background: rgba(255,255,255,.88);
	border-bottom: 1px solid var(--nt-line);
	backdrop-filter: blur(12px);
	position: sticky;
	top: 0;
	z-index: 30;
}
.nt-brand { display: flex; align-items: center; gap: 12px; }
.nt-brand-mark {
	display: grid; place-items: center; width: 38px; height: 38px;
	border-radius: 12px; background: var(--nt-green); color: var(--nt-lime); font-size: 24px;
}
.nt-brand strong { display: block; font-size: 17px; letter-spacing: -.02em; }
.nt-brand small { display: block; color: var(--nt-muted); font-size: 11px; margin-top: -2px; }
.nt-top-actions { display: flex; align-items: center; gap: 16px; }
.nt-date { color: var(--nt-muted); font-size: 13px; }
.nt-avatar {
	display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
	background: var(--nt-sage); color: var(--nt-green); font-weight: 800;
}

.nt-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); width: 100%; min-width: 0; max-width: 100%; min-height: calc(100vh - 78px); }
.nt-nav {
	padding: 28px 18px;
	background: #fff;
	border-right: 1px solid var(--nt-line);
	display: flex; flex-direction: column; gap: 6px;
	position: sticky; top: 78px; align-self: start; height: calc(100vh - 78px); overflow-y: auto;
}
.nt-nav button {
	border: 0; background: transparent; color: #526059; border-radius: 13px;
	display: flex; align-items: center; gap: 11px; padding: 12px 14px; text-align: left;
}
.nt-nav button span { width: 21px; text-align: center; font-size: 18px; color: #46524b; }
.nt-nav svg, .nt-more-sheet svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nt-nav [data-panel="dashboard"] svg { fill: currentColor; stroke: none; }
.nt-nav .nt-mobile-more { display: none; }
.nt-nav button:hover { background: #f3f7f3; color: var(--nt-green); }
.nt-nav button.is-active { background: var(--nt-green); color: #fff; font-weight: 650; }
.nt-nav button.is-active span { color: var(--nt-lime); }

.nt-more-sheet { display: none; }

.nt-main { width: 100%; min-width: 0; max-width: 1460px; padding: 38px clamp(28px, 3vw, 52px) 90px; margin: 0 auto; }
.nt-panel { display: none; width: 100%; min-width: 0; max-width: 100%; animation: nt-in .28s ease; }
.nt-panel.is-active { display: block; }
@keyframes nt-in { from { opacity: 0; transform: translateY(6px); } }
.nt-loading { padding: 80px 20px; text-align: center; color: var(--nt-muted); }

.nt-page-head { display: flex; width: 100%; min-width: 0; max-width: 100%; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 26px; }
.nt-page-head > * { min-width: 0; max-width: 100%; }
.nt-eyebrow { color: var(--nt-green-2); letter-spacing: .035em; font-size: 12px; font-weight: 750; }
.nt-page-head h1, .nt-setup h1 { margin: 5px 0 2px; font-size: clamp(28px, 4vw, 42px); line-height: 1.08; letter-spacing: -.045em; color: var(--nt-ink); }
.nt-page-head p, .nt-lead { margin: 7px 0 0; color: var(--nt-muted); }
.nt-toolbar { display: flex; min-width: 0; max-width: 100%; align-items: center; gap: 10px; flex-wrap: wrap; }

.nt-grid { display: grid; width: 100%; min-width: 0; max-width: 100%; gap: 18px; }
.nt-grid > * { min-width: 0; max-width: 100%; }
.nt-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nt-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nt-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nt-diary-grid { grid-template-columns: minmax(300px, .82fr) minmax(460px, 1.18fr); }
.nt-template-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nt-diary-grid, .nt-progress-layout, .nt-foods-layout, .nt-activity-layout, .nt-settings-layout, .nt-template-library-grid { align-items: start; }
.nt-card {
	width: 100%; min-width: 0; max-width: 100%;
	background: var(--nt-card); border: 1px solid rgba(213,223,216,.85); border-radius: var(--nt-radius);
	padding: 22px; box-shadow: 0 2px 0 rgba(25,54,40,.02);
}
.nt-card h2 { font-size: 16px; margin: 0 0 17px; letter-spacing: -.02em; }
.nt-card-head { display: flex; min-width: 0; max-width: 100%; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 17px; }
.nt-card-head > * { min-width: 0; max-width: 100%; }
.nt-card-head h2 { margin: 0; }
.nt-card-subtle { background: rgba(255,255,255,.62); }
.nt-hero { background: var(--nt-green); color: #fff; border: 0; overflow: hidden; position: relative; }
.nt-hero::after { content: ""; width: 180px; height: 180px; border: 35px solid rgba(201,243,106,.09); border-radius: 50%; position: absolute; right: -60px; bottom: -85px; }
.nt-hero .nt-label, .nt-hero .nt-muted, .nt-hero .nt-caption { color: rgba(255,255,255,.78); }
.nt-hero strong { color: #fff; }

.nt-label { display: block; color: var(--nt-muted); font-size: 12px; margin-bottom: 8px; }
.nt-big-number { display: flex; align-items: baseline; gap: 6px; font-size: 42px; line-height: 1; letter-spacing: -.05em; font-weight: 760; }
.nt-big-number small { font-size: 14px; letter-spacing: 0; font-weight: 500; color: var(--nt-muted); }
.nt-hero .nt-big-number small { color: rgba(255,255,255,.78); }
.nt-stat { font-size: 28px; line-height: 1.05; letter-spacing: -.04em; font-weight: 760; }
.nt-stat small { font-size: 13px; letter-spacing: 0; color: var(--nt-muted); font-weight: 500; }
.nt-muted { color: var(--nt-muted); }
.nt-caption { font-size: 12px; color: var(--nt-muted); }

.nt-progress { height: 7px; background: #e7ece8; border-radius: 99px; overflow: hidden; margin: 14px 0 8px; }
.nt-progress span { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: var(--nt-green-2); transition: width .4s ease; }
.nt-hero .nt-progress { background: rgba(255,255,255,.15); }
.nt-hero .nt-progress span { background: var(--nt-lime); }
.nt-macro { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 11px; margin: 13px 0; }
.nt-macro-icon { width: 37px; height: 37px; border-radius: 11px; display: grid; place-items: center; background: #eef3e4; color: var(--nt-green); font-weight: 800; }
.nt-macro strong { display: block; font-size: 13px; }
.nt-macro .nt-progress { margin: 5px 0 0; height: 5px; }
.nt-macro-value { font-size: 12px; color: var(--nt-muted); }

.nt-week-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.nt-week-item { padding-right: 16px; border-right: 1px solid var(--nt-line); }
.nt-week-item:last-child { border-right: 0; }
.nt-week-item strong { display: block; font-size: 21px; margin-top: 3px; }
.nt-week-item small { display: block; color: var(--nt-muted); margin-top: 3px; }
.nt-badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 4px 9px; font-size: 11px; font-weight: 700; background: #eef3e4; color: var(--nt-green); }
.nt-badge.estimated { background: #fff3de; color: #8b5b0c; }
.nt-badge.inferred { background: #f0f4df; color: var(--nt-olive); }

.nt-form { display: grid; width: 100%; min-width: 0; max-width: 100%; gap: 18px; }
.nt-fields { display: grid; width: 100%; min-width: 0; max-width: 100%; gap: 14px; }
.nt-fields > *, .nt-form > * { min-width: 0; max-width: 100%; }
.nt-fields-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.nt-fields-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nt-fields-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nt-form label { display: grid; gap: 7px; color: #46524b; font-size: 12px; font-weight: 650; }
.nt-form input, .nt-form select, .nt-form textarea, .nt-date-input, .nt-search {
	width: 100%; min-width: 0; max-width: 100%; min-height: 43px; border: 1px solid #83958a; border-radius: 11px; background: #fff;
	color: var(--nt-ink); padding: 9px 11px; outline: none; box-shadow: none;
}
.nt-app .nt-form label { inline-size: 100%; min-inline-size: 0; max-inline-size: 100%; }
.nt-app .nt-form label > input,
.nt-app .nt-form label > select,
.nt-app .nt-form label > textarea,
.nt-app .nt-date-input,
.nt-app .nt-search {
	box-sizing: border-box !important;
	inline-size: 100% !important;
	min-inline-size: 0 !important;
	max-inline-size: 100% !important;
}
/* Safari/iOS conserva un ancho intrínseco en fechas aunque el input tenga
 * width:100%. Se elimina solo la apariencia visual nativa; el picker sigue
 * abriéndose al tocar el control. */
@supports (-webkit-touch-callout: none) {
	.nt-app input[type="date"],
	.nt-app input[type="datetime-local"],
	.nt-app input[type="time"],
	.nt-app input[type="month"],
	.nt-app input[type="week"] {
		display: block !important;
		inline-size: 100% !important;
		min-inline-size: 0 !important;
		max-inline-size: 100% !important;
		-webkit-appearance: none;
		appearance: none;
		overflow: hidden;
		text-align: left;
	}
	.nt-app input[type="date"]::-webkit-date-and-time-value,
	.nt-app input[type="datetime-local"]::-webkit-date-and-time-value,
	.nt-app input[type="time"]::-webkit-date-and-time-value,
	.nt-app input[type="month"]::-webkit-date-and-time-value,
	.nt-app input[type="week"]::-webkit-date-and-time-value {
		min-width: 0;
		margin: 0;
		text-align: left;
	}
}
.nt-form input::placeholder, .nt-form textarea::placeholder, .nt-date-input::placeholder, .nt-search::placeholder { color: #64736a; opacity: 1; }
.nt-form textarea { min-height: 82px; resize: vertical; }
.nt-app .nt-form input, .nt-app .nt-form select, .nt-app .nt-form textarea, .nt-app .nt-date-input, .nt-app .nt-search { border-color: #83958a !important; outline: 0 !important; }
.nt-app .nt-form input:invalid, .nt-app .nt-form select:invalid, .nt-app .nt-form textarea:invalid, .nt-app .nt-form input:user-invalid, .nt-app .nt-form select:user-invalid, .nt-app .nt-form textarea:user-invalid { border-color: #83958a !important; box-shadow: none !important; }
.nt-app .nt-form input:focus, .nt-app .nt-form select:focus, .nt-app .nt-form textarea:focus, .nt-app .nt-date-input:focus, .nt-app .nt-search:focus { border-color: var(--nt-green) !important; box-shadow: 0 0 0 3px rgba(23,78,55,.18) !important; }
.nt-app button:focus-visible, .nt-public-login button:focus-visible, .nt-public-login input:focus-visible { outline: 3px solid var(--nt-lime) !important; outline-offset: 2px; }
.nt-form input:disabled { background: #f1f4f2; color: #5f6a64; cursor: not-allowed; }
.nt-target-field { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 10px; padding: 12px; border: 1px solid var(--nt-line); border-radius: 14px; background: #fafcfb; }
.nt-form-section { display: flex; align-items: center; gap: 12px; padding-top: 8px; }
.nt-form-section > span { display: grid; place-items: center; width: 33px; height: 33px; background: var(--nt-sage); color: var(--nt-green); border-radius: 10px; font-size: 11px; font-weight: 800; }
.nt-form-section strong, .nt-form-section small { display: block; }
.nt-form-section small { color: var(--nt-muted); font-size: 11px; }
.nt-routine-activities { display: grid; gap: 12px; }
.nt-routine-activity { min-width: 0; padding: 14px; border: 1px solid var(--nt-line); border-radius: 15px; background: #f8faf8; }
.nt-routine-activity .nt-routine-remove { display: flex; margin: 10px 0 0 auto; color: var(--nt-red); }

.nt-primary, .nt-secondary, .nt-danger, .nt-icon-button, .nt-button {
	border: 0; border-radius: 11px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 9px 15px; text-decoration: none; font-weight: 700; font-size: 13px; transition: transform .12s, background .12s;
}
.nt-primary, .nt-button { background: var(--nt-green); color: #fff; }
.nt-primary:hover, .nt-button:hover { background: #0e3c29; color: #fff; transform: translateY(-1px); }
.nt-secondary { background: #fff; color: var(--nt-green); border: 1px solid var(--nt-green); }
.nt-secondary:hover { background: #eef3e4; }
.nt-danger { background: #fff0ef; color: var(--nt-red); }
.nt-icon-button { min-height: 34px; padding: 6px 10px; background: transparent; color: var(--nt-muted); }
.nt-icon-button:hover { background: #f2f4f2; color: var(--nt-red); }
.nt-large { min-height: 50px; font-size: 14px; }
.nt-primary[disabled] { opacity: .76; cursor: wait; transform: none; }
.nt-file-button { cursor: pointer; }
.nt-file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.nt-list { display: grid; width: 100%; min-width: 0; max-width: 100%; gap: 10px; }
.nt-list-item { display: flex; align-items: center; justify-content: space-between; width: 100%; min-width: 0; max-width: 100%; gap: 16px; border: 1px solid var(--nt-line); border-radius: 15px; padding: 14px 15px; background: #fff; }
.nt-list-main { min-width: 0; width: 0; flex: 1 1 0; display: flex; align-items: center; gap: 12px; }
.nt-list-main > div:last-child { min-width: 0; flex: 1 1 0; }
.nt-list-main strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nt-list-main small { display: block; max-width: 100%; color: var(--nt-muted); margin-top: 2px; overflow-wrap: anywhere; }
.nt-list-side { display: flex; align-items: center; max-width: 100%; gap: 8px; flex: 0 0 auto; }
.nt-row-actions { display: flex; min-width: 0; max-width: 100%; align-items: center; gap: 2px; }
.nt-item-builder { display: grid; gap: 13px; padding: 16px; border-radius: 16px; background: #f4f7f4; border: 1px solid var(--nt-line); }
.nt-item-builder .nt-card-head { margin-bottom: 0; }
.nt-draft-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 10px; color: var(--nt-muted); font-size: 12px; }
.nt-draft-head strong { color: var(--nt-ink); font-size: 14px; }
.nt-template-list { display: flex; width: 100%; min-width: 0; max-width: 100%; flex-wrap: wrap; gap: 10px; }
.nt-template-chip { display: flex; min-width: 0; max-width: 100%; align-items: stretch; border: 1px solid var(--nt-line); border-radius: 13px; overflow: hidden; background: #fff; }
.nt-template-chip > button:first-child { border: 0; background: #fff; padding: 10px 13px; text-align: left; color: var(--nt-ink); }
.nt-template-chip > button:first-child:hover { background: #f3f7f3; }
.nt-template-chip strong, .nt-template-chip small { display: block; }
.nt-template-chip small { margin-top: 2px; color: var(--nt-muted); font-size: 10px; }
.nt-template-chip .nt-icon-button { border-radius: 0; border-left: 1px solid var(--nt-line); }
.nt-list-kcal { font-weight: 750; }
.nt-template-library-row { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.nt-template-library-row .nt-list-main { width: 100%; align-items: start; }
.nt-template-library-row .nt-list-main strong { white-space: normal; overflow: visible; text-overflow: clip; }
.nt-template-library-row .nt-list-main small { line-height: 1.5; overflow-wrap: anywhere; }
.nt-template-library-row .nt-list-side { width: 100%; flex-wrap: wrap; justify-content: flex-end; padding-left: 50px; }
.nt-template-macros { color: var(--nt-muted); white-space: nowrap; }
.nt-template-placement { margin-bottom: 18px; padding: 14px; border-radius: 15px; background: #f4f7f4; border: 1px solid var(--nt-line); }
.nt-template-placement .nt-caption { margin: -3px 0 0; }
.nt-compact { min-height: 34px; padding: 6px 10px; }
.nt-dot { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; background: var(--nt-sage); color: var(--nt-green); font-weight: 800; }
.nt-empty { border: 1px dashed #cdd7cf; border-radius: 17px; padding: 28px; text-align: center; color: var(--nt-muted); }
.nt-empty strong { display: block; color: var(--nt-ink); margin-bottom: 3px; }

.nt-chart { min-height: 240px; position: relative; }
.nt-chart svg { width: 100%; height: 240px; overflow: visible; }
.nt-chart .grid { stroke: #e5ebe6; stroke-width: 1; }
.nt-chart .weight-line { fill: none; stroke: #6c7e73; stroke-width: 2; stroke-dasharray: 4 5; }
.nt-chart .trend-line { fill: none; stroke: var(--nt-green-2); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.nt-chart .point { fill: var(--nt-green-2); stroke: #fff; stroke-width: 3; }
.nt-chart-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--nt-muted); }

.nt-setup { min-height: calc(100vh - 78px); padding: 46px 20px 80px; background: linear-gradient(145deg, #eef4ee, #f7f8f3 58%, #edf2e9); }
.nt-setup-card { max-width: 760px; margin: 0 auto; padding: clamp(25px, 5vw, 48px); background: rgba(255,255,255,.92); border: 1px solid #dce5dd; border-radius: 28px; box-shadow: var(--nt-shadow); }
.nt-setup .nt-lead { max-width: 560px; margin-bottom: 26px; }
.nt-inline-error { padding: 11px 13px; border-radius: 10px; background: #fff0ef; color: #9f3730; font-size: 13px; }
.nt-toast { position: fixed; z-index: 1000; right: 24px; bottom: 24px; max-width: min(360px, calc(100vw - 40px)); background: var(--nt-ink); color: #fff; border-radius: 13px; padding: 12px 16px; box-shadow: var(--nt-shadow); opacity: 0; transform: translateY(15px); pointer-events: none; transition: .2s ease; }
.nt-toast.is-visible { opacity: 1; transform: translateY(0); }
.nt-toast.is-error { background: #912e29; }
.nt-public-login { width: 100%; min-width: 0; max-width: 100%; min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 560px) minmax(0, 1fr); overflow-x: hidden; background: #f5f7f3; color: var(--nt-ink); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.nt-public-login * { box-sizing: border-box; }
.nt-login-panel { width: 100%; min-width: 0; max-width: 100%; display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 7vw, 86px); overflow-x: hidden; background: #fff; position: relative; }
.nt-login-brand { position: absolute; top: 34px; }
.nt-login-panel h1 { margin: 7px 0 8px; font-size: clamp(36px, 5vw, 54px); line-height: 1; letter-spacing: -.055em; }
.nt-login-panel > p { color: var(--nt-muted); margin: 0 0 28px; max-width: 390px; }
.nt-login-panel form { width: 100%; min-width: 0; max-width: 390px; display: grid; gap: 17px; }
.nt-login-panel form p { margin: 0; }
.nt-login-panel form label { display: grid; gap: 7px; font-size: 12px; font-weight: 700; color: #46524b; }
.nt-login-panel form input[type="text"], .nt-login-panel form input[type="password"] { width: 100%; min-height: 48px; border: 1px solid #83958a; border-radius: 12px; padding: 10px 12px; color: var(--nt-ink); font-size: 16px; }
.nt-login-panel form input::placeholder { color: #64736a; opacity: 1; }
.nt-public-login input, .nt-public-login input:invalid, .nt-public-login input:user-invalid { border-color: #83958a !important; box-shadow: none !important; outline: 0 !important; }
.nt-public-login input:focus { border-color: var(--nt-green) !important; box-shadow: 0 0 0 3px rgba(23,78,55,.18) !important; }
.nt-login-panel .login-remember label { display: flex; flex-direction: row; align-items: center; font-weight: 500; }
.nt-login-panel .button-primary { width: 100%; min-height: 50px; border: 0; border-radius: 12px; background: var(--nt-green); color: #fff; font-weight: 750; cursor: pointer; }
.nt-login-art { display: grid; place-items: center; overflow: hidden; padding: 50px; color: #fff; background: radial-gradient(circle at 70% 20%, #39765b, transparent 35%), var(--nt-green); }
.nt-login-art > div { width: min(560px, 80%); }
.nt-login-art span { display: block; color: var(--nt-lime); font-size: 13px; letter-spacing: .035em; font-weight: 750; }
.nt-login-art strong { display: block; margin-top: 12px; font-size: clamp(42px, 6vw, 76px); line-height: .98; letter-spacing: -.055em; }
.nt-login-bars { height: 180px; display: flex; align-items: end; gap: 12px; margin-top: 55px; border-bottom: 1px solid rgba(255,255,255,.25); }
.nt-login-bars i { display: block; width: 14.28%; border-radius: 10px 10px 0 0; background: var(--nt-lime); opacity: .85; }
.nt-login-bars i:nth-child(1) { height: 36%; }
.nt-login-bars i:nth-child(2) { height: 48%; }
.nt-login-bars i:nth-child(3) { height: 43%; }
.nt-login-bars i:nth-child(4) { height: 67%; }
.nt-login-bars i:nth-child(5) { height: 63%; }
.nt-login-bars i:nth-child(6) { height: 80%; }
.nt-login-bars i:nth-child(7) { height: 92%; }

.nt-callout { border-left: 3px solid var(--nt-amber); background: #fff8ec; padding: 12px 14px; border-radius: 4px 12px 12px 4px; color: #72501b; font-size: 13px; }
.nt-token { background: #16251d; color: #dcf5e4; padding: 14px; border-radius: 12px; word-break: break-all; font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.nt-kpi-row { display: flex; flex-wrap: wrap; gap: 15px 26px; }
.nt-kpi-row > div { min-width: 90px; }
.nt-kpi-row strong { font-size: 18px; display: block; }
.nt-kpi-row small { color: var(--nt-muted); }

.nt-goal-history-card { margin-top: 18px; }
.nt-goal-history { display: grid; width: 100%; min-width: 0; gap: 12px; }
.nt-goal-period { width: 100%; min-width: 0; border: 1px solid var(--nt-line); border-radius: 16px; background: #fafcfb; overflow: hidden; }
.nt-goal-period.active { border-color: #b9ccb6; background: #f7faef; }
.nt-goal-period.completed { border-color: #b8d2bd; }
.nt-goal-period > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; padding: 16px; cursor: pointer; list-style-position: inside; }
.nt-goal-period > summary::marker { color: var(--nt-green); }
.nt-goal-period > summary > span:first-child { min-width: 0; flex: 1 1 0; }
.nt-goal-period > summary strong, .nt-goal-period > summary small { display: block; }
.nt-goal-period > summary small { margin-top: 3px; color: var(--nt-muted); overflow-wrap: anywhere; }
.nt-goal-period.completed .nt-goal-status { background: #e4f1e5; }
.nt-goal-period.closed .nt-goal-status { background: #f1f2f0; color: #4c5851; }
.nt-goal-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 0 16px 14px; overflow: hidden; border: 1px solid var(--nt-line); border-radius: 13px; background: var(--nt-line); }
.nt-goal-stats > div { min-width: 0; padding: 12px; background: #fff; }
.nt-goal-stats strong, .nt-goal-stats small { display: block; overflow-wrap: anywhere; }
.nt-goal-stats strong { font-size: 16px; }
.nt-goal-stats small { margin-top: 3px; color: var(--nt-muted); font-size: 11px; line-height: 1.35; }
.nt-goal-period > .nt-caption { margin: 0 16px 16px; }
.nt-goal-lifecycle { display: grid; gap: 12px; margin-bottom: 18px; }
.nt-goal-lifecycle .nt-callout, .nt-goal-new-note { display: grid; gap: 3px; }
.nt-goal-active-note { border-left-color: var(--nt-green-2); background: #f1f6ed; color: var(--nt-ink); }
.nt-goal-new-note { margin-bottom: 18px; }
.nt-goal-dates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--nt-line); border-radius: 14px; background: var(--nt-line); }
.nt-goal-dates > div { min-width: 0; padding: 12px; background: #f8faf8; }
.nt-goal-dates span, .nt-goal-dates strong, .nt-goal-dates small { display: block; overflow-wrap: anywhere; }
.nt-goal-dates span { color: var(--nt-green-2); font-size: 11px; font-weight: 750; }
.nt-goal-dates strong { margin-top: 3px; font-size: 14px; }
.nt-goal-dates small { margin-top: 2px; color: var(--nt-muted); font-size: 10px; }

@media (max-width: 1100px) {
	.nt-grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.nt-fields-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
	.nt-diary-grid, .nt-progress-layout, .nt-foods-layout, .nt-template-library-grid, .nt-activity-layout, .nt-settings-layout { grid-template-columns: minmax(0, 1fr); }
	.nt-target-field { grid-template-columns: minmax(0, 1fr) minmax(150px, .7fr); }
	.nt-goal-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* El menú lateral reduce el ancho útil: el Diario necesita más ventana que otras rejillas. */
@media (max-width: 1480px) and (min-width: 783px) {
	.nt-diary-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 782px) {
	html.nt-sheet-open, html.nt-sheet-open body { overflow: hidden !important; }
	#wpcontent { padding-left: 0 !important; }
	.nt-app { min-height: 100vh; min-height: 100dvh; }
	.nt-topbar { top: 0; height: 68px; padding: 0 17px; }
	.toplevel_page_nutrition-tracker .nt-topbar { top: 46px; }
	.nt-brand small, .nt-date { display: none; }
	.nt-shell { display: block; }
	.nt-nav { position: fixed; top: auto; align-self: auto; height: auto; overflow-y: visible; }
	.nt-main { padding: 25px 15px calc(104px + env(safe-area-inset-bottom)); }
	.nt-nav {
		position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; width: 100%; height: auto;
		min-height: calc(66px + env(safe-area-inset-bottom));
		padding: 7px 5px calc(7px + env(safe-area-inset-bottom));
		border: 0; border-top: 1px solid rgba(210,221,213,.92); flex-direction: row; justify-content: space-around; gap: 2px;
		background: rgba(255,255,255,.96); box-shadow: 0 -8px 28px rgba(29,57,43,.08);
		-webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
	}
	.nt-nav button {
		flex: 1 1 0; min-width: 0; min-height: 50px; flex-direction: column; justify-content: center; gap: 2px;
		font-size: 11px; line-height: 1.1; white-space: nowrap; padding: 5px 2px; border-radius: 11px; color: #3f4b44;
	}
	.nt-nav button span { display: grid; place-items: center; width: 24px; height: 24px; color: inherit; font-size: 18px; line-height: 1; }
	.nt-nav button[data-panel="progress"], .nt-nav button[data-panel="foods"], .nt-nav button[data-panel="meal-templates"], .nt-nav button[data-panel="settings"] { display: none; }
	.nt-nav .nt-mobile-more { display: flex; }
	.nt-nav button.is-active { background: var(--nt-green); color: #fff; }
	.nt-nav button.is-active span { color: #fff; }
	.nt-nav .nt-mobile-more.is-active { background: var(--nt-green); color: #fff; font-weight: 650; }
	.nt-more-sheet { position: fixed; z-index: 1100; inset: 0; display: block; }
	.nt-more-sheet[hidden] { display: none; }
	.nt-more-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
	.nt-more-dialog {
		position: absolute; left: 0; right: 0; bottom: 0; padding: 9px 17px calc(22px + env(safe-area-inset-bottom));
		border-radius: 26px 26px 0 0; background: #fff; box-shadow: 0 -18px 52px rgba(17, 44, 29, .2);
		animation: nt-sheet-in .22s ease-out;
	}
	.nt-more-handle { width: 42px; height: 5px; border-radius: 9px; margin: 0 auto 15px; background: #d8dfda; }
	.nt-more-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
	.nt-more-head h2 { margin: 2px 0 0; color: var(--nt-ink); font-size: 24px; letter-spacing: -.03em; }
	.nt-more-close { position: relative; display: block; width: 42px; height: 42px; flex: 0 0 42px; margin: 0; padding: 0; border: 2px solid var(--nt-green); border-radius: 50%; background: #fff; color: var(--nt-green); line-height: 0; -webkit-appearance: none; appearance: none; }
	.nt-more-close svg { position: absolute; display: block; left: 50%; top: 50%; width: 18px; height: 18px; margin: 0; stroke-width: 2.4; transform: translate(-50%, -50%); }
	.nt-more-actions { display: grid; gap: 10px; }
	.nt-more-actions > button {
		display: grid; grid-template-columns: 48px minmax(0, 1fr) 16px; align-items: center; gap: 13px; width: 100%; min-height: 72px;
		padding: 11px 13px; border: 1px solid #aab8ae; border-radius: 17px; background: #fff; color: var(--nt-ink); text-align: left;
	}
	.nt-more-actions > button:active { background: #f1f5ea; transform: scale(.99); }
	.nt-more-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid var(--nt-green); border-radius: 14px; background: #fff; color: var(--nt-green); }
	.nt-more-actions strong, .nt-more-actions small { display: block; }
	.nt-more-actions strong { font-size: 16px; }
	.nt-more-actions small { margin-top: 3px; color: var(--nt-ink); font-size: 13px; font-weight: 550; line-height: 1.3; }
	.nt-more-actions b { color: #5e6d64; font-size: 24px; font-weight: 400; }
	@keyframes nt-sheet-in { from { transform: translateY(100%); } to { transform: translateY(0); } }
	.nt-toast { right: 14px; bottom: calc(88px + env(safe-area-inset-bottom)); max-width: calc(100vw - 28px); }
	.nt-form input, .nt-form select, .nt-form textarea, .nt-date-input, .nt-search { font-size: 16px; }
	.nt-grid-3, .nt-grid-2 { grid-template-columns: 1fr; }
	.nt-fields-3 { grid-template-columns: 1fr; }
	.nt-week-strip { grid-template-columns: repeat(2, 1fr); }
	.nt-week-item:nth-child(2) { border-right: 0; }
	.nt-card { padding: 18px; border-radius: 18px; }
	.nt-page-head { align-items: flex-start; flex-direction: column; margin-bottom: 19px; }
	.nt-page-head h1 { font-size: 31px; }
	.nt-setup { padding: 20px 10px 70px; }
	.nt-setup-card { padding: 23px 17px; border-radius: 21px; }
	.nt-public-login { grid-template-columns: 1fr; }
	.nt-login-panel { min-height: 100vh; padding: 95px 24px 40px; }
	.nt-login-panel form { max-width: 100%; }
	.nt-login-brand { top: 28px; }
	.nt-login-art { display: none; }
}

@media (display-mode: standalone) and (max-width: 782px) {
	.nt-topbar {
		height: calc(68px + env(safe-area-inset-top));
		padding: env(safe-area-inset-top) 17px 0;
	}
	.nt-shell { min-height: calc(100dvh - 68px - env(safe-area-inset-top)); }
}

@media (max-width: 782px) {
	html.nt-standalone .nt-topbar {
		height: calc(68px + env(safe-area-inset-top));
		padding: env(safe-area-inset-top) 17px 0;
	}
	html.nt-standalone .nt-shell { min-height: calc(100dvh - 68px - env(safe-area-inset-top)); }
}

@media (max-width: 390px) {
	.nt-nav { padding-left: 3px; padding-right: 3px; gap: 0; }
	.nt-nav button { font-size: 10.5px; }
}

@media (max-width: 560px) {
	.nt-grid-4 { grid-template-columns: 1fr; }
	.nt-form .nt-fields { display: flex; flex-direction: column; width: 100%; }
	.nt-form .nt-fields > *, .nt-form > label { width: 100%; min-width: 0; max-width: 100%; }
	.nt-form input, .nt-form select, .nt-form textarea, .nt-date-input, .nt-search {
		display: block; inline-size: 100%; min-inline-size: 0; max-inline-size: 100%;
	}
	.nt-list-item { align-items: flex-start; }
	.nt-list-side { flex-direction: column; align-items: flex-end; }
	.nt-meal-row { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; gap: 12px; overflow: hidden; }
	.nt-meal-row .nt-list-main { display: grid; grid-template-columns: 38px minmax(0, 1fr); width: 100%; }
	.nt-meal-row .nt-list-main > div:last-child { width: auto; max-width: 100%; }
	.nt-meal-row .nt-list-main small { line-height: 1.55; }
	.nt-meal-row .nt-list-side { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; gap: 8px; align-items: stretch; justify-items: stretch; }
	.nt-meal-row .nt-list-kcal { display: block; width: 100%; padding: 9px 11px; border-radius: 10px; background: #f1f5ea; color: var(--nt-green); text-align: left; }
	.nt-meal-row .nt-row-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; gap: 6px; }
	.nt-meal-row .nt-row-actions .nt-icon-button { width: 100%; min-width: 0; min-height: 42px; border: 1px solid var(--nt-line) !important; background: #fff; }
	.nt-template-library-row { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; gap: 12px; overflow: hidden; }
	.nt-template-library-row .nt-list-main { display: grid; grid-template-columns: 38px minmax(0, 1fr); width: 100%; }
	.nt-template-library-row .nt-list-main small { line-height: 1.55; overflow-wrap: anywhere; }
	.nt-template-library-row .nt-list-side { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; gap: 8px; align-items: stretch; justify-items: stretch; }
	.nt-template-library-row .nt-list-side { padding-left: 0; }
	.nt-template-library-row .nt-list-kcal { display: block; width: 100%; padding: 9px 11px; border-radius: 10px; background: #f1f5ea; color: var(--nt-green); text-align: left; }
	.nt-template-library-row .nt-template-macros { white-space: normal; }
	.nt-template-library-row .nt-row-actions { display: grid; grid-template-columns: minmax(92px, 1fr) repeat(2, minmax(44px, .5fr)); width: 100%; gap: 6px; }
	.nt-template-library-row .nt-row-actions button { width: 100%; min-width: 0; min-height: 42px; border: 1px solid var(--nt-line) !important; background: #fff; }
	.nt-draft-head { align-items: flex-start; flex-direction: column; }
	.nt-template-chip { max-width: 100%; }
	.nt-template-chip > button:first-child { min-width: 0; }
	.nt-top-actions { gap: 8px; }
	.nt-brand strong { font-size: 15px; }
	.nt-week-strip { gap: 14px 10px; }
	.nt-goal-period > summary { align-items: flex-start; flex-direction: column; gap: 10px; }
	.nt-goal-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 12px 12px; }
	.nt-goal-period > .nt-caption { margin: 0 12px 14px; }
	.nt-goal-lifecycle .nt-toolbar, .nt-goal-lifecycle .nt-toolbar > button { width: 100%; }
	.nt-goal-dates { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	.nt-panel, .nt-progress span, .nt-toast { animation: none; transition: none; }
}

/* Full-page app isolation: protects controls from late global theme/builder rules. */
.nt-app {
	--e-global-color-primary: var(--nt-green);
	--e-global-color-secondary: var(--nt-ink);
	--e-global-color-text: var(--nt-ink);
	--e-global-color-accent: var(--nt-green);
}
.nt-app button { box-shadow: none !important; text-shadow: none !important; }
.nt-app .nt-nav button, .nt-app .nt-primary, .nt-app .nt-button, .nt-app .nt-icon-button, .nt-app .nt-danger { border: 0 !important; outline-color: var(--nt-lime) !important; }
.nt-app .nt-secondary { border: 1px solid var(--nt-green) !important; }
@media (max-width: 782px) {
	.nt-app .nt-more-sheet, .nt-app .nt-more-sheet * { text-shadow: none !important; }
	.nt-app .nt-more-backdrop { border: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important; opacity: 1 !important; }
	.nt-app .nt-more-dialog { border: 0 !important; background: #fff !important; color: var(--nt-ink) !important; }
	.nt-app .nt-more-actions > button { border: 1px solid #8da096 !important; background: #fff !important; color: var(--nt-ink) !important; box-shadow: none !important; }
	.nt-app .nt-more-actions > button span:not(.nt-more-icon), .nt-app .nt-more-actions strong, .nt-app .nt-more-actions small { background: transparent !important; color: var(--nt-ink) !important; opacity: 1 !important; }
	.nt-app .nt-more-actions small { font-size: 13px !important; font-weight: 600 !important; }
	.nt-app .nt-more-icon { border: 2px solid var(--nt-green) !important; background: #fff !important; color: var(--nt-green) !important; box-shadow: none !important; }
	.nt-app .nt-more-close { border: 2px solid var(--nt-green) !important; background: #fff !important; color: var(--nt-green) !important; box-shadow: none !important; }
	.nt-app .nt-more-close svg { display: none !important; }
	.nt-app .nt-more-close::before, .nt-app .nt-more-close::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; margin: -1px 0 0 -9px; border: 0; border-radius: 2px; background: var(--nt-green); transform-origin: center; }
	.nt-app .nt-more-close::before { transform: rotate(45deg); }
	.nt-app .nt-more-close::after { transform: rotate(-45deg); }
}

/* Mobile width hardening: every section must fit before content is painted. */
@media (max-width: 782px) {
	html.nutrition-tracker-shell, html.nutrition-tracker-shell body, .nutrition-tracker-page, .nt-app { width: 100%; max-width: 100%; overflow-x: clip; -webkit-text-size-adjust: 100%; }
	.nt-shell, .nt-main, .nt-panel, .nt-grid, .nt-card, .nt-card-head, .nt-form, .nt-fields, .nt-list, .nt-list-item, .nt-list-main, .nt-list-main > div, .nt-toolbar, .nt-target-field, .nt-item-builder, .nt-template-list, .nt-routine-activities, .nt-routine-activity { min-width: 0; max-width: 100%; }
	.nt-main, .nt-panel, .nt-card, .nt-form, .nt-list, .nt-list-item { width: 100%; }
	.nt-app h1, .nt-app h2, .nt-app p, .nt-app strong, .nt-app small, .nt-app label, .nt-app .nt-caption, .nt-app .nt-muted { max-width: 100%; overflow-wrap: anywhere; word-break: normal; }
	.nt-app button, .nt-app input, .nt-app select, .nt-app textarea, .nt-date-input, .nt-search { min-width: 0; max-width: 100%; }
	.nt-card-head { align-items: flex-start; flex-wrap: wrap; }
	.nt-card-head > * { min-width: 0; max-width: 100%; }
	.nt-toolbar { width: 100%; align-items: stretch; }
	.nt-toolbar > * { min-width: 0; max-width: 100%; white-space: normal; }
	.nt-list-item { flex-wrap: wrap; }
	.nt-list-item > div { min-width: 0; max-width: 100%; }
	.nt-list-main { width: 100%; align-items: flex-start; }
	.nt-list-main > div:last-child { min-width: 0; flex: 1 1 0; width: auto; max-width: 100%; }
	.nt-list-main strong { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
	.nt-list-main small, .nt-list-item > div:first-child small { white-space: normal; overflow-wrap: anywhere; }
	.nt-list-side { width: 100%; min-width: 0; flex: 1 1 100%; flex-direction: row; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
	.nt-row-actions { min-width: 0; max-width: 100%; flex-wrap: wrap; }
	.nt-target-field { grid-template-columns: minmax(0, 1fr); }
	.nt-macro { grid-template-columns: 37px minmax(0, 1fr); align-items: start; }
	.nt-macro-value { grid-column: 2; justify-self: start; max-width: 100%; overflow-wrap: anywhere; }
	.nt-week-item { min-width: 0; padding-right: 10px; }
	.nt-week-item strong, .nt-week-item small { overflow-wrap: anywhere; }
	.nt-kpi-row > div { min-width: min(90px, 100%); max-width: 100%; }
	.nt-chart { width: 100%; min-width: 0; overflow: hidden; }
	.nt-chart svg { max-width: 100%; overflow: hidden; }
	.nt-chart-labels { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px 12px; }
	.nt-chart-labels span { min-width: 0; overflow-wrap: anywhere; }
	.nt-chart-labels span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; text-align: center; }
	.nt-chart-labels span:last-child { text-align: right; }
	.nt-template-chip { min-width: 0; width: 100%; }
	.nt-template-chip > button:first-child { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
	.nt-token { max-width: 100%; overflow-wrap: anywhere; word-break: break-all; }
	.nt-more-dialog, .nt-more-actions, .nt-more-actions > button { min-width: 0; max-width: 100%; }
	.nt-more-actions > button > span:not(.nt-more-icon) { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
}

@media (max-width: 390px) {
	.nt-more-actions > button { grid-template-columns: 42px minmax(0, 1fr) 12px; gap: 10px; }
	.nt-more-icon { width: 42px; height: 42px; }
}
