:root {
	--fne-primary: #1F7A54;
	--fne-accent: #F5A623;
	--fne-bg: #F7F9F8;
	--fne-text: #1F2937;
	--fne-muted: #6B7280;
	--fne-border: #E5E7EB;
	--fne-green: #1F7A54;
	--fne-yellow: #B7791F;
	--fne-red: #B32D2E;
}

.fne-app {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--fne-text);
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
}

.fne-login-required {
	padding: 16px;
	background: var(--fne-bg);
	border-radius: 8px;
	text-align: center;
}

.fne-tabs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	margin-bottom: 16px;
	border-bottom: 1px solid var(--fne-border);
}

.fne-tab {
	padding: 8px 12px;
	white-space: nowrap;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	font-size: 14px;
}

.fne-tab.active {
	border-bottom-color: var(--fne-primary);
	color: var(--fne-primary);
	font-weight: 600;
}

.fne-card {
	background: #fff;
	border: 1px solid var(--fne-border);
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 12px;
}

.fne-member-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 999px;
	background: var(--fne-bg);
	border: 1px solid var(--fne-border);
	cursor: pointer;
	margin: 0 6px 6px 0;
	font-size: 14px;
}

.fne-member-chip.active {
	background: var(--fne-primary);
	color: #fff;
	border-color: var(--fne-primary);
}

.fne-progress {
	background: var(--fne-border);
	border-radius: 999px;
	height: 8px;
	overflow: hidden;
	margin: 6px 0;
}

.fne-progress-bar {
	height: 100%;
	background: var(--fne-primary);
	transition: width 0.3s ease;
}

.fne-progress-bar.status-low { background: var(--fne-yellow); }
.fne-progress-bar.status-high,
.fne-progress-bar.status-over_limit { background: var(--fne-red); }
.fne-progress-bar.status-ok,
.fne-progress-bar.status-within_range,
.fne-progress-bar.status-within_limit { background: var(--fne-green); }

.fne-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 0;
	border-bottom: 1px solid var(--fne-border);
	font-size: 14px;
}

.fne-row:last-child { border-bottom: none; }

.fne-status-label {
	font-size: 12px;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--fne-bg);
}

.fne-btn {
	background: var(--fne-primary);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 10px 16px;
	font-size: 14px;
	cursor: pointer;
}

.fne-btn.secondary {
	background: #fff;
	color: var(--fne-primary);
	border: 1px solid var(--fne-primary);
}

.fne-btn.danger {
	background: var(--fne-red);
}

.fne-input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid var(--fne-border);
	border-radius: 8px;
	font-size: 14px;
	box-sizing: border-box;
}

.fne-form-group { margin-bottom: 12px; }
.fne-form-group label { display: block; font-size: 13px; margin-bottom: 4px; color: var(--fne-muted); }

.fne-section-title { font-size: 16px; font-weight: 600; margin: 16px 0 8px; }

.fne-empty-state {
	padding: 24px 16px;
	text-align: center;
	color: var(--fne-muted);
	background: var(--fne-bg);
	border-radius: 12px;
}

.fne-search-results { max-height: 260px; overflow-y: auto; }

.fne-search-result-item {
	padding: 8px;
	border-bottom: 1px solid var(--fne-border);
	cursor: pointer;
}

.fne-search-result-item:hover { background: var(--fne-bg); }

.fne-family-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fne-family-table th, .fne-family-table td { padding: 6px; border-bottom: 1px solid var(--fne-border); text-align: center; }
.fne-family-table th:first-child, .fne-family-table td:first-child { text-align: left; }

.fne-disclaimer {
	font-size: 11px;
	color: var(--fne-muted);
	margin-top: 8px;
	padding: 8px;
	background: var(--fne-bg);
	border-radius: 8px;
}

@media (max-width: 480px) {
	.fne-app { padding: 0 8px; }
}

/* ==================== TRANG KHÁCH (Guest Calculator) ==================== */

.fne-guest {
	width: 100%;
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
}

.fne-guest-hero {
	text-align: center;
	padding: 24px 16px 8px;
}

.fne-guest-hero h1 {
	font-size: 24px;
	font-weight: 700;
	color: var(--fne-primary);
	margin: 0 0 8px;
}

.fne-guest-hero p {
	color: var(--fne-muted);
	font-size: 14px;
	max-width: 480px;
	margin: 0 auto;
}

.fne-guest-form {
	background: #fff;
	border: 1px solid var(--fne-border);
	border-radius: 16px;
	padding: 24px;
	margin: 20px 0;
}

.fne-guest-form-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 480px) {
	.fne-guest-form-grid { grid-template-columns: 1fr; }
}

.fne-guest-submit {
	width: 100%;
	margin-top: 8px;
	padding: 14px;
	font-size: 16px;
	font-weight: 600;
	border-radius: 10px;
}

.fne-hero-stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin: 20px 0;
}

@media (max-width: 640px) {
	.fne-hero-stats { grid-template-columns: repeat(2, 1fr); }
}

.fne-hero-stat {
	background: linear-gradient(180deg, #ffffff 0%, var(--fne-bg) 100%);
	border: 1px solid var(--fne-border);
	border-radius: 14px;
	padding: 16px 12px;
	text-align: center;
}

.fne-hero-stat .value {
	font-size: 22px;
	font-weight: 700;
	color: var(--fne-primary);
	line-height: 1.2;
}

.fne-hero-stat .label {
	font-size: 12px;
	color: var(--fne-muted);
	margin-top: 4px;
}

.fne-guest-section {
	margin: 28px 0 12px;
}

.fne-guest-section h2 {
	font-size: 17px;
	font-weight: 700;
	margin-bottom: 4px;
}

.fne-guest-section .fne-section-sub {
	font-size: 13px;
	color: var(--fne-muted);
	margin-bottom: 12px;
}

.fne-guest-profile-summary {
	font-size: 14px;
	font-weight: 600;
	color: var(--fne-text);
	background: var(--fne-bg);
	border-radius: 10px;
	padding: 10px 14px;
	margin-bottom: 14px;
	line-height: 1.5;
}

@media (max-width: 420px) {
	.fne-guest-profile-summary {
		font-size: 13px;
	}
}

/* ==================== HERO CARD V2 - Trang Khách (Phần A) ==================== */

.fne-hero-stats-v2 {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin: 16px 0;
}

@media (min-width: 640px) {
	.fne-hero-stats-v2 { grid-template-columns: repeat(4, 1fr); }
}

.fne-hero-stat-v2 {
	background: linear-gradient(180deg, #ffffff 0%, var(--fne-bg) 100%);
	border: 1px solid var(--fne-border);
	border-radius: 14px;
	padding: 14px 12px;
}

.fne-hero-stat-v2 .value {
	font-size: 19px;
	font-weight: 700;
	color: var(--fne-primary);
	line-height: 1.2;
}

.fne-hero-stat-v2 .label {
	font-size: 11px;
	color: var(--fne-muted);
	margin-top: 4px;
	line-height: 1.35;
}

.fne-hero-note {
	font-size: 10px;
	color: var(--fne-muted);
	margin-top: 6px;
	line-height: 1.3;
}

.fne-hero-badge {
	display: inline-block;
	margin-top: 8px;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 9px;
	border-radius: 999px;
	line-height: 1.4;
}

.fne-hero-badge-green { background: #e6f6ec; color: #1a7a3d; }
.fne-hero-badge-blue { background: #e7f0fb; color: #1a56a8; }
.fne-hero-badge-orange { background: #fdf1de; color: #a15c07; }
.fne-hero-badge-red { background: #fce8e8; color: #b3261e; }
.fne-hero-badge-neutral { background: var(--fne-bg); color: var(--fne-muted); font-weight: 500; white-space: normal; text-align: left; }

.fne-nutrient-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

@media (max-width: 480px) {
	.fne-nutrient-grid { grid-template-columns: 1fr; }
}

.fne-nutrient-card {
	background: #fff;
	border: 1px solid var(--fne-border);
	border-radius: 10px;
	padding: 12px 14px;
}

.fne-nutrient-card .name {
	font-size: 13px;
	font-weight: 600;
}

.fne-nutrient-card .value {
	font-size: 15px;
	color: var(--fne-primary);
	margin-top: 2px;
}

.fne-nutrient-card .value.unavailable {
	color: var(--fne-muted);
	font-size: 12px;
	font-style: italic;
}

/* ==================== MACRO CARD 3 TẦNG (Phần A) ==================== */

.fne-macro-intro {
	font-size: 12px;
	color: var(--fne-muted);
	margin-bottom: 12px;
	line-height: 1.5;
}

.fne-macro-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

@media (max-width: 480px) {
	/* v1.5.17: giữ bố cục desktop thu gọn thành 2 cột x nhiều hàng trên mobile. */
	.fne-macro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.fne-macro-card { padding: 11px 10px; }
	.fne-macro-card-name { font-size: 12px; line-height: 1.35; }
	.fne-macro-card-value { font-size: 15px; }
	.fne-macro-card-explain { font-size: 10px; line-height: 1.35; }
}

@media (max-width: 340px) {
	.fne-macro-grid { grid-template-columns: 1fr; }
}

.fne-macro-card {
	background: #fff;
	border: 1px solid var(--fne-border);
	border-radius: 10px;
	padding: 14px 16px;
}

.fne-macro-card-name {
	font-size: 13px;
	font-weight: 600;
	color: var(--fne-text);
}

.fne-macro-card-value {
	font-size: 17px;
	font-weight: 700;
	color: var(--fne-primary);
	margin-top: 4px;
}

.fne-macro-card-value.unavailable {
	font-size: 13px;
	font-weight: 600;
	color: var(--fne-muted);
}

.fne-macro-card-conversion {
	font-size: 13px;
	color: var(--fne-text);
	margin-top: 2px;
}

.fne-macro-card-explain {
	font-size: 11px;
	color: var(--fne-muted);
	margin-top: 6px;
	line-height: 1.4;
}

.fne-cta-banner {
	background: linear-gradient(135deg, var(--fne-primary) 0%, #14532d 100%);
	color: #fff;
	border-radius: 16px;
	padding: 28px 20px;
	text-align: center;
	margin: 32px 0;
}

.fne-cta-banner h2 {
	font-size: 19px;
	margin: 0 0 8px;
}

.fne-cta-banner p {
	font-size: 14px;
	opacity: 0.92;
	max-width: 460px;
	margin: 0 auto 18px;
}

.fne-cta-buttons {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

.fne-cta-buttons a {
	padding: 12px 22px;
	border-radius: 10px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
}

.fne-cta-primary {
	background: #fff;
	color: var(--fne-primary);
}

.fne-cta-secondary {
	background: transparent;
	color: #fff;
	border: 1px solid rgba(255,255,255,0.6);
}

.fne-content-discovery {
	max-width: 780px;
	margin: 32px auto 0;
	padding: 0 8px;
}

.fne-content-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin-top: 12px;
}

@media (max-width: 640px) {
	.fne-content-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
	.fne-content-grid { grid-template-columns: 1fr; }
}

.fne-content-card {
	display: block;
	text-decoration: none;
	color: var(--fne-text);
	border: 1px solid var(--fne-border);
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
}

.fne-content-thumb img {
	width: 100%;
	height: 110px;
	object-fit: cover;
	display: block;
}

.fne-content-title {
	padding: 10px 12px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

/* ==================== MODAL ==================== */

.fne-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 16px;
}

.fne-modal {
	background: #fff;
	border-radius: 14px;
	max-width: 480px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.fne-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--fne-border);
	position: sticky;
	top: 0;
	background: #fff;
}

.fne-modal-header h3 {
	margin: 0;
	font-size: 16px;
}

.fne-modal-close {
	background: none;
	border: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: var(--fne-muted);
	padding: 4px 8px;
}

.fne-modal-body {
	padding: 16px 20px 20px;
}

.fne-modal-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top: 16px;
}

@media (max-width: 480px) {
	.fne-modal { max-width: 100%; border-radius: 14px 14px 0 0; align-self: flex-end; margin-top: auto; }
	.fne-modal-overlay { align-items: flex-end; padding: 0; }
	.fne-modal-actions { flex-direction: column-reverse; }
	.fne-modal-actions .fne-btn { width: 100%; }
}

/* ==================== MEMBER CARDS ==================== */

.fne-member-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

@media (max-width: 560px) {
	.fne-member-grid { grid-template-columns: 1fr; }
}

.fne-member-card {
	background: #fff;
	border: 1px solid var(--fne-border);
	border-radius: 14px;
	padding: 16px;
}

.fne-member-card-top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px;
}

.fne-member-card-name {
	font-size: 16px;
	font-weight: 700;
}

.fne-member-card-sub {
	font-size: 12px;
	color: var(--fne-muted);
	margin-top: 2px;
}

.fne-member-card-stats {
	margin-top: 12px;
	font-size: 13px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	color: var(--fne-text);
}

/* ==================== APP SHELL (Khu vực Dinh dưỡng Gia đình) ==================== */

.fne-shell {
	max-width: 760px;
}

.fne-shell-nav {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	border-bottom: 1px solid var(--fne-border);
	margin-bottom: 16px;
	position: sticky;
	top: 0;
	background: #fff;
	z-index: 10;
	padding-top: 4px;
}

.fne-shell-tab {
	background: none;
	border: none;
	padding: 10px 14px;
	font-size: 14px;
	white-space: nowrap;
	cursor: pointer;
	color: var(--fne-muted);
	border-bottom: 2px solid transparent;
}

.fne-shell-tab.active {
	color: var(--fne-primary);
	font-weight: 700;
	border-bottom-color: var(--fne-primary);
}

.fne-shell-content {
	min-height: 200px;
}

.fne-nutrient-table-row {
	padding: 10px 0;
	border-bottom: 1px solid var(--fne-border);
}

.fne-nutrient-table-row:last-child { border-bottom: none; }

.fne-nutrient-table-top {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
}

.fne-nutrient-table-name {
	font-weight: 600;
	font-size: 14px;
}

.fne-nutrient-table-meta {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: var(--fne-muted);
	margin-top: 2px;
}

.fne-hero-stat-note {
	font-size: 10px;
	color: var(--fne-muted);
	margin-top: 4px;
	line-height: 1.3;
}

/* ==================== BẢNG COMPACT VITAMIN/KHOÁNG (mục 8/9) ==================== */

.fne-compact-table-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 4px;
}

.fne-compact-table-header h2 {
	margin-bottom: 0;
}

.fne-compact-table-header-label {
	font-size: 11px;
	font-weight: 600;
	color: var(--fne-muted);
	white-space: nowrap;
}

.fne-compact-table {
	padding: 4px 16px;
}

.fne-compact-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 9px 0;
	border-bottom: 1px solid var(--fne-border);
	font-size: 13px;
}

.fne-compact-row:last-child {
	border-bottom: none;
}

.fne-compact-name {
	color: var(--fne-text);
	flex: 0 0 31%;
	min-width: 0;
}

.fne-compact-value {
	font-weight: 600;
	color: var(--fne-primary);
	flex: 1 1 auto;
	min-width: 0;
	text-align: right;
	overflow-wrap: anywhere;
}

.fne-iron-reference-line {
	display: block;
	line-height: 1.45;
}

.fne-compact-value.unavailable {
	font-weight: 400;
	color: var(--fne-muted);
	font-size: 12px;
	font-style: italic;
}

/* ==================== DRAFT/BATCH MEAL ENTRY (mục E1) ==================== */

.fne-row-draft {
	background: #FFF8E1;
	border-radius: 8px;
	padding: 6px 8px;
	margin: 2px 0;
}

.fne-draft-badge {
	display: inline-block;
	margin-left: 8px;
	font-size: 10px;
	padding: 1px 6px;
	border-radius: 999px;
	background: var(--fne-accent);
	color: #fff;
	vertical-align: middle;
}

.fne-save-bar {
	position: sticky;
	bottom: 0;
	background: #fff;
	border-top: 1px solid var(--fne-border);
	padding: 10px 12px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	margin-top: 16px;
	border-radius: 10px 10px 0 0;
	box-shadow: 0 -4px 12px rgba(0,0,0,0.06);
}

.fne-empty-state-inline {
	padding: 6px 0;
}

/* ==================== FOOD SUGGESTION (mục H1/H2) ==================== */

.fne-suggestion-block {
	margin: 6px 0 16px;
}

.fne-suggestion-row {
	border-bottom: 1px solid var(--fne-border);
	padding: 8px 0;
}

.fne-suggestion-row:last-child { border-bottom: none; }

.fne-suggestion-summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
}

.fne-suggestion-name {
	font-size: 13px;
	font-weight: 600;
}

.fne-suggestion-density {
	font-size: 12px;
	color: var(--fne-muted);
	margin-top: 2px;
}

/* ==================== TỔNG QUAN (mục C) ==================== */

.fne-profile-line {
	font-size: 15px;
	font-weight: 600;
}

.fne-profile-status {
	display: inline-block;
	margin-top: 6px;
	margin-right: 6px;
	font-size: 12px;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--fne-bg);
	color: var(--fne-primary);
}

.fne-overview-cta-row {
	display: flex;
	gap: 10px;
	margin: 16px 0;
}

.fne-overview-cta-row .fne-btn {
	flex: 1;
}

@media (max-width: 420px) {
	.fne-overview-cta-row { flex-direction: column; }
}

.fne-week-attention-item {
	font-size: 13px;
	padding: 4px 0;
	line-height: 1.5;
}

.fne-consultation-cta {
	text-align: center;
}

.fne-consultation-question {
	font-size: 15px;
	font-weight: 600;
}

.fne-dob-picker {
	display: grid;
	grid-template-columns: 1fr 1.3fr 1fr;
	gap: 6px;
}

/* ==================== AUTH CARD (mục M) ==================== */

.fne-auth-card-wrap {
	display: flex;
	justify-content: center;
	padding: 32px 16px;
}

.fne-auth-card {
	background: #fff;
	border: 1px solid var(--fne-border);
	border-radius: 16px;
	padding: 32px 28px;
	max-width: 380px;
	width: 100%;
	text-align: center;
}

.fne-auth-card h2 {
	font-size: 19px;
	color: var(--fne-primary);
	margin: 0 0 10px;
}

.fne-auth-card p {
	font-size: 13px;
	color: var(--fne-muted);
	margin: 0 0 20px;
}

.fne-auth-buttons {
	display: flex;
	gap: 10px;
}

.fne-auth-buttons .fne-btn {
	flex: 1;
	text-decoration: none;
	display: inline-block;
	text-align: center;
}

.fne-auth-lost {
	display: inline-block;
	margin-top: 16px;
	font-size: 12px;
	color: var(--fne-muted);
	text-decoration: underline;
}

@media (max-width: 480px) {
	.fne-shell-nav {
		gap: 0;
	}
	.fne-shell-tab {
		padding: 10px 10px;
		font-size: 13px;
	}
}


/* ==================== WHO GROWTH CARDS 0–5 (v1.5.14.2) ==================== */
.fne-growth-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-top: 14px;
}

.fne-growth-card {
	margin: 0;
	min-width: 0;
}

.fne-growth-card .fne-suggestion-name {
	font-size: 13px;
	line-height: 1.35;
	min-height: 36px;
}

.fne-growth-card .value {
	font-size: 19px;
	font-weight: 700;
	color: var(--fne-primary);
}

.fne-growth-badge {
	font-weight: 600;
	white-space: normal;
	text-align: center;
}
.fne-growth-badge-green { background: #e6f6ec; color: #1a7a3d; }
.fne-growth-badge-orange { background: #fdf1de; color: #a15c07; }
.fne-growth-badge-red { background: #fce8e8; color: #b3261e; }

@media (max-width: 900px) {
	.fne-growth-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
	/* v1.5.17: 4 thẻ tăng trưởng = 2 cột x 2 hàng, không kéo thành 4 thẻ dọc. */
	.fne-growth-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
	.fne-growth-card { padding: 11px 10px; }
	.fne-growth-card .fne-suggestion-name { font-size: 12px; line-height: 1.3; min-height: 31px; }
	.fne-growth-card .value { font-size: 17px; }
	.fne-growth-card .fne-btn.secondary { padding: 4px 8px !important; font-size: 10px !important; }
	.fne-growth-badge { font-size: 10px; padding: 2px 7px; }
}

@media (max-width: 340px) {
	.fne-growth-grid { grid-template-columns: 1fr; }
}

/* v1.5.17: compact nutrient rows on small screens. */
@media (max-width: 480px) {
	.fne-compact-table { padding: 2px 12px; }
	.fne-compact-row { align-items: flex-start; gap: 8px; padding: 8px 0; font-size: 12px; }
	.fne-compact-name { flex-basis: 28%; }
	.fne-compact-value { line-height: 1.4; }
	.fne-compact-value.unavailable { font-size: 11px; }
}

/* ==================== v1.5.21 — Guest Medical UI final polish ==================== */
.fne-guest-section {
	margin: 34px 0 16px;
}

.fne-guest-section h2 {
	font-size: 20px;
	line-height: 1.3;
	font-weight: 750;
	letter-spacing: -0.01em;
	color: #0f3554;
	margin: 0 0 7px;
}

.fne-guest-section .fne-section-sub {
	font-size: 13px;
	line-height: 1.5;
	color: #66788a;
	margin-bottom: 13px;
}

/* Luôn nổi bật hồ sơ người dùng — không chỉ ở thai kỳ. */
.fne-guest-profile-summary {
	position: relative;
	font-size: 15px;
	font-weight: 700;
	color: #12385b;
	background: linear-gradient(90deg, #f1f8fc 0%, #f8fbfd 100%);
	border: 1px solid #cfe2ee;
	border-left: 4px solid #1e7898;
	border-radius: 12px;
	padding: 13px 16px;
	margin-bottom: 14px;
	line-height: 1.55;
	box-shadow: 0 2px 10px rgba(18, 56, 91, 0.045);
}

.fne-physiology-note {
	margin-top: 10px !important;
	padding: 12px 15px !important;
	background: #fff9e9 !important;
	border: 1px solid #eedda6 !important;
	border-left: 4px solid #d3a62b !important;
	border-radius: 11px !important;
	color: #5f522b !important;
	font-size: 13px !important;
	line-height: 1.55 !important;
	text-align: left !important;
}

/* 4 chỉ số người lớn: cùng chiều cao, sáng và gọn. */
.fne-hero-stats-v2 {
	gap: 13px;
	margin: 17px 0 4px;
}

.fne-hero-stat-v2 {
	background: #fff;
	border: 1px solid #dce6ed;
	border-radius: 14px;
	padding: 17px 15px;
	min-height: 132px;
	box-shadow: 0 3px 14px rgba(18, 56, 91, 0.045);
}

.fne-hero-stat-v2 .value {
	font-size: 22px;
	letter-spacing: -0.02em;
}

.fne-hero-stat-v2 .label {
	font-size: 12px;
	line-height: 1.4;
}

.fne-hero-note {
	font-size: 11px;
	line-height: 1.4;
}

/* Macro: y khoa, dễ quét mắt; nguồn đi ngay cạnh giá trị. */
.fne-macro-intro {
	font-size: 13px;
	line-height: 1.55;
	color: #66788a;
	margin-bottom: 14px;
}

.fne-macro-grid {
	gap: 12px;
}

.fne-macro-card {
	border: 1px solid #dce6ed;
	border-radius: 12px;
	padding: 16px 18px;
	min-height: 128px;
	box-shadow: 0 2px 10px rgba(18, 56, 91, 0.035);
}

.fne-macro-card-name {
	font-size: 14px;
	line-height: 1.4;
	font-weight: 700;
	color: #17324a;
}

.fne-macro-card-value {
	font-size: 20px;
	line-height: 1.3;
	margin-top: 7px;
}

.fne-macro-card-conversion {
	font-size: 14px;
	font-weight: 650;
	color: #1e6f54;
	margin-top: 4px;
}

.fne-macro-card-explain {
	font-size: 12px;
	line-height: 1.5;
	margin-top: 8px;
}

/* Vitamin / khoáng: list phẳng, divider nhẹ, không tạo cảm giác nhiều card. */
.fne-compact-table {
	border-color: #dce6ed;
	border-radius: 13px;
	overflow: hidden;
	background: #fff;
}

.fne-compact-row {
	min-height: 46px;
	padding-top: 10px;
	padding-bottom: 10px;
	border-color: #e8eef2;
}

.fne-compact-name {
	font-size: 14px;
	color: #1d3449;
}

.fne-compact-value {
	font-size: 14px;
	font-weight: 650;
	line-height: 1.45;
}

.fne-iron-reference-line {
	line-height: 1.5;
}

/* Growth cards: compact hơn nhưng vẫn rõ badge/status. */
.fne-growth-grid {
	gap: 12px;
}

.fne-growth-card {
	border-color: #dce6ed;
	border-radius: 13px;
	padding: 14px 15px;
	box-shadow: 0 2px 10px rgba(18, 56, 91, 0.035);
}

.fne-growth-card .fne-btn.secondary {
	min-height: 34px;
	padding: 6px 11px !important;
	border-radius: 8px;
}

/* CTA cuối trang: thấp hơn, gọn hơn, vẫn tách section rõ. */
.fne-cta-banner {
	border-radius: 15px;
	padding: 22px 20px;
	margin: 34px 0 18px;
	box-shadow: 0 5px 18px rgba(15, 53, 84, 0.08);
}

.fne-cta-banner h2 {
	font-size: 18px;
}

@media (max-width: 767px) {
	.fne-guest-section { margin: 26px 0 14px; }
	.fne-guest-section h2 { font-size: 19px; }
	.fne-guest-profile-summary {
		font-size: 14px;
		padding: 12px 13px;
		line-height: 1.6;
	}
	.fne-hero-stats-v2 { gap: 9px; }
	.fne-hero-stat-v2 {
		padding: 13px 11px;
		min-height: 116px;
	}
	.fne-hero-stat-v2 .value { font-size: 19px; }
	.fne-macro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
	.fne-macro-card {
		padding: 12px 11px;
		min-height: 118px;
	}
	.fne-macro-card-name { font-size: 12px; }
	.fne-macro-card-value { font-size: 16px; }
	.fne-macro-card-conversion { font-size: 12px; }
	.fne-macro-card-explain { font-size: 10.5px; }
	.fne-growth-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
	.fne-growth-card { padding: 12px 11px; }
	.fne-compact-row { min-height: 48px; }
	.fne-compact-value { max-width: 62%; }
}

@media (max-width: 420px) {
	.fne-macro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fne-compact-row {
		align-items: flex-start;
		gap: 10px;
	}
	.fne-compact-name { flex: 0 0 34%; }
	.fne-compact-value { max-width: 66%; }
}

@media (max-width: 340px) {
	.fne-macro-grid { grid-template-columns: 1fr; }
}


/* ==================== v1.5.22: Medical Support + Member CTA ==================== */
.fne-support-cta,
.fne-member-cta {
	border-radius: 15px;
	margin: 18px 0;
	padding: 22px 24px;
	box-shadow: 0 5px 18px rgba(15, 53, 84, 0.055);
}

.fne-support-cta {
	background: #f2f8fc;
	border: 1px solid #cfe2ef;
	border-left: 4px solid #1976b9;
	text-align: left;
}

.fne-support-cta h2,
.fne-member-cta h2 {
	margin: 0 0 9px;
	font-size: 18px;
	line-height: 1.35;
	color: #12385b;
}

.fne-support-cta p,
.fne-member-cta-desc {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.65;
	color: #52677b;
}

.fne-zalo-consult-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 9px 20px;
	border-radius: 9px;
	background: #0b75c9;
	color: #fff !important;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	box-shadow: 0 4px 12px rgba(11, 117, 201, 0.16);
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.fne-zalo-consult-btn:hover,
.fne-zalo-consult-btn:focus {
	background: #075fa5;
	box-shadow: 0 6px 16px rgba(11, 117, 201, 0.22);
	transform: translateY(-1px);
}

.fne-member-cta {
	background: #fff;
	border: 1px solid #d9e5ec;
	text-align: left;
}

.fne-member-cta-actions {
	display: grid;
	gap: 10px;
	margin-top: 4px;
}

.fne-member-cta-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 11px 12px;
	border-radius: 10px;
	background: #f8fafb;
	border: 1px solid #e7eef2;
}

.fne-member-cta-label {
	font-size: 14px;
	font-weight: 600;
	color: #334b5f;
}

.fne-member-login-btn,
.fne-member-register-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 104px;
	min-height: 38px;
	padding: 7px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
}

.fne-member-login-btn {
	background: #1f7a54;
	border: 1px solid #1f7a54;
	color: #fff !important;
}

.fne-member-register-btn {
	background: #fff;
	border: 1px solid #1f7a54;
	color: #166440 !important;
}

.fne-member-login-btn:hover,
.fne-member-login-btn:focus {
	background: #176443;
}

.fne-member-register-btn:hover,
.fne-member-register-btn:focus {
	background: #edf8f2;
}

@media (max-width: 640px) {
	.fne-support-cta,
	.fne-member-cta {
		padding: 18px 16px;
		margin: 16px 0;
	}
	.fne-support-cta h2,
	.fne-member-cta h2 {
		font-size: 17px;
	}
	.fne-support-cta p,
	.fne-member-cta-desc {
		font-size: 13px;
	}
	.fne-zalo-consult-btn {
		width: 100%;
	}
	.fne-member-cta-row {
		align-items: stretch;
		flex-direction: column;
		gap: 8px;
	}
	.fne-member-login-btn,
	.fne-member-register-btn {
		width: 100%;
	}
}


/* ==================== v1.5.23: Source legend ==================== */
.fne-source-legend {
	margin: 10px 0 20px;
	padding: 0 2px;
	font-size: 12.5px;
	line-height: 1.6;
	color: #6a7d8d;
}
.fne-source-legend strong {
	color: #4b6173;
	font-weight: 700;
}
@media (max-width: 640px) {
	.fne-source-legend {
		font-size: 12px;
		margin-bottom: 18px;
	}
}

/* ==================== v1.5.24: Frontend Auth ==================== */
.fne-auth-page-wrap {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 36px 16px;
}
.fne-auth-page-card {
	width: 100%;
	max-width: 470px;
	background: #fff;
	border: 1px solid var(--fne-border, #dfe7e3);
	border-radius: 20px;
	box-shadow: 0 14px 40px rgba(31, 62, 50, .08);
	padding: 34px 32px;
}
.fne-auth-brand { text-align: center; margin-bottom: 22px; }
.fne-auth-logo { max-height: 52px; max-width: 180px; object-fit: contain; margin: 0 auto 10px; }
.fne-auth-eyebrow { color: var(--fne-primary, #1f7a54); font-size: 13px; font-weight: 800; letter-spacing: .03em; margin-bottom: 6px; }
.fne-auth-brand h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.25; color: #173b2e; }
.fne-auth-brand p { margin: 0; color: #667a71; font-size: 14px; line-height: 1.55; }
.fne-auth-form { display: grid; gap: 9px; }
.fne-auth-form > label { font-size: 13px; font-weight: 700; color: #29483c; margin-top: 4px; }
.fne-auth-input {
	width: 100%; box-sizing: border-box; min-height: 46px; border: 1px solid #cad8d1;
	border-radius: 10px; padding: 10px 12px; font-size: 15px; background: #fff; color: #18362b;
}
.fne-auth-input:focus { outline: none; border-color: var(--fne-primary, #1f7a54); box-shadow: 0 0 0 3px rgba(31,122,84,.10); }
.fne-auth-password-wrap { position: relative; }
.fne-auth-password-wrap .fne-auth-input { padding-right: 46px; }
.fne-auth-password-toggle { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; cursor: pointer; padding: 8px; }
.fne-auth-form-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 5px 0 7px; font-size: 13px; }
.fne-auth-form-row a, .fne-auth-switch a { color: var(--fne-primary, #1f7a54); font-weight: 700; text-decoration: none; }
.fne-auth-remember { display: inline-flex; align-items: center; gap: 6px; color: #53675e; }
.fne-auth-submit { width: 100%; min-height: 48px; font-size: 15px; font-weight: 800; border-radius: 10px; }
.fne-auth-switch { margin-top: 20px; padding-top: 18px; border-top: 1px solid #edf1ef; text-align: center; font-size: 14px; color: #5e7068; }
.fne-auth-security { margin-top: 16px; text-align: center; font-size: 11.5px; line-height: 1.5; color: #85958e; }
.fne-auth-optional { font-weight: 500; color: #7a8b83; }
.fne-auth-field-help { margin-top: -4px; color: #7a8b83; font-size: 11.5px; line-height: 1.4; }
.fne-auth-consent { display: flex !important; align-items: flex-start; gap: 8px; margin: 8px 0 4px !important; font-weight: 500 !important; color: #53675e !important; line-height: 1.45; }
.fne-auth-consent input { flex: 0 0 auto; margin-top: 2px; }
.fne-auth-consent a { color: var(--fne-primary, #1f7a54); font-weight: 700; text-decoration: none; }
.fne-auth-consent a:hover { text-decoration: underline; }
.fne-auth-notice { margin: 0 0 16px; border-radius: 10px; padding: 11px 12px; font-size: 13px; line-height: 1.45; }
.fne-auth-notice.error { background: #fff2f2; border: 1px solid #f1cccc; color: #8a3030; }
.fne-auth-notice.success { background: #eff9f3; border: 1px solid #c9e7d4; color: #246842; }
@media (max-width: 520px) {
	.fne-auth-page-wrap { padding: 18px 10px; }
	.fne-auth-page-card { border-radius: 16px; padding: 26px 18px; }
	.fne-auth-brand h2 { font-size: 21px; }
	.fne-auth-form-row { align-items: flex-start; }
}

/* ==================== ONBOARDING HỒ SƠ ĐẦU TIÊN (v1.5.28) ==================== */
.fne-first-profile-onboarding {
	max-width: 760px;
	margin: 18px auto 8px;
	padding: 34px 34px 30px;
	border: 1px solid var(--fne-border);
	border-radius: 20px;
	background: #fff;
	text-align: center;
	box-shadow: 0 10px 28px rgba(18, 56, 91, 0.06);
}

.fne-onboarding-product {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	color: var(--fne-primary);
	margin-bottom: 8px;
}

.fne-first-profile-onboarding h2 {
	margin: 0;
	font-size: 26px;
	line-height: 1.25;
	color: var(--fne-text);
}


.fne-onboarding-tagline {
	margin: 8px auto 0;
	font-size: 14px;
	line-height: 1.5;
	font-weight: 600;
	color: var(--fne-muted);
}

.fne-first-profile-onboarding h3 {
	margin: 8px 0 0;
	font-size: 18px;
	line-height: 1.35;
	color: var(--fne-primary);
}

.fne-onboarding-intro {
	max-width: 620px;
	margin: 14px auto 24px;
	font-size: 14px;
	line-height: 1.65;
	color: var(--fne-muted);
}

.fne-onboarding-steps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin: 0 0 24px;
	text-align: left;
}

.fne-onboarding-step {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	min-width: 0;
	padding: 14px;
	border-radius: 14px;
	background: var(--fne-bg);
}

.fne-onboarding-step-number {
	flex: 0 0 28px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	background: var(--fne-primary);
}

.fne-onboarding-step-copy {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.fne-onboarding-step-copy strong {
	font-size: 13px;
	line-height: 1.35;
}

.fne-onboarding-step-copy span {
	font-size: 12px;
	line-height: 1.5;
	color: var(--fne-muted);
}

.fne-onboarding-primary {
	min-width: 260px;
	padding: 12px 22px;
	font-weight: 700;
}

.fne-onboarding-primary-top {
	margin-top: 18px;
	margin-bottom: 2px;
}

.fne-onboarding-note {
	margin: 12px 0 0;
	font-size: 12px;
	color: var(--fne-muted);
}


.fne-onboarding-trust {
	max-width: 650px;
	margin: 20px auto 0;
	padding-top: 18px;
	border-top: 1px solid var(--fne-border);
	font-size: 12px;
	line-height: 1.6;
	color: var(--fne-muted);
}

.fne-onboarding-trust strong {
	color: var(--fne-text);
}

@media (max-width: 700px) {
	.fne-first-profile-onboarding {
		margin-top: 12px;
		padding: 26px 18px 24px;
		border-radius: 16px;
	}
	.fne-first-profile-onboarding h2 { font-size: 22px; }
	
.fne-onboarding-tagline {
	margin: 8px auto 0;
	font-size: 14px;
	line-height: 1.5;
	font-weight: 600;
	color: var(--fne-muted);
}

.fne-first-profile-onboarding h3 { font-size: 16px; }
	.fne-onboarding-steps { grid-template-columns: 1fr; }
	.fne-onboarding-primary { width: 100%; min-width: 0; }
}


/* ==================== THỰC PHẨM — TRA CỨU & CHI TIẾT (v1.5.32) ==================== */
.fne-food-search-results {
	max-height: 900px;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-gutter: stable;
	padding-right: 4px;
}

/* Khi mở chi tiết, bỏ nested-scroll để trang web cuộn tự nhiên theo toàn bộ bảng. */
.fne-food-search-results.detail-open {
	max-height: none;
	overflow: visible;
	padding-right: 0;
}

.fne-food-search-row {
	padding: 10px 0;
}

.fne-food-suggestion-summary {
	min-height: 48px;
}

.fne-food-detail-link {
	flex: 0 0 auto;
	font-size: 12px;
	color: var(--fne-primary);
	text-align: right;
}

.fne-food-inline-detail {
	display: none;
	margin-top: 10px;
	padding: 12px 0 6px;
}

.fne-food-detail-meta {
	margin-bottom: 8px;
	font-size: 12px;
	color: var(--fne-muted);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

.fne-food-basis-toggle {
	appearance: none;
	border: 1px solid var(--fne-primary);
	background: #fff;
	color: var(--fne-primary);
	border-radius: 999px;
	padding: 5px 10px;
	font: inherit;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
}

.fne-food-basis-toggle:hover,
.fne-food-basis-toggle:focus {
	background: rgba(15, 118, 110, 0.06);
}

.fne-food-detail-heading {
	margin: 18px 0 8px;
	font-size: 15px;
	line-height: 1.35;
	color: var(--fne-text);
}

.fne-food-detail-card {
	padding: 6px 14px;
}

.fne-food-nutrient-row {
	gap: 14px;
}

.fne-food-nutrient-value {
	flex: 0 0 auto;
	text-align: right;
	white-space: nowrap;
}

@media (max-width: 640px) {
	.fne-food-search-results {
		max-height: 1200px;
	}

	.fne-food-search-results.detail-open {
		max-height: none;
	}

	.fne-food-suggestion-summary {
		align-items: flex-start;
	}

	.fne-food-detail-link {
		max-width: 130px;
		line-height: 1.35;
	}

	.fne-food-inline-detail {
		margin-left: 0;
		margin-right: 0;
	}

	.fne-food-detail-card {
		padding: 6px 10px;
	}

	.fne-food-nutrient-row {
		align-items: flex-start;
	}

	.fne-food-nutrient-row > span:first-child {
		padding-right: 8px;
	}
}

/* v1.5.31 — hard override cho tab THỰC PHẨM */
.fne-app .fne-food-search-results {
	max-height: 900px !important;
	overflow-y: auto !important;
}

.fne-app .fne-food-search-results.detail-open {
	max-height: none !important;
	overflow: visible !important;
}

@media (max-width: 640px) {
	.fne-app .fne-food-search-results {
		max-height: 1200px !important;
	}

	.fne-app .fne-food-search-results.detail-open {
		max-height: none !important;
		overflow: visible !important;
	}
}


/* v1.5.32 — làm rõ thực phẩm đang mở */
.fne-food-search-row.is-expanded {
	margin: 8px 0 14px;
	padding: 12px;
	border: 1px solid rgba(31, 133, 89, 0.24);
	border-radius: 16px;
	background: rgba(31, 133, 89, 0.055);
	box-shadow: 0 8px 22px rgba(18, 56, 91, 0.04);
}

.fne-food-search-row.is-expanded .fne-food-suggestion-summary {
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(31, 133, 89, 0.16);
}

.fne-food-search-row.is-expanded .fne-suggestion-name {
	color: var(--fne-primary);
	font-weight: 700;
}

.fne-food-detail-panel {
	margin-top: 12px;
	padding: 14px;
	border-radius: 14px;
	background: rgba(31, 133, 89, 0.035);
}

.fne-food-detail-active-header {
	margin-bottom: 10px;
	padding: 10px 12px;
	border-radius: 10px;
	background: rgba(31, 133, 89, 0.10);
	color: var(--fne-primary);
	font-size: 13px;
	line-height: 1.4;
}

.fne-food-detail-active-header strong {
	font-weight: 700;
}

@media (max-width: 640px) {
	.fne-food-search-row.is-expanded {
		padding: 10px;
	}

	.fne-food-detail-panel {
		padding: 10px;
	}
}


/* ==================== KHẨU PHẦN / SELECT (v1.5.33) ==================== */
.fne-app select,
.fne-app .fne-select {
	font-family: inherit !important;
	font-size: 16px !important;
	font-weight: 500 !important;
	line-height: 1.35 !important;
	color: var(--fne-text) !important;
	background-color: #fff !important;
	min-height: 46px;
	padding: 10px 40px 10px 12px;
	border: 1px solid var(--fne-border);
	border-radius: 10px;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	transform: none !important;
}

.fne-app select option {
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	color: var(--fne-text);
	background: #fff;
}


/* ==================== HÔM NAY — BỐ CỤC & NHẬN DIỆN BỮA ĂN (v1.5.35) ==================== */
.fne-today-body {
	margin-top: 18px;
}

.fne-today-summary {
	margin-bottom: 24px;
}

.fne-today-summary-card {
	padding: 8px 16px;
}

.fne-today-summary-item {
	padding: 13px 0;
	border-bottom: 1px solid var(--fne-border);
}

.fne-today-summary-item:last-child {
	border-bottom: 0;
}

.fne-today-summary-top,
.fne-today-summary-meta {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	align-items: center;
}

.fne-today-summary-meta {
	margin-top: 5px;
	font-size: 12px;
	color: var(--fne-muted);
}

.fne-today-meals {
	margin-top: 24px;
}

.fne-meal-section {
	margin: 0 0 22px;
	padding: 12px;
	border: 1px solid var(--fne-border);
	border-left-width: 5px;
	border-radius: 16px;
}

.fne-meal-breakfast {
	background: rgba(245, 180, 45, 0.07);
	border-color: rgba(210, 150, 30, 0.28);
}

.fne-meal-lunch {
	background: rgba(31, 133, 89, 0.055);
	border-color: rgba(31, 133, 89, 0.26);
}

.fne-meal-dinner {
	background: rgba(45, 95, 160, 0.055);
	border-color: rgba(45, 95, 160, 0.24);
}

.fne-meal-snack {
	background: rgba(120, 85, 160, 0.055);
	border-color: rgba(120, 85, 160, 0.22);
}

.fne-meal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin: 0 0 9px;
}

.fne-meal-title-wrap {
	display: flex;
	align-items: center;
	gap: 7px;
}

.fne-meal-icon {
	font-size: 18px;
	line-height: 1;
}

.fne-meal-title {
	margin: 0;
	font-size: 17px;
	color: var(--fne-text);
}

.fne-meal-subtotal {
	max-width: 58%;
	text-align: right;
	font-size: 12px;
	line-height: 1.45;
	color: var(--fne-muted);
}

.fne-meal-card {
	background: rgba(255, 255, 255, 0.92);
}

.fne-meal-item-row {
	padding: 9px 0;
}

.fne-today-micro-detail {
	margin-top: 30px;
}

.fne-today-micro-detail > .fne-guest-section {
	margin-top: 14px;
}

@media (max-width: 640px) {
	.fne-today-summary-card {
		padding: 6px 12px;
	}

	.fne-today-summary-top,
	.fne-today-summary-meta {
		align-items: flex-start;
	}

	.fne-today-summary-meta {
		flex-direction: column;
		gap: 2px;
	}

	.fne-meal-section {
		padding: 10px;
		margin-bottom: 18px;
	}

	.fne-meal-header {
		align-items: flex-start;
	}

	.fne-meal-subtotal {
		max-width: 56%;
	}

	.fne-meal-card {
		padding: 14px;
	}
}


/* ==================== HÔM NAY — FINAL COMPACT DASHBOARD (v1.5.36) ==================== */
.fne-today-summary-grid {
	display:grid;
	grid-template-columns:repeat(2,minmax(0,1fr));
	gap:10px;
}
.fne-today-macro-card {
	padding:13px 14px;
	min-width:0;
}
/* Năng lượng là chỉ số tổng quan chính: chiếm trọn một hàng nhưng compact hơn.
 * 4 chỉ số còn lại giữ lưới 2 cột: Protein | Carb, Fat | Chất xơ. */
.fne-today-macro-energy {
	grid-column:1 / -1;
	padding:9px 14px 10px;
}
.fne-today-macro-energy .fne-today-macro-name {
	margin-bottom:2px;
}
.fne-today-macro-energy .fne-today-macro-foot {
	margin:4px 0 4px;
}
.fne-today-macro-name {
	font-size:12px;
	font-weight:700;
	color:var(--fne-muted);
	margin-bottom:5px;
}
.fne-today-macro-value {
	display:flex;
	align-items:baseline;
	flex-wrap:wrap;
	gap:2px;
	font-size:11px;
	color:var(--fne-muted);
	line-height:1.35;
}
.fne-today-macro-value strong {
	font-size:18px;
	color:var(--fne-text);
}
.fne-today-macro-foot {
	margin:7px 0 6px;
}
.fne-today-status {
	display:inline-flex;
	align-items:center;
	padding:3px 7px;
	border-radius:999px;
	font-size:10px;
	font-weight:700;
	line-height:1.2;
	background:var(--fne-soft,#f4f6f8);
}
.fne-today-micro-group {
	margin-top:16px;
}
.fne-today-micro-title {
	margin:0 0 7px;
	font-size:15px;
}
.fne-today-micro-table {
	padding:0;
	overflow:hidden;
}
.fne-today-micro-head,
.fne-today-micro-row {
	display:grid;
	grid-template-columns:1.2fr 1.25fr .85fr .9fr;
	gap:8px;
	align-items:center;
}
.fne-today-micro-head {
	padding:9px 10px;
	background:#f6f8fa;
	border-bottom:1px solid var(--fne-border);
	font-size:10px;
	font-weight:700;
	color:var(--fne-muted);
}
.fne-today-micro-row {
	padding:10px;
	border-bottom:1px solid var(--fne-border);
	font-size:11px;
	line-height:1.35;
}
.fne-today-micro-row:last-child { border-bottom:0; }
.fne-today-micro-name { font-weight:700; color:var(--fne-text); }
.fne-today-micro-ref,
.fne-today-micro-intake { color:var(--fne-muted); }
.fne-today-micro-more {
	display:block;
	margin:7px auto 0;
	padding:5px 8px;
	border:0;
	background:transparent;
	color:var(--fne-primary);
	font:inherit;
	font-size:11px;
	font-weight:700;
	cursor:pointer;
}
@media (max-width:640px) {
	/* Giữ cấu trúc 1 + 2 + 2 trên mobile: Energy full-width, 4 macro chia 2 cột. */
	.fne-today-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
	.fne-today-macro-energy { grid-column:1 / -1; }
}

@media (max-width:420px) {
	.fne-today-macro-card { padding:11px 10px; }
	.fne-today-macro-value strong { font-size:16px; }
	.fne-today-micro-head,
	.fne-today-micro-row {
		grid-template-columns:1.05fr 1.2fr .8fr .85fr;
		gap:5px;
		padding-left:7px;
		padding-right:7px;
	}
	.fne-today-micro-head { font-size:9px; }
	.fne-today-micro-row { font-size:10px; }
	.fne-today-status { padding:3px 5px; font-size:9px; }
}


/* ==================== HÔM NAY — BADGE TRẠNG THÁI (v1.5.37) ==================== */
.fne-today-status-badge {
	display:inline-flex;
	align-items:center;
	gap:4px;
	padding:2px 6px;
	border-radius:999px;
	font-size:10px;
	font-weight:700;
	line-height:1.1;
	white-space:nowrap;
	border:1px solid transparent;
}

.fne-today-status-dot {
	width:6px;
	height:6px;
	border-radius:50%;
	flex:0 0 6px;
	background:currentColor;
}

.fne-today-status-badge.is-warning {
	color:#9a5a00;
	background:#fff5e6;
	border-color:#f0c36d;
}

.fne-today-status-badge.is-success {
	color:#18794e;
	background:#edf9f2;
	border-color:#9ad5b6;
}

.fne-today-status-badge.is-danger {
	color:#b42318;
	background:#fff0ef;
	border-color:#f3a29c;
}

@media (max-width:420px) {
	.fne-today-status-badge {
		font-size:9px;
		padding:3px 5px;
		gap:4px;
	}
	.fne-today-status-dot {
		width:6px;
		height:6px;
		flex-basis:6px;
	}
}


/* v1.5.38 — tăng độ đọc cho cột Khuyến nghị/ngày và Đã ăn */
.fne-today-micro-ref,
.fne-today-micro-intake {
	font-size: 12px;
	line-height: 1.4;
	color: var(--fne-text);
}

@media (min-width: 641px) {
	.fne-today-micro-ref,
	.fne-today-micro-intake {
		font-size: 13px;
	}
}

@media (max-width: 420px) {
	.fne-today-status-badge {
		font-size: 9px;
		padding: 2px 5px;
		gap: 3px;
	}
	.fne-today-status-dot {
		width: 5px;
		height: 5px;
		flex-basis: 5px;
	}
	.fne-today-micro-ref,
	.fne-today-micro-intake {
		font-size: 11px;
	}
}


/* ==================== HÔM NAY — COMPACT MEAL ENTRY (v1.5.40) ==================== */
/* Thu gọn nhịp dọc ở khu vực thêm thức ăn, không ảnh hưởng form ở tab khác. */
.fne-today-meals .fne-meal-section {
	margin-bottom:14px;
	padding:9px 10px;
}
.fne-today-meals .fne-meal-header {
	margin-bottom:6px;
}
.fne-today-meals .fne-meal-card {
	padding:10px 12px;
	margin-bottom:0;
}
.fne-today-meals .fne-meal-item-row {
	padding:6px 0;
}
.fne-today-meals .fne-add-food-form {
	margin-top:6px;
}
.fne-today-meals .fne-add-food-form .fne-input {
	padding:6px 9px;
	min-height:34px;
	line-height:1.25;
}
.fne-today-meals .fne-serving-picker {
	margin-top:4px;
	display:grid;
	gap:4px;
}
.fne-today-meals .fne-add-food-btn {
	margin-top:4px;
	padding:7px 12px;
	font-size:13px;
}
.fne-today-meals .fne-search-result-item {
	padding:6px 8px;
}
@media (max-width:640px) {
	.fne-today-meals .fne-meal-section {
		padding:8px;
		margin-bottom:12px;
	}
	.fne-today-meals .fne-meal-card {
		padding:9px 10px;
	}
}

/* ==================== HÔM NAY — 5 CARD VISUAL REFRESH (v1.5.41) ==================== */
.fne-today-summary {
	margin-top: 8px;
}

.fne-today-summary > .fne-section-title {
	margin-bottom: 14px;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: #102a43;
}

.fne-today-summary-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.fne-today-macro-card {
	--fne-card-accent: #1f6fc5;
	--fne-card-accent-soft: #eef5ff;
	position: relative;
	min-width: 0;
	padding: 20px 22px 18px;
	border: 1px solid #dfe6ee;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 2px 7px rgba(16, 42, 67, .08);
	overflow: hidden;
}

.fne-today-macro-energy {
	--fne-card-accent: #cb7a00;
	--fne-card-accent-soft: #fff5e7;
	grid-column: 1 / -1;
	padding: 16px 20px;
	display: grid;
	grid-template-columns: minmax(280px, .95fr) minmax(330px, 1.15fr);
	column-gap: 34px;
	align-items: center;
}

.fne-today-macro-protein {
	--fne-card-accent: #15875b;
	--fne-card-accent-soft: #eaf8f1;
}

.fne-today-macro-carb {
	--fne-card-accent: #1c68b8;
	--fne-card-accent-soft: #edf4ff;
}

.fne-today-macro-fat {
	--fne-card-accent: #1c68b8;
	--fne-card-accent-soft: #fff5df;
}

.fne-today-macro-fiber {
	--fne-card-accent: #c37a00;
	--fne-card-accent-soft: #f2efff;
}

.fne-today-macro-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
}

.fne-today-macro-identity {
	display: flex;
	align-items: center;
	min-width: 0;
	gap: 14px;
}

.fne-today-macro-icon {
	width: 58px;
	height: 58px;
	flex: 0 0 58px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	color: var(--fne-card-accent);
	background: var(--fne-card-accent-soft);
}

.fne-today-macro-icon svg {
	width: 31px;
	height: 31px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.9;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.fne-today-macro-copy {
	min-width: 0;
}

.fne-today-macro-name,
.fne-today-macro-energy .fne-today-macro-name {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 750;
	line-height: 1.25;
	color: #40546a;
}

.fne-today-macro-value {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 3px;
	font-size: 14px;
	line-height: 1.35;
	color: #60758a;
}

.fne-today-macro-value strong {
	font-size: 20px;
	line-height: 1.1;
	font-weight: 800;
	letter-spacing: -0.025em;
	color: #102a43;
}

.fne-today-status-badge {
	flex: 0 0 auto;
	padding: 6px 12px;
	border: 0;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.2;
}

.fne-today-status-badge.is-warning {
	color: #9a5a00;
	background: #fff2df;
}

.fne-today-status-badge.is-success {
	color: #13734c;
	background: #e8f7ef;
}

.fne-today-status-badge.is-danger {
	color: #a9342b;
	background: #fff0ef;
}

.fne-today-macro-progressline {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	margin-top: 18px;
}

.fne-today-macro-progressline .fne-progress {
	height: 9px;
	margin: 0;
	background: #e3e8ee;
	border-radius: 999px;
}

.fne-today-macro-progressline .fne-progress-bar {
	background: var(--fne-card-accent);
	border-radius: 999px;
}

.fne-today-macro-percent {
	min-width: 40px;
	font-size: 15px;
	font-weight: 800;
	text-align: right;
	color: var(--fne-card-accent);
}

.fne-today-macro-remaining {
	margin-top: 7px;
	font-size: 13px;
	line-height: 1.35;
	color: #6a7d90;
}

/* Energy: compact horizontal card like the approved reference. */
.fne-today-macro-energy .fne-today-macro-top {
	align-items: center;
}

.fne-today-macro-energy .fne-today-macro-progressline {
	margin-top: 0;
	align-self: end;
}

.fne-today-macro-energy .fne-today-macro-remaining {
	grid-column: 2;
	margin-top: -1px;
	padding-left: 0;
}

.fne-today-macro-energy .fne-today-macro-icon {
	width: 54px;
	height: 54px;
	flex-basis: 54px;
}

.fne-today-macro-energy .fne-today-macro-value strong {
	font-size: 19px;
}

@media (max-width: 900px) {
	.fne-today-macro-energy {
		grid-template-columns: 1fr;
		row-gap: 12px;
	}
	.fne-today-macro-energy .fne-today-macro-remaining {
		grid-column: 1;
	}
}

@media (max-width: 640px) {
	/* Keep the approved 2-column macro layout on phones. */
	.fne-today-summary-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}
	.fne-today-macro-energy {
		grid-column: 1 / -1;
	}
	.fne-today-macro-card {
		padding: 12px 11px 11px;
		border-radius: 14px;
	}
	.fne-today-macro-energy {
		padding: 14px 15px;
	}
	/* Narrow cards need a compact vertical header rather than collapsing the grid. */
	.fne-today-macro-card:not(.fne-today-macro-energy) .fne-today-macro-top {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}
	.fne-today-macro-card:not(.fne-today-macro-energy) .fne-today-macro-identity {
		align-items: flex-start;
		gap: 8px;
	}
	.fne-today-macro-card:not(.fne-today-macro-energy) .fne-today-macro-icon {
		width: 38px;
		height: 38px;
		flex-basis: 38px;
	}
	.fne-today-macro-card:not(.fne-today-macro-energy) .fne-today-macro-icon svg {
		width: 22px;
		height: 22px;
	}
	.fne-today-macro-card:not(.fne-today-macro-energy) .fne-today-macro-name {
		margin-bottom: 3px;
		font-size: 12.5px;
		line-height: 1.18;
		overflow-wrap: anywhere;
	}
	.fne-today-macro-card:not(.fne-today-macro-energy) .fne-today-macro-value {
		display: block;
		font-size: 10.5px;
		line-height: 1.3;
	}
	.fne-today-macro-card:not(.fne-today-macro-energy) .fne-today-macro-value strong {
		display: block;
		margin-bottom: 2px;
		font-size: 16px;
	}
	.fne-today-macro-card:not(.fne-today-macro-energy) .fne-today-status-badge {
		align-self: flex-start;
		padding: 4px 8px;
		font-size: 10px;
	}
	.fne-today-macro-card:not(.fne-today-macro-energy) .fne-today-macro-progressline {
		gap: 7px;
		margin-top: 11px;
	}
	.fne-today-macro-card:not(.fne-today-macro-energy) .fne-today-macro-progressline .fne-progress {
		height: 7px;
	}
	.fne-today-macro-card:not(.fne-today-macro-energy) .fne-today-macro-percent {
		min-width: 28px;
		font-size: 12px;
	}
	.fne-today-macro-card:not(.fne-today-macro-energy) .fne-today-macro-remaining {
		margin-top: 6px;
		font-size: 10.5px;
		line-height: 1.3;
	}
	/* Energy remains full-width and comfortably readable. */
	.fne-today-macro-energy .fne-today-macro-icon {
		width: 48px;
		height: 48px;
		flex-basis: 48px;
	}
	.fne-today-macro-energy .fne-today-macro-icon svg {
		width: 27px;
		height: 27px;
	}
	.fne-today-macro-energy .fne-today-macro-value strong {
		font-size: 17px;
	}
	.fne-today-macro-energy .fne-today-macro-value {
		font-size: 12px;
	}
	.fne-today-macro-energy .fne-today-status-badge {
		padding: 5px 9px;
		font-size: 11px;
	}
	.fne-today-macro-energy .fne-today-macro-progressline {
		margin-top: 12px;
	}
}

/* ==================== FNE MEDICAL METRIC ICON SYSTEM v1.5.44 ==================== */
.fne-metric-icon {
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: #eef5ff;
	color: #1c68b8;
	flex: 0 0 auto;
}
.fne-metric-icon img {
	display:block;
	width:58%;
	height:58%;
	object-fit:contain;
}
.fne-metric-icon-energy { color: #c97800; background: #fff4e5; }
.fne-metric-icon-bmr { color: #16879a; background: #eaf8f8; }
.fne-metric-icon-bmi { color: #1f62ad; background: #edf4ff; }
.fne-metric-icon-tdee { color: #6554bd; background: #f1efff; }
.fne-metric-icon-protein { color: #15875b; background: #eaf8f1; }
.fne-metric-icon-carb { color: #1c68b8; background: #edf4ff; }
.fne-metric-icon-fat { color: #c98400; background: #fff4df; }
.fne-metric-icon-fiber { color: #16885b; background: #eaf8f1; }
.fne-metric-icon-water { color: #1696a8; background: #e9f8fa; }

/* Today keeps the approved card sizing while using the shared registry. */
.fne-today-macro-icon.fne-metric-icon { width:58px; height:58px; }
.fne-today-macro-fat { --fne-card-accent:#c98400; --fne-card-accent-soft:#fff4df; }
.fne-today-macro-fiber { --fne-card-accent:#6d52b7; --fne-card-accent-soft:#f2efff; }

/* Guest: same icon language for BMI/BMR/TDEE and macro cards. */
.fne-guest-metric-icon { width:42px; height:42px; margin-bottom:10px; }
.fne-macro-card-head { display:flex; align-items:center; gap:10px; min-width:0; }
.fne-guest-macro-icon { width:38px; height:38px; }
.fne-macro-card-head .fne-macro-card-name { margin:0; }

@media (max-width: 640px) {
	.fne-guest-metric-icon { width:36px; height:36px; margin-bottom:8px; }
	.fne-guest-macro-icon { width:34px; height:34px; }
	.fne-macro-card-head { gap:8px; }
}

/* ================================================================
 * Phân tích thông minh / Smart Recommendation Engine v1 (v1.5.68)
 * ================================================================ */
.fne-analysis-page{display:flex;flex-direction:column;gap:18px}
.fne-analysis-page .fne-section-title{margin:0 0 10px;font-size:19px;line-height:1.3;color:var(--fne-text)}
.fne-analysis-summary{padding:16px 18px;border:1px solid #dfe8f1;background:linear-gradient(135deg,#f8fbff 0%,#fff 70%)}
.fne-analysis-summary-title{font-size:15px;font-weight:750;color:#183b5b;margin-bottom:12px}
.fne-analysis-summary-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.fne-analysis-summary-stat{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:12px;background:#fff;border:1px solid #e6edf4}
.fne-analysis-summary-stat strong{font-size:21px;line-height:1;font-weight:800}
.fne-analysis-summary-stat span{font-size:12px;color:#556575;line-height:1.25}
.fne-analysis-summary-stat.ok strong{color:#15805d}.fne-analysis-summary-stat.low strong{color:#d88416}.fne-analysis-summary-stat.high strong{color:#c64e4e}
.fne-analysis-summary-note{margin-top:11px;padding-top:10px;border-top:1px solid #e8eef4;font-size:12.5px;line-height:1.45;color:#546474}
.fne-analysis-section{margin:0}
.fne-analysis-attention-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.fne-analysis-attention-row{padding:13px 14px;background:#fff;border:1px solid #e4eaf0;border-radius:13px;box-shadow:0 2px 10px rgba(29,55,82,.035)}
.fne-analysis-attention-row.low{border-left:3px solid #e7a23a}.fne-analysis-attention-row.high{border-left:3px solid #dc6b6b}.fne-analysis-attention-row.warning{border-left:3px solid #d7a34c}
.fne-analysis-attention-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.fne-analysis-attention-name{font-size:14px;font-weight:750;line-height:1.35;color:#24384b}
.fne-analysis-attention-badge{flex:0 0 auto;padding:3px 8px;border-radius:999px;font-size:10.5px;font-weight:750;line-height:1.3;background:#f1f4f7;color:#5d6874}
.fne-analysis-attention-badge.low{background:#fff3df;color:#a8680c}.fne-analysis-attention-badge.high{background:#fff0f0;color:#b74444}.fne-analysis-attention-badge.warning{background:#fff6e8;color:#9d6b18}
.fne-analysis-attention-values{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 10px;margin-top:8px}
.fne-analysis-attention-values strong{font-size:16px;color:#1d3348}.fne-analysis-attention-values span{font-size:11.5px;color:#74808c}
.fne-analysis-attention-note{margin-top:6px;font-size:11.5px;color:#5d6a76}
.fne-analysis-more{display:block;margin:10px auto 0;border:0;background:transparent;color:#1667a5;font-size:12px;font-weight:700;cursor:pointer;padding:6px 10px}
.fne-analysis-ok-card{display:flex;flex-wrap:wrap;gap:7px;padding:13px}
.fne-analysis-ok-chip{display:inline-flex;align-items:center;padding:6px 9px;border-radius:999px;background:#edf9f4;color:#27765c;font-size:11.5px;font-weight:650;border:1px solid #d7f0e6}

.fne-smart-recommendations{padding:15px 16px 13px;border:1px solid #cfe5e8;border-radius:16px;background:linear-gradient(180deg,#f5fcfc 0%,#fbfefe 100%)}
.fne-smart-recommendation-heading p{margin:-4px 0 12px;font-size:12px;line-height:1.5;color:#60727a;max-width:760px}
.fne-smart-food-list{display:flex;flex-direction:column;gap:8px}
.fne-smart-food-row{position:relative;padding:11px 12px;background:#fff;border:1px solid #dce9e9;border-radius:13px;box-shadow:0 2px 9px rgba(27,76,79,.035)}
.fne-smart-food-main{display:grid;grid-template-columns:28px minmax(0,1fr) 52px;gap:9px;align-items:start;padding-right:84px}
.fne-smart-rank{width:25px;height:25px;border-radius:8px;background:#e8f5f5;color:#267377;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800}
.fne-smart-food-name{font-size:14px;line-height:1.3;font-weight:800;color:#243b49}
.fne-smart-food-serving{margin-top:2px;font-size:10.5px;color:#7a878d}
.fne-smart-supports{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
.fne-smart-support-chip{padding:3px 6px;border-radius:6px;background:#eef7f7;color:#347076;font-size:10px;line-height:1.2}
.fne-smart-score{text-align:right;line-height:1}.fne-smart-score strong{display:block;font-size:18px;color:#23757b}.fne-smart-score span{font-size:9.5px;color:#829094}
.fne-smart-try-btn{position:absolute;right:12px;top:43px!important;padding:5px 9px!important;font-size:11px!important;min-height:0!important}
.fne-smart-caution{margin:7px 84px 0 37px;padding:5px 7px;border-radius:7px;background:#fff8ec;color:#8b681f;font-size:10.5px;line-height:1.35}
.fne-smart-try-panel{margin-top:11px;padding-top:11px;border-top:1px dashed #cadfdf}
.fne-smart-recommendation-footnote{margin-top:10px;font-size:10.5px;line-height:1.45;color:#718187}

/* Preview "Thử thêm": màu riêng để khẳng định đây là dinh dưỡng CỦA thực phẩm. */
.fne-food-preview-result{margin-top:9px}
.fne-food-preview-result:empty{display:none}
.fne-food-preview-head{padding:10px 11px;border-radius:11px 11px 0 0;background:#e9f7f8;border:1px solid #c9e6e8;border-bottom:0}
.fne-food-preview-head strong{display:block;font-size:13px;color:#215b62}.fne-food-preview-head span{display:block;margin-top:2px;font-size:10.5px;color:#668087;line-height:1.4}
.fne-food-preview-group{padding:9px 10px;background:#f7fcfc;border-left:1px solid #c9e6e8;border-right:1px solid #c9e6e8;border-top:1px solid #e2f0f1}
.fne-food-preview-group-title{font-size:10.5px;text-transform:uppercase;letter-spacing:.03em;font-weight:800;color:#4e7479;margin-bottom:6px}
.fne-food-preview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.fne-food-preview-nutrient{padding:6px 7px;background:#fff;border:1px solid #e0eeee;border-radius:8px;min-width:0}
.fne-food-preview-nutrient span{display:block;font-size:9.5px;color:#6e7d82;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fne-food-preview-nutrient strong{display:block;margin-top:2px;font-size:11.5px;color:#236b70;white-space:nowrap}
.fne-food-preview-impact{display:flex;flex-wrap:wrap;gap:4px 10px;padding:9px 10px;background:#f1f7fb;border:1px solid #d9e7f1;color:#577084}
.fne-food-preview-impact-title{width:100%;font-size:10.5px;font-weight:800;color:#385d78}.fne-food-preview-impact span{font-size:9.5px}
.fne-food-confirm-add{margin-top:8px!important;font-size:11.5px!important;padding:7px 10px!important}
.fne-food-preview-btn{margin-top:7px!important;font-size:11.5px!important;padding:6px 10px!important}
.fne-food-preview-status{margin-top:7px;font-size:11px;line-height:1.4}.fne-food-preview-status.success{color:#257259}.fne-food-preview-status.error{color:#b84c4c}

@media(max-width:640px){
 .fne-analysis-page{gap:15px}.fne-analysis-summary{padding:13px}
 .fne-analysis-summary-stats{gap:6px}.fne-analysis-summary-stat{display:block;padding:8px;text-align:center}.fne-analysis-summary-stat strong{font-size:19px}.fne-analysis-summary-stat span{display:block;margin-top:3px;font-size:9.5px}
 .fne-analysis-attention-grid{grid-template-columns:1fr}.fne-analysis-attention-row{padding:11px 12px}
 .fne-smart-recommendations{padding:12px 10px}.fne-smart-food-row{padding:10px}
 .fne-smart-food-main{grid-template-columns:25px minmax(0,1fr) 43px;padding-right:0}.fne-smart-rank{width:23px;height:23px}.fne-smart-food-name{font-size:13px}.fne-smart-score strong{font-size:16px}
 .fne-smart-try-btn{position:static;margin:8px 0 0 34px!important}.fne-smart-caution{margin:7px 0 0 34px}
 .fne-food-preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* v1.5.68: Tổng quan Phân tích là bộ lọc tương tác cho khung chi tiết. */
.fne-analysis-summary-stat{
 appearance:none;-webkit-appearance:none;font:inherit;text-align:left;cursor:pointer;
 color:inherit;transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease;
}
.fne-analysis-summary-stat:hover{border-color:#cbd9e6;background:#fbfdff}
.fne-analysis-summary-stat:focus-visible{outline:2px solid #2b79b9;outline-offset:2px}
.fne-analysis-summary-stat.is-active{box-shadow:0 0 0 2px rgba(28,111,167,.10);transform:translateY(-1px)}
.fne-analysis-summary-stat.ok.is-active{border-color:#7cc9ad;background:#f1fbf7}
.fne-analysis-summary-stat.low.is-active{border-color:#e7b768;background:#fff9ef}
.fne-analysis-summary-stat.high.is-active{border-color:#e69b9b;background:#fff5f5}
.fne-analysis-details-host{min-width:0}
.fne-analysis-attention-row.ok{border-left:3px solid #61b694}
.fne-analysis-attention-badge.ok{background:#e9f8f1;color:#24785c}


/* v1.5.68 — compact, visually distinct food simulation preview */
.fne-smart-try-panel .fne-food-preview-result{
  width:min(92%,760px);
  margin:10px auto 0;
  border:1px solid #d8d4ef;
  border-radius:13px;
  overflow:hidden;
  background:#fbfaff;
  box-shadow:0 5px 16px rgba(70,61,120,.07);
}
.fne-smart-try-panel .fne-food-preview-head{
  background:#f0edfb;
  border-color:#d8d4ef;
}
.fne-smart-try-panel .fne-food-preview-head strong{color:#4d4678}
.fne-smart-try-panel .fne-food-preview-head span{color:#736d91}
.fne-smart-try-panel .fne-food-preview-group{
  background:#fbfaff;
  border-left-color:#d8d4ef;
  border-right-color:#d8d4ef;
  border-top-color:#e9e6f5;
}
.fne-smart-try-panel .fne-food-preview-group-title{color:#625b86}
.fne-smart-try-panel .fne-food-preview-nutrient{
  background:#fff;
  border-color:#e7e3f3;
}
.fne-smart-try-panel .fne-food-preview-nutrient strong{color:#514a7f}
.fne-smart-try-panel .fne-food-preview-impact{
  background:#f5f3fb;
  border-color:#ded9ef;
}
.fne-smart-try-panel .fne-food-preview-impact-title{color:#514a7f}

/* Add-to-meal confirmation modal */
.fne-food-added-modal{
  position:fixed;
  inset:0;
  z-index:999999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(14,35,51,.42);
  backdrop-filter:blur(2px);
}
.fne-food-added-dialog{
  width:min(92vw,420px);
  padding:26px 24px 22px;
  border-radius:18px;
  background:#fff;
  border:1px solid #dce9e4;
  box-shadow:0 18px 50px rgba(15,45,59,.24);
  text-align:center;
}
.fne-food-added-icon{
  width:54px;
  height:54px;
  margin:0 auto 12px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#e8f6ef;
  color:#15835d;
  font-size:28px;
  font-weight:800;
}
.fne-food-added-dialog h3{
  margin:0;
  color:#12324a;
  font-size:20px;
}
.fne-food-added-dialog p{
  margin:8px auto 18px;
  max-width:330px;
  color:#617484;
  line-height:1.5;
  font-size:14px;
}
.fne-food-added-ok{min-width:110px}

@media(max-width:640px){
  .fne-smart-try-panel .fne-food-preview-result{width:96%}
  .fne-food-added-dialog{padding:22px 18px 18px}
}

/* v1.5.68 — Analysis filter reset */
.fne-analysis-reset-link{
  appearance:none;border:0;background:none;padding:0;margin:0;
  font:inherit;font-weight:800;color:#0b6f55;cursor:pointer;
  text-decoration:underline;text-underline-offset:3px;
}
.fne-analysis-reset-link:hover{color:#075c46}
.fne-analysis-filter-label{font-weight:700;color:#60717e}

/* v1.5.68 — Smart food list expand status */
.fne-smart-food-all-shown{
  margin-top:9px;
  text-align:center;
  font-size:10.5px;
  color:#718187;
}

/* v1.5.68 — Báo cáo v1 */
.fne-report-v2{max-width:100%}
.fne-report-range-tabs{display:flex;gap:8px;margin:8px 0}
.fne-report-range-tab{border:1px solid #dce5e9;background:#fff;color:#4e6270;border-radius:999px;padding:8px 15px;font-weight:700;cursor:pointer}
.fne-report-range-tab.active{background:#16845e;color:#fff;border-color:#16845e}
.fne-report-range-tab:disabled{opacity:.45;cursor:not-allowed}
.fne-report-meta{font-size:12px;color:#71808c;margin:4px 0 18px}
.fne-report-overview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:24px}
.fne-report-overview-card{border:1px solid #dce6ea;border-radius:14px;padding:15px;background:#fff;box-shadow:0 3px 10px rgba(22,54,69,.04)}
.fne-report-overview-label{font-size:12px;color:#637684;font-weight:700}
.fne-report-overview-value{font-size:20px;line-height:1.25;color:#0c2e45;font-weight:800;margin:5px 0}
.fne-report-overview-sub{font-size:11px;color:#758692}
.fne-report-section{margin:24px 0}
.fne-report-trend-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.fne-report-trend-tab{border:1px solid #dbe5e9;background:#fff;border-radius:999px;padding:7px 12px;font-size:12px;font-weight:700;color:#526a78;cursor:pointer}
.fne-report-trend-tab.active{background:#e9f6f1;border-color:#a9ddca;color:#087451}
.fne-report-chart{border:1px solid #dce6ea;border-radius:16px;background:#fff;padding:18px 16px}
.fne-report-chart-bars{height:220px;display:flex;align-items:stretch;gap:8px;border-bottom:1px solid #dce5e9}
.fne-report-chart-col{flex:1;min-width:20px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end}
.fne-report-chart-value{font-size:9px;color:#647986;margin-bottom:4px;white-space:nowrap}
.fne-report-chart-bar-wrap{height:165px;width:min(72%,34px);display:flex;align-items:flex-end;background:#f1f4f6;border-radius:7px 7px 0 0;overflow:hidden}
.fne-report-chart-bar{width:100%;background:#16845e;border-radius:7px 7px 0 0}
.fne-report-chart-date{font-size:10px;color:#70828d;padding:7px 0}
.fne-report-chart-caption{font-size:11px;color:#637783;margin-top:10px}
.fne-report-table{border:1px solid #dce5e9;border-radius:14px;overflow:hidden;background:#fff}
.fne-report-table-row{display:grid;grid-template-columns:1.5fr 1.15fr 1.1fr .9fr .9fr;gap:10px;align-items:center;padding:11px 13px;border-bottom:1px solid #e8edef;font-size:11px}
.fne-report-table-row:last-child{border-bottom:0}
.fne-report-table-name{font-weight:800;color:#12344b}
.fne-report-status-pill{justify-self:start;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:800}
.fne-report-status-pill.is-ok{background:#e8f6ef;color:#087451}
.fne-report-status-pill.is-low{background:#fff1dc;color:#a45d00}
.fne-report-status-pill.is-high{background:#fdebea;color:#b43b32}
.fne-report-attention{display:flex;flex-direction:column;gap:3px;border:1px solid #e0e8eb;border-left:4px solid #d08a16;border-radius:12px;padding:12px 14px;margin:8px 0;background:#fff}
.fne-report-attention.is-high{border-left-color:#d64a43;background:#fffafa}
.fne-report-attention.is-low{border-left-color:#d08a16;background:#fffdf8}
.fne-report-attention strong{font-size:13px;color:#16364b}
.fne-report-attention span{font-size:11px;color:#6b7d88}
@media(max-width:760px){
 .fne-report-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .fne-report-table-row{grid-template-columns:1.4fr 1fr .8fr}
 .fne-report-table-row>div:nth-child(3),.fne-report-table-row>div:nth-child(4){display:none}
 .fne-report-chart{padding:12px 8px;overflow-x:auto}
 .fne-report-chart-bars{min-width:520px}
}
@media(max-width:430px){
 .fne-report-overview-value{font-size:17px}
 .fne-report-overview-card{padding:12px}
}

/* v1.5.68 — Báo cáo tùy chọn + món đã ăn */
.fne-report-custom-range{
  display:flex;
  flex-wrap:wrap;
  align-items:end;
  gap:10px;
  padding:12px;
  margin:4px 0 12px;
  border:1px solid #dce6ea;
  border-radius:13px;
  background:#f8fbfc;
}
.fne-report-date-field{display:flex;flex-direction:column;gap:5px;min-width:160px;font-size:11px;font-weight:700;color:#526b79}
.fne-report-date-input{margin:0!important;min-height:38px}
.fne-report-custom-msg{flex-basis:100%;font-size:11px;color:#b54b42}
.fne-report-chart-bar-wrap.is-missing{background:#fafbfc;border:1px dashed #dfe7ea;justify-content:center;align-items:center}
.fne-report-chart-missing{font-size:14px;color:#a4b0b7;margin:auto}
.fne-report-table-header{background:#f5f8f9!important;color:#607582;font-weight:800;font-size:10px;text-transform:none}
.fne-report-table-header>div{white-space:nowrap}
.fne-report-meal-days{display:flex;flex-direction:column;gap:10px}
.fne-report-meal-day{border:1px solid #dce6ea;border-radius:14px;background:#fff;overflow:hidden}
.fne-report-meal-date{padding:10px 13px;background:#f6faf9;border-bottom:1px solid #e4ecef;font-size:12px;font-weight:800;color:#12384d}
.fne-report-meal-row{display:grid;grid-template-columns:110px 1fr;gap:10px;padding:9px 13px;border-bottom:1px solid #edf1f3}
.fne-report-meal-row:last-child{border-bottom:0}
.fne-report-meal-type{font-size:11px;font-weight:800;color:#16845e}
.fne-report-meal-items{display:flex;flex-direction:column;gap:4px}
.fne-report-meal-item{font-size:11px;color:#4f6472;line-height:1.45}
@media(max-width:640px){
  .fne-report-custom-range{align-items:stretch}
  .fne-report-date-field{flex:1 1 140px}
  .fne-report-custom-range .fne-btn{width:100%}
  .fne-report-meal-row{grid-template-columns:1fr;gap:4px}
}

/* v1.5.68 — Report meals 4 columns + compact consultation options */
.fne-report-meal-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  align-items:start;
}
.fne-report-meal-column{
  min-width:0;
  padding:12px 14px;
  border-right:1px solid #edf1f3;
}
.fne-report-meal-column:last-child{border-right:0}
.fne-report-meal-column-title{
  margin-bottom:8px;
  font-size:11px;
  font-weight:800;
  color:#16845e;
}
.fne-report-meal-items{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.fne-report-meal-item{
  font-size:11px;
  line-height:1.4;
  color:#4f6472;
  overflow-wrap:anywhere;
}
.fne-report-meal-empty{
  font-size:12px;
  color:#a7b2b8;
}
.fne-consultation-range-options{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  margin-top:8px;
  font-size:13px;
}
.fne-consultation-range-options label,
.fne-consultation-consent label{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:8px;
  width:auto;
  margin:0;
  text-align:left;
}
.fne-consultation-range-options input,
.fne-consultation-consent input{
  flex:0 0 auto;
  margin:0;
}
.fne-consultation-consent{
  margin-top:9px;
  font-size:13px;
  text-align:left;
}
@media(max-width:760px){
  .fne-report-meal-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .fne-report-meal-column:nth-child(2){border-right:0}
  .fne-report-meal-column:nth-child(-n+2){border-bottom:1px solid #edf1f3}
}
@media(max-width:430px){
  .fne-report-meal-grid{grid-template-columns:1fr}
  .fne-report-meal-column{
    border-right:0;
    border-bottom:1px solid #edf1f3;
  }
  .fne-report-meal-column:last-child{border-bottom:0}
}

/* v1.5.68 — Report overview icons + mobile compact layout */
.fne-report-overview-head{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}
.fne-report-overview-icon{
  width:34px;
  height:34px;
  flex:0 0 34px;
  border-radius:50%;
}
.fne-report-overview-icon img{
  width:19px;
  height:19px;
}
.fne-report-overview-card .fne-metric-icon-journal{background:#eef5ff}
.fne-report-overview-card .fne-metric-icon-energy{background:#fff2df}
.fne-report-overview-card .fne-metric-icon-protein{background:#e9f7f1}
.fne-report-overview-card .fne-metric-icon-fiber{background:#f0ecff}
.fne-report-overview-label{min-width:0}

@media(max-width:640px){
  .fne-report-range-tabs{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    margin:7px 0 10px;
  }
  .fne-report-range-tab{
    width:100%;
    min-width:0;
    min-height:38px;
    padding:8px 6px;
    border-radius:12px;
    font-size:12px;
    line-height:1.15;
    white-space:nowrap;
  }
  .fne-report-meta{
    margin:3px 0 13px;
    font-size:11px;
    line-height:1.4;
  }
  .fne-report-overview-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px;
    margin-bottom:18px;
  }
  .fne-report-overview-card{
    min-height:0;
    padding:11px;
    border-radius:13px;
  }
  .fne-report-overview-head{gap:7px}
  .fne-report-overview-icon{
    width:30px;
    height:30px;
    flex-basis:30px;
  }
  .fne-report-overview-icon img{
    width:17px;
    height:17px;
  }
  .fne-report-overview-label{
    font-size:11px;
    line-height:1.25;
  }
  .fne-report-overview-value{
    margin:7px 0 3px;
    font-size:17px;
    line-height:1.2;
    overflow-wrap:anywhere;
  }
  .fne-report-overview-sub{
    font-size:10px;
    line-height:1.35;
  }
  .fne-report-section{margin:19px 0}
  .fne-report-trend-tabs{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
  }
  .fne-report-trend-tab{
    width:100%;
    padding:8px 5px;
    font-size:11px;
    line-height:1.15;
    white-space:nowrap;
  }
  .fne-report-table-row{
    grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) auto;
    gap:8px;
    padding:9px 10px;
    min-height:0;
    font-size:10.5px;
  }
  .fne-report-table-row>div:nth-child(3),
  .fne-report-table-row>div:nth-child(4){display:none}
  .fne-report-table-name{
    line-height:1.3;
    overflow-wrap:anywhere;
  }
  .fne-report-status-pill{
    max-width:112px;
    padding:4px 7px;
    font-size:9.5px;
    line-height:1.2;
    text-align:center;
    white-space:normal;
  }
  .fne-report-table-header{
    font-size:9.5px;
  }
  .fne-report-table-header>div:nth-child(5)::before{
    content:'Đánh giá';
  }
  .fne-report-table-header>div:nth-child(5){
    font-size:0;
  }
  .fne-report-table-header>div:nth-child(5)::before{
    font-size:9.5px;
  }
}

@media(max-width:390px){
  .fne-report-overview-value{font-size:16px}
  .fne-report-range-tab{font-size:11px}
  .fne-report-trend-tab{font-size:10.5px}
}

/* v1.5.68 — Report loading fix + meals 3-day preview */
@media(max-width:640px){
  .fne-report-meal-column-title{
    font-size:13.2px;
    line-height:1.3;
  }
  .fne-report-meal-item{
    font-size:13.2px;
    line-height:1.48;
  }
  .fne-report-meal-date{
    font-size:13.2px;
  }
}

/* v1.5.68 — Focused report attention (18 key indicators) */
.fne-report-attention-good{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:13px 14px;
  border:1px solid #cfe9dd;
  border-left:4px solid #16845e;
  border-radius:12px;
  background:#f7fcfa;
}
.fne-report-attention-good strong{
  font-size:13px;
  color:#126a50;
}
.fne-report-attention-good span{
  font-size:11px;
  line-height:1.45;
  color:#637783;
}

/* v1.5.68 — Chuẩn hóa thứ tự Điều cần chú ý theo toàn Engine */
.fne-report-attention-group{
  margin-top:12px;
}
.fne-report-attention-group:first-of-type{
  margin-top:6px;
}
.fne-report-attention-group-title{
  margin:0 0 7px;
  font-size:12px;
  line-height:1.3;
  font-weight:800;
  color:#39596c;
}
@media(max-width:640px){
  .fne-report-attention-group-title{
    font-size:12.5px;
  }
}

/* ==========================================================================
 * v1.5.68 — FNE Semantic Status Color System
 * Chỉ thay đổi lớp trình bày; không thay đổi dữ liệu/logic/schema.
 *
 * Thiếu / Dưới khuyến nghị = BLUE  (#2F80ED)
 * Đạt / Trong khuyến nghị  = GREEN (#16845E)
 * Vượt / Trên khuyến nghị  = RED   (#D64545)
 * ========================================================================== */
:root{
  --fne-status-low:#2F80ED;
  --fne-status-low-text:#1F66C1;
  --fne-status-low-bg:#F2F8FF;
  --fne-status-low-border:#B8D8FF;

  --fne-status-ok:#16845E;
  --fne-status-ok-text:#126A4D;
  --fne-status-ok-bg:#EDF9F4;
  --fne-status-ok-border:#B9E2D2;

  --fne-status-high:#D64545;
  --fne-status-high-text:#B53232;
  --fne-status-high-bg:#FFF2F2;
  --fne-status-high-border:#F1B8B8;
}

/* Badge/status classes dùng chung — "warning" trong hệ nutrient hiện là Thiếu/Dưới khoảng. */
.fne-today-status-badge.is-warning,
.fne-status-badge.is-warning,
.fne-badge.is-warning{
  color:var(--fne-status-low-text)!important;
  background:var(--fne-status-low-bg)!important;
  border-color:var(--fne-status-low-border)!important;
}
.fne-today-status-badge.is-success,
.fne-status-badge.is-success,
.fne-badge.is-success{
  color:var(--fne-status-ok-text)!important;
  background:var(--fne-status-ok-bg)!important;
  border-color:var(--fne-status-ok-border)!important;
}
.fne-today-status-badge.is-danger,
.fne-status-badge.is-danger,
.fne-badge.is-danger{
  color:var(--fne-status-high-text)!important;
  background:var(--fne-status-high-bg)!important;
  border-color:var(--fne-status-high-border)!important;
}

/* Trang Phân tích */
.fne-analysis-attention-row.low{
  border-left-color:var(--fne-status-low)!important;
  background:var(--fne-status-low-bg)!important;
}
.fne-analysis-attention-badge.low{
  color:var(--fne-status-low-text)!important;
  background:#EAF4FF!important;
}
.fne-analysis-attention-row.high{
  border-left-color:var(--fne-status-high)!important;
  background:var(--fne-status-high-bg)!important;
}
.fne-analysis-attention-badge.high{
  color:var(--fne-status-high-text)!important;
  background:#FFE9E9!important;
}
/* approaching_limit vẫn giữ amber vì đây không phải "thiếu". */

/* Trang Báo cáo */
.fne-report-status-pill.is-low{
  color:var(--fne-status-low-text)!important;
  background:#EAF4FF!important;
}
.fne-report-status-pill.is-ok{
  color:var(--fne-status-ok-text)!important;
  background:var(--fne-status-ok-bg)!important;
}
.fne-report-status-pill.is-high{
  color:var(--fne-status-high-text)!important;
  background:var(--fne-status-high-bg)!important;
}
.fne-report-attention.is-low{
  border-left-color:var(--fne-status-low)!important;
  background:var(--fne-status-low-bg)!important;
}
.fne-report-attention.is-high{
  border-left-color:var(--fne-status-high)!important;
  background:var(--fne-status-high-bg)!important;
}

/* Các progress/state helper dùng semantic classes */
.fne-progress-bar.is-warning,
.fne-progress-bar.low{
  background:var(--fne-status-low)!important;
}
.fne-progress-bar.is-success,
.fne-progress-bar.ok{
  background:var(--fne-status-ok)!important;
}
.fne-progress-bar.is-danger,
.fne-progress-bar.high{
  background:var(--fne-status-high)!important;
}

/* Summary/filter cards của Phân tích */
.fne-analysis-summary-stat.is-low,
.fne-analysis-summary-stat[data-filter="low"]{
  --fne-analysis-state:var(--fne-status-low);
}
.fne-analysis-summary-stat.is-high,
.fne-analysis-summary-stat[data-filter="high"]{
  --fne-analysis-state:var(--fne-status-high);
}
.fne-analysis-summary-stat.is-ok,
.fne-analysis-summary-stat[data-filter="ok"]{
  --fne-analysis-state:var(--fne-status-ok);
}

/* ==========================================================================
 * v1.5.68 — Responsive member navigation
 * Desktop: giữ tab ngang hiện tại.
 * Mobile: bottom navigation cố định 5 mục; Gia đình được quản lý qua chip thành viên.
 * ========================================================================== */
.fne-shell-tab-icon{
	display:none;
}
.fne-shell-tab-label{
	display:inline;
}

@media (max-width: 640px) {
	.fne-shell{
		--fne-mobile-nav-height: 66px;
	}

	.fne-shell-nav{
		position:fixed;
		left:0;
		right:0;
		bottom:0;
		top:auto;
		z-index:9999;
		display:grid;
		grid-template-columns:repeat(5,minmax(0,1fr));
		gap:0;
		width:100%;
		margin:0;
		padding:6px max(6px, env(safe-area-inset-right))
			calc(6px + env(safe-area-inset-bottom))
			max(6px, env(safe-area-inset-left));
		border-top:1px solid #dde6eb;
		border-bottom:0;
		background:rgba(255,255,255,.97);
		box-shadow:0 -5px 18px rgba(22,54,69,.08);
		overflow:visible;
		-webkit-backdrop-filter:blur(10px);
		backdrop-filter:blur(10px);
		box-sizing:border-box;
	}

	/* Mobile dùng chip + Thêm thành viên, vì vậy không chiếm một ô bottom-nav cho Gia đình. */
	.fne-shell-tab-members{
		display:none!important;
	}

	.fne-shell-tab{
		min-width:0;
		min-height:52px;
		display:flex;
		flex-direction:column;
		align-items:center;
		justify-content:center;
		gap:3px;
		padding:4px 2px;
		margin:0;
		border:0!important;
		border-radius:10px;
		background:transparent;
		color:#6e7c88;
		font-size:10px;
		font-weight:600;
		line-height:1.12;
		white-space:nowrap;
		-webkit-tap-highlight-color:transparent;
	}

	.fne-shell-tab:hover,
	.fne-shell-tab:focus{
		background:#f5f8fa;
		outline:none;
	}

	.fne-shell-tab.active{
		color:#1570d8;
		font-weight:800;
		background:#f5f9ff;
		border:0!important;
	}

	.fne-shell-tab-icon{
		width:23px;
		height:23px;
		display:flex;
		align-items:center;
		justify-content:center;
		flex:0 0 23px;
	}

	.fne-shell-tab-icon img{
		display:block;
		width:23px;
		height:23px;
		object-fit:contain;
		opacity:.72;
		filter:grayscale(1) brightness(.72);
		transition:opacity .15s ease, filter .15s ease, transform .15s ease;
	}

	.fne-shell-tab.active .fne-shell-tab-icon img{
		opacity:1;
		filter:invert(39%) sepia(92%) saturate(1518%) hue-rotate(190deg) brightness(91%) contrast(92%);
		transform:translateY(-1px);
	}

	.fne-shell-tab-label{
		display:block;
		max-width:100%;
		overflow:hidden;
		text-overflow:ellipsis;
	}

	/* Không để bottom-nav che nội dung/nút cuối trang, kể cả iPhone có safe area. */
	.fne-shell-content{
		min-height:200px;
		padding-bottom:calc(var(--fne-mobile-nav-height) + env(safe-area-inset-bottom) + 18px);
	}

	/* Chip thành viên vẫn ở luồng nội dung phía trên, không bị nav mới can thiệp. */
	.fne-shell-content .fne-member-chips{
		position:relative;
		z-index:1;
	}
}

/* ==========================================================================
 * v1.5.68 — Tổng quan v3
 * 30 ngày là baseline; hôm nay chỉ là lớp cập nhật tức thời.
 * ========================================================================== */
.fne-overview-v3{
	display:flex;
	flex-direction:column;
	gap:18px;
}

.fne-overview-profile{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:16px;
	padding:16px 18px;
}
.fne-overview-profile-main{min-width:0}
.fne-overview-profile-edit{
	flex:0 0 auto;
	font-size:12px;
	padding:7px 12px;
}
.fne-overview-section-head{
	display:flex;
	align-items:flex-start;
	justify-content:space-between;
	gap:14px;
	margin-bottom:10px;
}
.fne-overview-section-head .fne-section-title{
	margin:0;
}
.fne-overview-section-sub{
	margin-top:3px;
	font-size:11px;
	line-height:1.4;
	color:#70828e;
}
.fne-overview-link-btn{
	appearance:none;
	border:0;
	background:transparent;
	color:#1475d2;
	padding:2px 0;
	font-size:11px;
	font-weight:750;
	cursor:pointer;
	white-space:nowrap;
}
.fne-overview-link-btn:hover{text-decoration:underline}

.fne-overview-body-head{margin-bottom:0}
.fne-overview-body-grid{
	display:grid;
	grid-template-columns:repeat(4,minmax(0,1fr));
	gap:12px;
}
.fne-overview-body-card{
	min-width:0;
	padding:14px;
	border:1px solid #dce6eb;
	border-radius:15px;
	background:#fff;
	box-shadow:0 3px 12px rgba(24,55,70,.045);
}
.fne-overview-body-card-head{
	display:flex;
	align-items:center;
	gap:8px;
}
.fne-overview-body-icon{
	width:34px;
	height:34px;
	flex:0 0 34px;
	border-radius:50%;
}
.fne-overview-body-icon img{width:19px;height:19px}
.fne-overview-body-label{
	font-size:12px;
	font-weight:800;
	color:#536a78;
}
.fne-overview-body-value{
	margin-top:10px;
	font-size:21px;
	line-height:1.18;
	font-weight:850;
	color:#0d3048;
	overflow-wrap:anywhere;
}
.fne-overview-body-badge{
	display:inline-flex;
	margin-top:7px;
	padding:4px 8px;
	border-radius:999px;
	background:var(--fne-status-ok-bg,#EDF9F4);
	color:var(--fne-status-ok-text,#126A4D);
	font-size:10px;
	font-weight:750;
}
.fne-overview-body-sub{
	margin-top:7px;
	font-size:10.5px;
	line-height:1.45;
	color:#758591;
}

.fne-overview-panel{
	padding:16px;
	border:1px solid #dce6eb;
	border-radius:16px;
	background:#fff;
	box-shadow:0 3px 12px rgba(24,55,70,.04);
}
.fne-overview-30{
	background:linear-gradient(180deg,#f8fbff 0%,#fff 100%);
}
.fne-overview-30-grid{
	display:grid;
	grid-template-columns:.9fr 1fr 2fr;
	gap:12px;
}
.fne-overview-mini-card,
.fne-overview-main-nutrients{
	min-width:0;
	padding:14px;
	border:1px solid #e0e8ec;
	border-radius:13px;
	background:#fff;
}
.fne-overview-mini-label{
	font-size:11px;
	font-weight:800;
	color:#4d6675;
}
.fne-overview-mini-value{
	margin-top:14px;
	font-size:22px;
	line-height:1.18;
	font-weight:850;
	color:#10344c;
}
.fne-overview-mini-note{
	margin-top:8px;
	font-size:10.5px;
	line-height:1.45;
	color:#71828e;
}
.fne-overview-donut{
	--p:0;
	width:94px;
	height:94px;
	margin:12px auto 4px;
	border-radius:50%;
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	background:
		radial-gradient(circle at center,#fff 58%,transparent 59%),
		conic-gradient(#2f80ed calc(var(--p) * 1%),#e8eef2 0);
	color:#12344c;
}
.fne-overview-donut strong{font-size:18px;line-height:1}
.fne-overview-donut span{margin-top:4px;font-size:9px;color:#7a8993}

.fne-overview-main-nutrients{
	display:flex;
	flex-direction:column;
	gap:9px;
}
.fne-overview-nutrient-line{
	display:grid;
	grid-template-columns:8px 78px minmax(50px,1fr) auto;
	align-items:center;
	gap:7px;
	font-size:10.5px;
}
.fne-overview-dot{
	width:7px;height:7px;border-radius:50%;
	background:#16845e;
}
.fne-overview-nutrient-line.is-low .fne-overview-dot{background:var(--fne-status-low,#2F80ED)}
.fne-overview-nutrient-line.is-high .fne-overview-dot{background:var(--fne-status-high,#D64545)}
.fne-overview-line-track{
	height:6px;
	border-radius:999px;
	background:#e8edf0;
	overflow:hidden;
}
.fne-overview-line-fill{
	display:block;
	width:72%;
	height:100%;
	border-radius:inherit;
	background:#16845e;
}
.fne-overview-nutrient-line.is-low .fne-overview-line-fill{background:var(--fne-status-low,#2F80ED)}
.fne-overview-nutrient-line.is-high .fne-overview-line-fill{background:var(--fne-status-high,#D64545)}
.fne-overview-line-meta{
	color:#667985;
	white-space:nowrap;
	font-size:10px;
}

.fne-overview-attention-grid{
	display:grid;
	grid-template-columns:repeat(3,minmax(0,1fr));
	gap:10px;
}
.fne-overview-attention-card{
	padding:13px;
	border:1px solid #dce6eb;
	border-left-width:4px;
	border-radius:13px;
	background:#fff;
}
.fne-overview-attention-card.is-low{
	border-left-color:var(--fne-status-low,#2F80ED);
	background:var(--fne-status-low-bg,#F2F8FF);
}
.fne-overview-attention-card.is-high{
	border-left-color:var(--fne-status-high,#D64545);
	background:var(--fne-status-high-bg,#FFF2F2);
}
.fne-overview-attention-title{
	font-size:12.5px;
	line-height:1.35;
	font-weight:850;
	color:#14364d;
}
.fne-overview-attention-copy{
	margin-top:6px;
	font-size:10.5px;
	line-height:1.45;
	color:#667a87;
}

.fne-overview-food-grid{
	display:grid;
	grid-template-columns:repeat(3,minmax(0,1fr));
	gap:10px;
}
.fne-overview-food-card{
	display:flex;
	flex-direction:column;
	min-width:0;
	padding:13px;
	border:1px solid #dce6eb;
	border-radius:13px;
	background:#fff;
}
.fne-overview-food-name{
	font-size:13px;
	line-height:1.35;
	font-weight:850;
	color:#12354d;
}
.fne-overview-food-serving{
	margin-top:3px;
	font-size:10.5px;
	color:#788994;
}
.fne-overview-food-tags{
	display:flex;
	flex-wrap:wrap;
	gap:5px;
	margin-top:9px;
}
.fne-overview-food-tags span{
	padding:3px 6px;
	border-radius:999px;
	background:#edf7f3;
	color:#187356;
	font-size:9px;
	font-weight:700;
}
.fne-overview-food-action{
	margin-top:auto;
	padding:7px 9px;
	font-size:10.5px;
}

.fne-overview-info-box,
.fne-overview-good-box{
	display:flex;
	flex-direction:column;
	gap:4px;
	padding:13px 14px;
	border:1px solid #dce6eb;
	border-radius:12px;
	background:#f8fafb;
}
.fne-overview-good-box{
	border-color:#cfe9dd;
	background:#f5fbf8;
}
.fne-overview-info-box strong,
.fne-overview-good-box strong{
	font-size:12px;
	color:#17384d;
}
.fne-overview-info-box span,
.fne-overview-good-box span{
	font-size:10.5px;
	line-height:1.45;
	color:#697c88;
}

.fne-overview-today-empty{
	display:flex;
	flex-direction:column;
	align-items:flex-start;
	gap:7px;
	padding:14px;
	border-radius:13px;
	background:#f7fafc;
}
.fne-overview-today-empty strong{font-size:12.5px;color:#13364d}
.fne-overview-today-empty span{font-size:10.5px;line-height:1.45;color:#6e808d}
.fne-overview-today-empty .fne-btn{margin-top:3px}
.fne-overview-today-copy{
	margin-bottom:10px;
	font-size:11px;
	color:#617683;
}

.fne-overview-7-grid{
	display:grid;
	grid-template-columns:repeat(3,minmax(0,1fr));
	gap:9px;
}
.fne-overview-7-card{
	display:flex;
	flex-direction:column;
	gap:4px;
	padding:11px 12px;
	border:1px solid #dce6eb;
	border-radius:12px;
	background:#fff;
}
.fne-overview-7-card strong{font-size:11px;color:#17394f}
.fne-overview-7-card span{font-size:10px;color:#6b7e8a}
.fne-overview-7-card.is-low{border-left:3px solid var(--fne-status-low,#2F80ED)}
.fne-overview-7-card.is-high{border-left:3px solid var(--fne-status-high,#D64545)}
.fne-overview-7-card.is-ok{border-left:3px solid var(--fne-status-ok,#16845E)}

@media(max-width:760px){
	.fne-overview-body-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
	.fne-overview-30-grid{grid-template-columns:1fr 1fr}
	.fne-overview-main-nutrients{grid-column:1/-1}
	.fne-overview-attention-grid,
	.fne-overview-food-grid{grid-template-columns:1fr}
}

@media(max-width:640px){
	.fne-overview-v3{gap:14px}
	.fne-overview-profile{
		align-items:flex-start;
		padding:12px;
	}
	.fne-overview-profile-edit{
		padding:6px 9px;
		font-size:10.5px;
	}
	.fne-overview-section-head{
		gap:8px;
		margin-bottom:8px;
	}
	.fne-overview-section-sub{font-size:10px}
	.fne-overview-link-btn{font-size:10px}

	.fne-overview-body-grid{gap:9px}
	.fne-overview-body-card{
		padding:11px;
		border-radius:13px;
	}
	.fne-overview-body-icon{
		width:30px;height:30px;flex-basis:30px;
	}
	.fne-overview-body-icon img{width:17px;height:17px}
	.fne-overview-body-label{font-size:10.5px}
	.fne-overview-body-value{font-size:17px;margin-top:8px}
	.fne-overview-body-sub{font-size:9.5px}

	.fne-overview-panel{padding:12px;border-radius:14px}
	.fne-overview-30-grid{grid-template-columns:1fr 1fr;gap:8px}
	.fne-overview-mini-card,
	.fne-overview-main-nutrients{padding:11px}
	.fne-overview-mini-value{font-size:18px}
	.fne-overview-donut{width:78px;height:78px}
	.fne-overview-donut strong{font-size:15px}
	.fne-overview-nutrient-line{
		grid-template-columns:7px 62px minmax(35px,1fr) auto;
		gap:5px;
		font-size:9.5px;
	}
	.fne-overview-line-meta{font-size:9px}
	.fne-overview-attention-title{font-size:12px}
	.fne-overview-attention-copy{font-size:10px}
	.fne-overview-food-name{font-size:12.5px}
	.fne-overview-food-serving{font-size:10px}
	.fne-overview-7-grid{grid-template-columns:1fr}
}

.fne-overview-nutrient-line.is-warning .fne-overview-dot{background:#D59A26}
.fne-overview-nutrient-line.is-warning .fne-overview-line-fill{background:#D59A26}

/* ==========================================================================
 * v1.5.68 — Mobile App Header + utility menu
 * Desktop ẩn hoàn toàn; mobile tạo header mỏng phía trên chip thành viên.
 * ========================================================================== */
.fne-mobile-app-header{
	display:none;
}

@media(max-width:640px){
	.fne-mobile-app-header{
		position:relative;
		z-index:110;
		display:grid;
		grid-template-columns:42px minmax(0,1fr) 42px;
		align-items:center;
		min-height:52px;
		margin:0 0 8px;
		padding:4px 2px 7px;
		border-bottom:1px solid #e6edf1;
		background:#fff;
	}

	.fne-mobile-menu-button{
		width:38px;
		height:38px;
		display:flex;
		flex-direction:column;
		align-items:center;
		justify-content:center;
		gap:4px;
		padding:0;
		border:0;
		border-radius:11px;
		background:#f6f9fa;
		color:#17394f;
		cursor:pointer;
		-webkit-tap-highlight-color:transparent;
	}
	.fne-mobile-menu-button span{
		width:18px;
		height:2px;
		border-radius:999px;
		background:currentColor;
		transition:transform .18s ease, opacity .18s ease;
	}
	.fne-mobile-app-header.menu-open .fne-mobile-menu-button span:nth-child(1){
		transform:translateY(6px) rotate(45deg);
	}
	.fne-mobile-app-header.menu-open .fne-mobile-menu-button span:nth-child(2){
		opacity:0;
	}
	.fne-mobile-app-header.menu-open .fne-mobile-menu-button span:nth-child(3){
		transform:translateY(-6px) rotate(-45deg);
	}

	.fne-mobile-app-title{
		min-width:0;
		display:flex;
		flex-direction:column;
		align-items:center;
		justify-content:center;
		text-align:center;
		line-height:1.15;
	}
	.fne-mobile-app-title-main{
		max-width:100%;
		overflow:hidden;
		text-overflow:ellipsis;
		white-space:nowrap;
		font-size:15px;
		font-weight:850;
		color:#12384f;
		letter-spacing:.01em;
	}
	.fne-mobile-app-title-sub{
		margin-top:2px;
		max-width:100%;
		overflow:hidden;
		text-overflow:ellipsis;
		white-space:nowrap;
		font-size:9px;
		color:#82909a;
	}
	.fne-mobile-app-header-spacer{
		width:38px;
		height:38px;
	}

	.fne-mobile-menu-backdrop{
		position:fixed;
		inset:0;
		z-index:1;
		display:none;
		background:rgba(13,35,48,.18);
	}
	.fne-mobile-app-header.menu-open .fne-mobile-menu-backdrop{
		display:block;
	}

	.fne-mobile-menu-panel{
		position:absolute;
		left:0;
		top:calc(100% + 6px);
		z-index:2;
		display:none;
		width:min(330px,calc(100vw - 28px));
		padding:8px;
		border:1px solid #dce6eb;
		border-radius:16px;
		background:#fff;
		box-shadow:0 16px 36px rgba(19,52,72,.18);
	}
	.fne-mobile-app-header.menu-open .fne-mobile-menu-panel{
		display:block;
	}

	.fne-mobile-menu-heading{
		display:flex;
		flex-direction:column;
		gap:2px;
		padding:10px 11px 9px;
		border-bottom:1px solid #edf1f3;
		margin-bottom:4px;
	}
	.fne-mobile-menu-heading strong{
		font-size:13px;
		color:#12384f;
	}
	.fne-mobile-menu-heading span{
		font-size:10px;
		color:#7a8b96;
	}

	.fne-mobile-menu-item{
		width:100%;
		display:grid;
		grid-template-columns:30px minmax(0,1fr) 18px;
		align-items:center;
		gap:8px;
		padding:10px 9px;
		border:0;
		border-radius:10px;
		background:transparent;
		color:#17394f;
		text-align:left;
		cursor:pointer;
	}
	.fne-mobile-menu-item:hover,
	.fne-mobile-menu-item:focus{
		background:#f4f8fa;
		outline:none;
	}
	.fne-mobile-menu-item-icon{
		width:28px;
		height:28px;
		display:flex;
		align-items:center;
		justify-content:center;
		border-radius:9px;
		background:#eef6fb;
		color:#2f6fb3;
		font-size:13px;
		font-weight:850;
	}
	.fne-mobile-menu-item-label{
		font-size:12.5px;
		font-weight:720;
	}
	.fne-mobile-menu-item-arrow{
		color:#9aa8b1;
		font-size:19px;
		line-height:1;
		text-align:right;
	}
	.fne-mobile-menu-separator{
		height:1px;
		margin:5px 8px;
		background:#edf1f3;
	}
	.fne-mobile-menu-item.is-logout{
		color:#b53a35;
	}
	.fne-mobile-menu-item.is-logout .fne-mobile-menu-item-icon{
		background:#fff0ef;
		color:#c43c36;
	}

	.fne-mobile-guide{
		font-size:13px;
		line-height:1.55;
		color:#405763;
	}
	.fne-mobile-guide p{
		margin:0 0 8px;
	}
	.fne-mobile-guide ol{
		margin:0;
		padding-left:20px;
	}
	.fne-mobile-guide li{
		margin:5px 0;
	}

	/* Chip thành viên nằm ngay dưới App Header, không tạo khoảng trống dư. */
	.fne-shell-content > .fne-member-chip-wrap,
	.fne-shell-content > .fne-member-chips{
		margin-top:0!important;
	}
}

/* v1.5.68 — Tổng quan theo nhóm tuổi / WHO growth */
.fne-overview-growth-wrap{
	display:flex;
	flex-direction:column;
	gap:10px;
}
.fne-overview-growth-grid{
	grid-template-columns:repeat(3,minmax(0,1fr));
}
.fne-overview-growth-grid.is-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.fne-overview-growth-grid.is-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.fne-overview-growth-card{
	background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
}
.fne-overview-growth-badge{
	display:inline-flex;
	align-self:flex-start;
	margin-top:7px;
	padding:4px 8px;
	border-radius:999px;
	font-size:10px;
	font-weight:800;
	line-height:1.2;
}
.fne-overview-growth-badge.is-ok{
	background:var(--fne-status-ok-bg,#EDF9F4);
	color:var(--fne-status-ok-text,#126A4D);
}
.fne-overview-growth-badge.is-warning{
	background:#FFF6E6;
	color:#A86400;
}
.fne-overview-growth-badge.is-alert{
	background:var(--fne-status-high-bg,#FFF2F2);
	color:var(--fne-status-high-text,#B53232);
}
.fne-overview-growth-note{
	padding:9px 11px;
	border-radius:10px;
	background:#f7fafc;
	color:#748691;
	font-size:10px;
	line-height:1.45;
}
.fne-metric-icon-growth_height,
.fne-metric-icon-growth_weight{
	background:#eef5ff;
}

@media(max-width:760px){
	.fne-overview-growth-grid.is-4{grid-template-columns:repeat(2,minmax(0,1fr))}
	.fne-overview-growth-grid.is-3{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
}
@media(max-width:430px){
	.fne-overview-growth-grid.is-4{grid-template-columns:repeat(2,minmax(0,1fr))}
	.fne-overview-growth-grid.is-3{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
	.fne-overview-growth-card .fne-overview-body-value{
		font-size:16px;
	}
	.fne-overview-growth-card .fne-overview-body-label{
		font-size:10px;
	}
}

/* ==========================================================================
 * v1.5.68 — Overview Context Registry: pregnancy/lactation
 * ========================================================================== */
.fne-overview-physiology-wrap{
	display:flex;
	flex-direction:column;
	gap:11px;
}
.fne-overview-physiology-summary{
	display:grid;
	grid-template-columns:repeat(3,minmax(0,1fr));
	gap:10px;
}
.fne-overview-physiology-card{
	display:flex;
	flex-direction:column;
	gap:5px;
	min-width:0;
	padding:13px 14px;
	border:1px solid #dce6eb;
	border-radius:14px;
	background:#fff;
}
.fne-overview-physiology-card.is-primary{
	border-color:#cfe4dc;
	background:#f6fbf8;
}
.fne-overview-physiology-card span{
	font-size:10.5px;
	font-weight:750;
	color:#657a87;
}
.fne-overview-physiology-card strong{
	font-size:17px;
	line-height:1.25;
	color:#12374f;
}
.fne-overview-physiology-card small{
	font-size:9px;
	line-height:1.4;
	color:#82909a;
}
.fne-overview-physiology-priority{
	padding:13px;
	border:1px solid #dce6eb;
	border-radius:14px;
	background:linear-gradient(180deg,#fbfdff,#fff);
}
.fne-overview-physiology-nutrient-grid{
	display:grid;
	grid-template-columns:repeat(3,minmax(0,1fr));
	gap:8px;
	margin-top:8px;
}
.fne-overview-physiology-nutrient{
	display:flex;
	flex-direction:column;
	gap:4px;
	min-width:0;
	padding:10px 11px;
	border-radius:11px;
	background:#f5f9fb;
}
.fne-overview-physiology-nutrient-label{
	font-size:9.5px;
	color:#6f818c;
}
.fne-overview-physiology-nutrient strong{
	font-size:11px;
	line-height:1.3;
	color:#14384f;
	overflow-wrap:anywhere;
}
.fne-overview-physiology-note{
	padding:9px 11px;
	border-radius:10px;
	background:#f7fafc;
	color:#748691;
	font-size:10px;
	line-height:1.45;
}
.fne-overview-physiology-wrap.is-pregnancy .fne-overview-physiology-card.is-primary{
	border-color:#d9d1f3;
	background:#f8f5ff;
}
.fne-overview-physiology-wrap.is-lactation .fne-overview-physiology-card.is-primary{
	border-color:#cfe4dc;
	background:#f3fbf7;
}

@media(max-width:640px){
	.fne-overview-physiology-summary{
		grid-template-columns:repeat(3,minmax(0,1fr));
		gap:6px;
	}
	.fne-overview-physiology-nutrient-grid{
		grid-template-columns:repeat(2,minmax(0,1fr));
	}
	.fne-overview-physiology-card{
		padding:11px;
	}
	.fne-overview-physiology-card strong{
		font-size:15px;
	}
}

/* ==========================================================================
 * v1.5.68 — Global Member Context
 * Một selector dùng chung cho Tổng quan / Hôm nay / Phân tích / Báo cáo.
 * ========================================================================== */
.fne-member-chips{
	display:flex;
	align-items:stretch;
	flex-wrap:wrap;
	gap:7px;
	margin:0 0 8px;
}
.fne-member-chip{
	appearance:none;
	-webkit-appearance:none;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-height:38px;
	margin:0!important;
	padding:6px 13px;
	border:1px solid var(--fne-border);
	border-radius:999px;
	background:var(--fne-bg);
	color:var(--fne-text);
	font:inherit;
	font-size:13px;
	line-height:1.15;
	text-align:center;
	cursor:pointer;
	vertical-align:middle;
}
.fne-member-chip-content{
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	gap:3px;
	min-width:0;
}
.fne-member-chip-name{
	display:block;
	max-width:100%;
	white-space:nowrap;
}
.fne-member-chip-status{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	gap:4px;
	max-width:100%;
	padding:2px 6px;
	border-radius:999px;
	background:#f3efff;
	color:#6b45a8;
	font-size:8.5px;
	font-weight:800;
	line-height:1.15;
	white-space:nowrap;
}
.fne-member-chip-status.is-pregnancy{
	background:#f2ecff;
	color:#6c42a6;
}
.fne-member-chip-status.is-lactation{
	background:#eaf8f2;
	color:#167354;
}
.fne-member-chip-status.is-disease_contexts{
	background:#fff0ef;
	color:#b53b35;
}
.fne-member-chip-status.is-goal_contexts{
	background:#edf5ff;
	color:#246cbd;
}
.fne-member-chip-status-more{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-width:15px;
	height:15px;
	padding:0 3px;
	border-radius:999px;
	background:rgba(255,255,255,.72);
	font-size:8px;
}
.fne-member-chip.active{
	background:var(--fne-primary);
	color:#fff;
	border-color:var(--fne-primary);
	box-shadow:0 2px 7px rgba(16,126,88,.12);
}
.fne-member-chip.active .fne-member-chip-status{
	background:rgba(255,255,255,.18);
	color:#fff;
}
.fne-member-chip.active .fne-member-chip-status-more{
	background:rgba(255,255,255,.22);
	color:#fff;
}
.fne-member-chip-add{
	background:#fff;
	color:var(--fne-text);
	font-weight:500;
}

@media(max-width:640px){
	.fne-member-chips{
		flex-wrap:nowrap;
		overflow-x:auto;
		overscroll-behavior-x:contain;
		-webkit-overflow-scrolling:touch;
		scrollbar-width:none;
		padding:1px 2px 3px;
		margin-bottom:8px;
	}
	.fne-member-chips::-webkit-scrollbar{display:none}
	.fne-member-chip{
		flex:0 0 auto;
		min-height:42px;
		padding:6px 12px;
		font-size:12px;
	}
	.fne-member-chip-status{
		font-size:8px;
	}
}

/* v1.5.68 — Member selector clean + context moved below selector */
.fne-member-chip,
.fne-member-chip-name{
	text-transform:none!important;
	letter-spacing:normal!important;
}
.fne-member-chip{
	font-weight:500;
}
.fne-member-chip.active{
	font-weight:650;
}
.fne-member-chip-content{
	gap:0;
}

/* Trạng thái đặc biệt nằm ở khung thông tin/bên dưới selector, không nằm trong chip tên. */
.fne-active-member-contexts{
	display:flex;
	flex-wrap:wrap;
	align-items:center;
	gap:6px;
	margin-top:7px;
}
.fne-active-member-context-badge{
	display:inline-flex;
	align-items:center;
	min-height:24px;
	padding:4px 9px;
	border-radius:999px;
	font-size:10.5px;
	line-height:1.2;
	font-weight:800;
	background:#f3efff;
	color:#67409e;
	border:1px solid #e2d6fb;
}
.fne-active-member-context-badge.is-pregnancy{
	background:#f4efff;
	color:#6840a0;
	border-color:#dfd2f7;
}
.fne-active-member-context-badge.is-lactation{
	background:#eef9f4;
	color:#176f52;
	border-color:#d2ecdf;
}
.fne-active-member-context-badge.is-disease_contexts{
	background:#fff1ef;
	color:#b53a35;
	border-color:#f5d5d1;
}
.fne-active-member-context-badge.is-goal_contexts{
	background:#eef6ff;
	color:#2469b6;
	border-color:#d5e7fb;
}

/* Hôm nay / Phân tích / Báo cáo: trạng thái đang áp dụng ngay dưới selector. */
.fne-shared-member-context-strip{
	display:flex;
	align-items:center;
	flex-wrap:wrap;
	gap:7px;
	margin:0 0 12px;
	padding:8px 10px;
	border:1px solid #e2e9ed;
	border-radius:11px;
	background:#fafcfd;
}
.fne-shared-member-context-strip .fne-active-member-contexts{
	margin-top:0;
}
.fne-shared-member-context-label{
	font-size:10.5px;
	color:#71828d;
}

/* Hồ sơ Tổng quan: badge context nổi rõ nhưng không lấn át dữ liệu cơ thể. */
.fne-overview-profile .fne-active-member-contexts{
	margin-top:8px;
}
.fne-overview-profile .fne-active-member-context-badge{
	font-size:11px;
	min-height:26px;
	padding:5px 10px;
}

@media(max-width:640px){
	.fne-active-member-context-badge{
		font-size:10px;
	}
	.fne-shared-member-context-strip{
		margin-bottom:10px;
		padding:7px 9px;
	}
}

/* v1.5.70 — Nhu cầu dinh dưỡng / Active Member Context */
.fne-needs-heading{margin:8px 0 14px}.fne-needs-heading .fne-section-title{margin-bottom:4px}.fne-needs-heading p{margin:0;color:var(--fne-muted);font-size:14px}.fne-nutrition-context{border:1px solid #dbe7e1;border-radius:16px;padding:16px 18px;margin:0 0 16px;background:#fbfdfc}.fne-nutrition-context-kicker{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--fne-muted);margin-bottom:5px}.fne-nutrition-context-main{font-size:18px;font-weight:800;color:var(--fne-text)}.fne-nutrition-context-sub{font-size:13px;color:var(--fne-muted);margin-top:5px}.fne-context-qa{margin-top:18px;border:1px dashed #b7c9c0;border-radius:14px;background:#f7faf8}.fne-context-qa summary{cursor:pointer;padding:13px 16px;font-weight:800}.fne-context-qa-grid{padding:0 16px 14px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 18px}.fne-context-qa-row{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #e8efeb;padding:7px 0;font-size:13px}.fne-context-qa-row span{text-align:right;color:var(--fne-muted)}@media(max-width:640px){.fne-context-qa-grid{grid-template-columns:1fr}.fne-nutrition-context-main{font-size:16px}}

/* v1.5.70 — Nhu cầu dinh dưỡng / Active Member Context */
.fne-needs-heading{margin:8px 0 14px}.fne-needs-heading .fne-section-title{margin-bottom:4px}.fne-needs-heading p{margin:0;color:var(--fne-muted);font-size:14px}.fne-nutrition-context{border:1px solid #dbe7e1;border-radius:16px;padding:16px 18px;margin:0 0 16px;background:#fbfdfc}.fne-nutrition-context-kicker{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--fne-muted);margin-bottom:5px}.fne-nutrition-context-main{font-size:18px;font-weight:800;color:var(--fne-text)}.fne-nutrition-context-sub{font-size:13px;color:var(--fne-muted);margin-top:5px}.fne-context-qa{margin-top:18px;border:1px dashed #b7c9c0;border-radius:14px;background:#f7faf8}.fne-context-qa summary{cursor:pointer;padding:13px 16px;font-weight:800}.fne-context-qa-grid{padding:0 16px 14px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 18px}.fne-context-qa-row{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #e8efeb;padding:7px 0;font-size:13px}.fne-context-qa-row span{text-align:right;color:var(--fne-muted)}@media(max-width:640px){.fne-context-qa-grid{grid-template-columns:1fr}.fne-nutrition-context-main{font-size:16px}}

/* v1.5.72 — metric acronym/name is visible next to the medical icon. */
.fne-metric-header{
	display:flex;
	align-items:center;
	gap:9px;
	margin-bottom:10px;
	min-height:42px;
}
.fne-metric-header .fne-guest-metric-icon{
	margin-bottom:0;
}
.fne-metric-header-label{
	font-size:13px;
	line-height:1.2;
	font-weight:800;
	letter-spacing:.02em;
	color:#44596b;
}
@media (max-width:640px){
	.fne-metric-header{gap:7px;margin-bottom:8px;min-height:36px}
	.fne-metric-header-label{font-size:12px}
}


/* v1.5.73 — shared FNE layout + unified 6 daily needs cards. */
.fne-app{
	width:100%;
	max-width:1180px;
	margin-left:auto;
	margin-right:auto;
	box-sizing:border-box;
}
.fne-app *, .fne-app *::before, .fne-app *::after{box-sizing:border-box}

/* Member needs: BMI/BMR/TDEE are body metrics; water belongs to daily needs. */
.fne-member-needs .fne-hero-stats-v2-three{
	grid-template-columns:repeat(3,minmax(0,1fr));
}

/* Six core needs always travel together: Energy, Protein, Carb, Fat, Fiber, Water. */
.fne-daily-needs-grid{
	grid-template-columns:repeat(3,minmax(0,1fr));
	gap:14px;
}
.fne-daily-needs-grid .fne-macro-card{
	min-width:0;
	min-height:150px;
}
.fne-daily-needs-section .fne-macro-intro{max-width:900px}

@media (max-width:900px){
	.fne-app{max-width:100%;padding-left:12px;padding-right:12px}
	.fne-member-needs .fne-hero-stats-v2-three{grid-template-columns:repeat(3,minmax(0,1fr))}
	.fne-daily-needs-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
}
@media (max-width:640px){
	.fne-app{padding-left:8px;padding-right:8px}
	.fne-member-needs .fne-hero-stats-v2-three{grid-template-columns:1fr}
	.fne-daily-needs-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
	.fne-daily-needs-grid .fne-macro-card{padding:11px 10px;min-height:0}
	.fne-daily-needs-grid .fne-macro-card-name{font-size:12px}
	.fne-daily-needs-grid .fne-macro-card-value{font-size:16px}
	.fne-daily-needs-grid .fne-macro-card-explain{font-size:10.5px}
}
@media (max-width:340px){
	.fne-daily-needs-grid{grid-template-columns:1fr}
}


/* v1.5.73 — Guest and Member share the same outer content grid. Input form stays readable. */
.fne-guest-form{max-width:780px;margin-left:auto;margin-right:auto}
.fne-hero-stats-v2-three{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:640px){.fne-hero-stats-v2-three{grid-template-columns:1fr}}

/* v1.5.79 — administrator-only WATER pipeline diagnostic. */
.fne-water-diagnostic { margin-top: 18px; border-color: #d59b2d; background: #fffdf6; }
.fne-water-diagnostic > summary { color: #7a4a00; font-weight: 700; cursor: pointer; }
.fne-diagnostic-pre { margin: 6px 0; padding: 10px; overflow: auto; white-space: pre-wrap; word-break: break-word; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; font-size: 12px; line-height: 1.45; }

/* v1.5.85 — Phase 2 Safety visibility + shared Needs renderer on Overview. */
.fne-safety-rules-panel{
	margin:18px 0;
	padding:16px;
	border:1px solid #f0d7a5;
	border-radius:14px;
	background:#fffdf8;
}
.fne-safety-rules-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}
.fne-safety-rules-head .fne-section-title{margin:0 0 4px}
.fne-safety-rules-sub{font-size:13px;color:var(--fne-muted);line-height:1.45}
.fne-safety-rules-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.fne-safety-rule-card{border:1px solid #e3e8eb;border-radius:12px;background:#fff;padding:12px 13px;min-width:0}
.fne-safety-rule-card.is-block{border-left:4px solid #c84444;background:#fffafa}
.fne-safety-rule-card.is-warn{border-left:4px solid #d69a1f;background:#fffdf7}
.fne-safety-rule-top{display:flex;align-items:center;margin-bottom:7px}
.fne-safety-rule-badge{display:inline-flex;align-items:center;min-height:23px;padding:3px 8px;border-radius:999px;font-size:10.5px;font-weight:800;background:#f4f5f6;color:#48545d}
.fne-safety-rule-card.is-block .fne-safety-rule-badge{background:#fdecec;color:#a52d2d}
.fne-safety-rule-card.is-warn .fne-safety-rule-badge{background:#fff0cf;color:#8a5a00}
.fne-safety-rule-message{font-size:13px;font-weight:700;line-height:1.45;color:var(--fne-text)}
.fne-safety-rule-source{font-size:10.5px;color:var(--fne-muted);margin-top:7px;line-height:1.4}
.fne-safety-rules-note{margin-top:10px;padding-top:10px;border-top:1px solid #efe7d7;font-size:11px;line-height:1.45;color:var(--fne-muted)}
.fne-overview-needs-embedded{margin:20px 0 24px}
.fne-overview-needs-embedded > .fne-overview-section-head{margin-bottom:10px}
@media(max-width:760px){.fne-safety-rules-grid{grid-template-columns:1fr}.fne-safety-rules-panel{padding:12px}.fne-safety-rule-message{font-size:12px}}

/* v1.5.86 — Life-stage concerns + shared priority layer on Overview. */
.fne-life-stage-focus-panel,
.fne-overview-priority-panel{
	margin:18px 0;
	padding:16px;
	border:1px solid #dce6eb;
	border-radius:14px;
	background:#fff;
}
.fne-life-stage-focus-panel .fne-overview-section-head,
.fne-overview-priority-panel .fne-overview-section-head{margin-bottom:12px}
.fne-life-stage-focus-grid{
	display:grid;
	grid-template-columns:repeat(2,minmax(0,1fr));
	gap:10px;
}
.fne-life-stage-focus-card{
	min-width:0;
	padding:12px 13px;
	border:1px solid #e1e9ed;
	border-radius:12px;
	background:#fbfdfe;
}
.fne-life-stage-focus-card.is-attention{
	border-left:4px solid #d49a25;
	background:#fffdf7;
}
.fne-life-stage-focus-card-top{display:flex;align-items:center;min-height:22px;margin-bottom:5px}
.fne-life-stage-focus-index,
.fne-life-stage-focus-badge{
	display:inline-flex;
	align-items:center;
	min-height:21px;
	padding:2px 7px;
	border-radius:999px;
	font-size:9.5px;
	font-weight:800;
	background:#edf7f2;
	color:#15734d;
}
.fne-life-stage-focus-card.is-attention .fne-life-stage-focus-badge{background:#fff0cf;color:#8a5a00}
.fne-life-stage-focus-title{display:block;font-size:13px;line-height:1.35;color:var(--fne-text);margin-bottom:4px}
.fne-life-stage-focus-message{font-size:11px;line-height:1.48;color:var(--fne-muted)}
.fne-overview-priority-panel{background:linear-gradient(180deg,#fbfdff,#fff)}
.fne-overview-priority-grid{margin-top:0}
@media(max-width:760px){
	.fne-life-stage-focus-panel,.fne-overview-priority-panel{padding:12px;margin:14px 0}
	.fne-life-stage-focus-grid{grid-template-columns:1fr}
	.fne-overview-priority-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:420px){.fne-overview-priority-grid{grid-template-columns:1fr}}

/* v1.5.87 — compact Overview card rules. */
@media(max-width:760px){
  .fne-overview-v3[data-overview-context=adult] .fne-overview-body-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
}
@media(max-width:430px){
  .fne-overview-v3[data-overview-context=adult] .fne-overview-body-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .fne-overview-v3[data-overview-context=adult] .fne-overview-body-card{padding:9px 7px}
  .fne-overview-v3[data-overview-context=adult] .fne-overview-body-icon{width:27px;height:27px;flex-basis:27px}
  .fne-overview-v3[data-overview-context=adult] .fne-overview-body-label{font-size:9.5px}
  .fne-overview-v3[data-overview-context=adult] .fne-overview-body-value{font-size:14px}
  .fne-overview-v3[data-overview-context=adult] .fne-overview-body-sub{font-size:8.5px}
  .fne-overview-growth-grid.is-3 .fne-overview-body-card{padding:9px 7px}
  .fne-overview-growth-grid.is-3 .fne-overview-body-icon{width:27px;height:27px;flex-basis:27px}
  .fne-overview-physiology-card{padding:9px 7px}
  .fne-overview-physiology-card span{font-size:8.5px}
  .fne-overview-physiology-card strong{font-size:12px}
  .fne-overview-physiology-card small{font-size:7.5px}
}


/* v1.5.88 — Overview cleanup: full-width 3-card adult row. */
.fne-overview-v3[data-overview-context=adult] .fne-overview-body-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
}

/* v1.5.89 — Unified nutrient signals.
 * ★ vàng = nutrient ưu tiên theo Active Member Context.
 * ⚠ cam/đỏ = nutrient có safety warning đã resolve.
 * Intake status colors remain independent elsewhere. */
.fne-nutrient-signal{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	flex:0 0 auto;
	line-height:1;
	font-weight:800;
	margin-right:5px;
	vertical-align:baseline;
}
.fne-nutrient-signal-priority{
	color:#F4B400;
	font-size:16px;
	text-shadow:0 0 0.01px currentColor;
}
.fne-nutrient-signal-warning{
	color:#D97706;
	font-size:15px;
}
.fne-compact-name .fne-nutrient-signal{margin-right:6px}
.fne-macro-card-name .fne-nutrient-signal{transform:translateY(-1px)}


/* v1.5.95 — Member-aware Food Safety / Priority */
.fne-food-search-label {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
}
.fne-food-suitability-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	line-height: 1;
	flex: 0 0 auto;
}
.fne-food-priority-badge {
	color: #d79a00;
	font-size: 16px;
}
.fne-food-warning-badge {
	color: #c0392b;
	font-size: 15px;
}


/* v1.6.5 — Analysis Try Add: explicit meal choice */
.fne-food-preview-meal {
	margin-top: 10px;
}
.fne-food-preview-meal-label {
	display: block;
	font-weight: 700;
	margin-bottom: 6px;
}
.fne-food-preview-meal-select {
	max-width: 280px;
}


/* v1.6.6 — Analysis add-to-meal popup flow */
.fne-meal-choice-dialog,
.fne-add-confirm-dialog {
	width: min(520px, calc(100vw - 32px));
	text-align: left;
}
.fne-meal-choice-summary {
	margin: 0 0 4px;
	font-weight: 700;
	color: var(--fne-text);
}
.fne-meal-choice-help {
	margin: 0 0 14px;
	color: var(--fne-muted);
}
.fne-meal-choice-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 12px 0 16px;
}
.fne-meal-choice-btn {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 58px;
	padding: 12px 14px;
	border: 1px solid var(--fne-border);
	border-radius: 12px;
	background: #fff;
	color: var(--fne-text);
	cursor: pointer;
	font: inherit;
	text-align: left;
}
.fne-meal-choice-btn:hover,
.fne-meal-choice-btn:focus {
	border-color: var(--fne-green);
	box-shadow: 0 0 0 2px rgba(31, 132, 91, .08);
	outline: 0;
}
.fne-meal-choice-icon {
	font-size: 20px;
	line-height: 1;
}
.fne-modal-cancel {
	width: 100%;
}
.fne-add-confirm-text {
	font-size: 16px;
	line-height: 1.55;
	margin: 8px 0 18px;
}
.fne-add-confirm-actions {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
}
@media (max-width: 560px) {
	.fne-meal-choice-grid {
		grid-template-columns: 1fr;
	}
	.fne-add-confirm-actions {
		flex-direction: column-reverse;
	}
	.fne-add-confirm-actions .fne-btn {
		width: 100%;
	}
}


/* v1.6.7 — Today micronutrient Active Member priority */
.fne-today-micro-name {
	display: flex;
	align-items: center;
	gap: 6px;
}
.fne-today-priority-star {
	color: #d89a00;
	font-size: 15px;
	line-height: 1;
	flex: 0 0 auto;
}


/* v1.6.9 — Meal Builder two-line food search result */
.fne-search-result-item {
	padding-top: 9px;
	padding-bottom: 9px;
}
.fne-food-search-label {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}
.fne-food-search-name-line {
	display: flex;
	align-items: center;
	gap: 7px;
	line-height: 1.35;
}
.fne-food-search-highlights {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 5px;
	padding-left: 22px;
	font-size: 11px;
	line-height: 1.25;
	color: var(--fne-muted);
}
.fne-food-search-highlights-label {
	margin-right: 1px;
}
.fne-food-search-highlight-chip {
	display: inline-flex;
	align-items: center;
	padding: 2px 6px;
	border-radius: 999px;
	background: #f2f7f7;
	color: #32666a;
	white-space: nowrap;
}
.fne-food-search-highlight-chip.is-priority {
	background: #fff8df;
	color: #8a6500;
}
@media (max-width: 600px) {
	.fne-food-search-highlights {
		padding-left: 0;
		font-size: 10.5px;
	}
}


/* v1.6.10 — Meal Builder search hierarchy: food name first, nutrients secondary */
.fne-search-result-item,
.fne-food-search-label,
.fne-food-search-name-line,
.fne-food-search-highlights {
	text-align: left !important;
	justify-content: flex-start !important;
}

.fne-food-search-label {
	width: 100%;
	align-items: flex-start !important;
}

.fne-food-search-name-line {
	width: 100%;
	font-size: 15px;
	font-weight: 500;
	color: inherit;
}

.fne-food-search-highlights {
	width: 100%;
	padding-left: 0 !important;
	font-size: 11px;
	line-height: 1.25;
	color: var(--fne-muted);
}

.fne-food-search-highlights-label {
	font-size: 11px;
	font-weight: 400;
	color: var(--fne-muted);
}

.fne-food-search-highlight-chip,
.fne-food-search-highlight-chip.is-priority {
	font-size: 11px;
	font-weight: 400;
	padding: 2px 6px;
	background: #f2f7f7;
	color: #426b70;
}

@media (max-width: 600px) {
	.fne-food-search-name-line {
		font-size: 15px;
	}
	.fne-food-search-highlights,
	.fne-food-search-highlights-label,
	.fne-food-search-highlight-chip,
	.fne-food-search-highlight-chip.is-priority {
		font-size: 10.5px;
	}
}


/* v1.6.11 — auto-save Today + locked past logs */
.fne-past-log-readonly {
	margin-top: 10px;
	padding: 9px 12px;
	border-radius: 10px;
	background: #f7f8f9;
	color: var(--fne-muted);
	font-size: 12px;
}


/* v1.6.12 — meal-scoped staging UX */
.fne-meal-draft-list { margin-top:10px; border-top:1px solid var(--fne-border); }
.fne-meal-commit-bar { margin-top:12px; padding-top:10px; border-top:1px solid var(--fne-border); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.fne-meal-commit-info { font-size:12px; color:var(--fne-muted); }
.fne-meal-commit-btn { white-space:nowrap; }
@media (max-width:600px) { .fne-meal-commit-bar { align-items:stretch; flex-direction:column; } .fne-meal-commit-btn { width:100%; } }


/* ==========================================================
 * v1.6.14 — TODAY SUMMARY: 6 INDICATORS ALWAYS TOGETHER
 * Năng lượng · Đạm · Bột · Béo · Xơ · Nước
 * Desktop: 3 x 2
 * Mobile:  2 x 3
 * ========================================================== */
.fne-today-summary-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

.fne-today-macro-card,
.fne-today-macro-energy {
	grid-column: auto;
	display: block;
	padding: 16px 17px 14px;
	min-height: 176px;
}

.fne-today-macro-water {
	--fne-card-accent: #1683b6;
	--fne-card-accent-soft: #eaf7fc;
}

.fne-today-macro-energy .fne-today-macro-top,
.fne-today-macro-card .fne-today-macro-top {
	align-items: flex-start;
}

.fne-today-macro-energy .fne-today-macro-progressline,
.fne-today-macro-card .fne-today-macro-progressline {
	margin-top: 14px;
}

.fne-today-macro-energy .fne-today-macro-remaining,
.fne-today-macro-card .fne-today-macro-remaining {
	grid-column: auto;
	margin-top: 7px;
	padding-left: 0;
}

.fne-today-macro-energy .fne-today-macro-icon,
.fne-today-macro-card .fne-today-macro-icon {
	width: 48px;
	height: 48px;
	flex-basis: 48px;
}

.fne-today-macro-energy .fne-today-macro-value strong,
.fne-today-macro-card .fne-today-macro-value strong {
	font-size: 18px;
}

@media (max-width: 980px) {
	.fne-today-summary-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.fne-today-macro-energy {
		grid-column: auto;
	}
}

@media (max-width: 640px) {
	.fne-today-summary-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 9px;
	}

	.fne-today-macro-card,
	.fne-today-macro-energy {
		grid-column: auto;
		display: block;
		min-height: 158px;
		padding: 11px 10px 10px;
	}

	.fne-today-macro-card .fne-today-macro-top,
	.fne-today-macro-energy .fne-today-macro-top {
		flex-direction: column;
		align-items: stretch;
		gap: 7px;
	}

	.fne-today-macro-card .fne-today-macro-identity,
	.fne-today-macro-energy .fne-today-macro-identity {
		align-items: flex-start;
		gap: 7px;
	}

	.fne-today-macro-card .fne-today-macro-icon,
	.fne-today-macro-energy .fne-today-macro-icon {
		width: 36px;
		height: 36px;
		flex-basis: 36px;
	}

	.fne-today-macro-card .fne-today-macro-name,
	.fne-today-macro-energy .fne-today-macro-name {
		font-size: 12px;
		line-height: 1.18;
	}

	.fne-today-macro-card .fne-today-macro-value,
	.fne-today-macro-energy .fne-today-macro-value {
		display: block;
		font-size: 10px;
		line-height: 1.28;
	}

	.fne-today-macro-card .fne-today-macro-value strong,
	.fne-today-macro-energy .fne-today-macro-value strong {
		display: block;
		margin-bottom: 2px;
		font-size: 15.5px;
	}

	.fne-today-macro-card .fne-today-status-badge,
	.fne-today-macro-energy .fne-today-status-badge {
		align-self: flex-start;
		padding: 4px 7px;
		font-size: 9.5px;
	}

	.fne-today-macro-card .fne-today-macro-progressline,
	.fne-today-macro-energy .fne-today-macro-progressline {
		gap: 6px;
		margin-top: 9px;
	}

	.fne-today-macro-card .fne-today-macro-progressline .fne-progress,
	.fne-today-macro-energy .fne-today-macro-progressline .fne-progress {
		height: 6px;
	}

	.fne-today-macro-card .fne-today-macro-percent,
	.fne-today-macro-energy .fne-today-macro-percent {
		min-width: 26px;
		font-size: 11px;
	}

	.fne-today-macro-card .fne-today-macro-remaining,
	.fne-today-macro-energy .fne-today-macro-remaining {
		margin-top: 5px;
		font-size: 10px;
		line-height: 1.25;
	}
}


/* v1.6.15 — Meal Builder search field must read as an action, not a saved food row */
.fne-add-food-form > .fne-food-search-input {
	margin-top: 10px;
	min-height: 44px;
	border: 1.5px solid #9fcab9;
	border-radius: 11px;
	background: #fbfffd;
	box-shadow: inset 0 0 0 1px rgba(31,132,91,.03);
	font-weight: 500;
}
.fne-add-food-form > .fne-food-search-input:focus {
	border-color: var(--fne-green);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(31,132,91,.10);
	outline: none;
}
.fne-add-food-form > .fne-food-search-input::placeholder {
	color: #6f8580;
	font-weight: 500;
}

/* v1.6.22 — Toast sau khi commit bữa ăn và reload */
.fne-after-reload-toast{
  position:fixed;
  top:22px;
  left:50%;
  transform:translate(-50%,-10px);
  z-index:999999;
  min-width:300px;
  max-width:calc(100vw - 32px);
  padding:12px 16px;
  border:1px solid #B9E2D2;
  border-radius:12px;
  background:#fff;
  box-shadow:0 10px 30px rgba(16,52,43,.16);
  color:#123B31;
  opacity:0;
  transition:opacity .2s ease,transform .2s ease;
  pointer-events:none;
}
.fne-after-reload-toast.is-visible{opacity:1;transform:translate(-50%,0)}
.fne-after-reload-toast-title{font-weight:800;font-size:14px;line-height:1.35;color:#126A4D}
.fne-after-reload-toast-subtitle{margin-top:3px;font-size:12px;line-height:1.4;color:#536B65}
@media (max-width:600px){
  .fne-after-reload-toast{top:12px;min-width:0;width:calc(100vw - 24px);padding:11px 14px}
}

/* Analysis v2 — Active Member Priority + Safety + starred daily review (v1.6.30) */
.fne-analysis-stage-panel{border:1px solid #d8e5ee;border-radius:16px;background:#fbfdff;padding:15px 16px}
.fne-analysis-stage-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:12px}
.fne-analysis-stage-context{display:inline-flex;margin-top:5px;padding:4px 9px;border-radius:999px;background:#f0ecff;color:#6548a8;font-size:12px;font-weight:700}
.fne-analysis-stage-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:12px}
.fne-analysis-stage-box{border:1px solid #e2e8ef;border-radius:13px;background:#fff;padding:13px 14px}
.fne-analysis-stage-box h3{margin:0 0 10px;font-size:14px;color:#17324d}
.fne-analysis-priority-list{display:flex;flex-wrap:wrap;gap:7px}
.fne-analysis-priority-chip{display:inline-flex;align-items:center;padding:6px 9px;border-radius:999px;background:#fff8df;border:1px solid #f4dda0;color:#6b5310;font-size:12px;font-weight:700}
.fne-analysis-safety-list{margin:0;padding-left:20px;display:grid;gap:7px;color:#563a36;font-size:12px;line-height:1.45}
.fne-analysis-safety-none{font-size:12px;color:#60727a;line-height:1.5}
.fne-analysis-section-sub{margin:-4px 0 11px;font-size:12px;line-height:1.5;color:#60727a}
.fne-analysis-priority-today .fne-analysis-attention-name{color:#624b00}
@media(max-width:760px){.fne-analysis-stage-grid{grid-template-columns:1fr}.fne-analysis-stage-panel{padding:12px 10px}.fne-analysis-priority-chip{font-size:11px}}

/* v1.6.31 — Analysis v2.1: narrative priority + balanced desktop + priority progress cards */
.fne-analysis-stage-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:14px}
.fne-analysis-stage-box.priority{background:#fffdf7;border-color:#eee3bd}
.fne-analysis-stage-box.safety{background:#fffdfc;border-color:#eadfdd}
.fne-analysis-priority-narrative{margin:0;color:#34495a;font-size:13px;line-height:1.75}
.fne-analysis-priority-narrative strong{color:#6d5405;font-weight:800}
.fne-analysis-priority-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.fne-analysis-priority-card{min-width:0;padding:12px 13px;border-radius:13px;border:1px solid #dfe7ee;box-shadow:0 2px 8px rgba(29,55,82,.03)}
.fne-analysis-priority-card.low{background:#f2f7ff;border-color:#d7e6fb}
.fne-analysis-priority-card.ok{background:#f1faf6;border-color:#d8eee4}
.fne-analysis-priority-card.high{background:#fff4f4;border-color:#f0dddd}
.fne-analysis-priority-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.fne-analysis-priority-card-name{font-size:13px;font-weight:800;line-height:1.35;color:#20384f}
.fne-analysis-priority-card-badge{flex:0 0 auto;padding:3px 8px;border-radius:999px;font-size:10px;font-weight:800;line-height:1.3}
.fne-analysis-priority-card-badge.low{background:#e5efff;color:#1764b5}
.fne-analysis-priority-card-badge.ok{background:#dff4e9;color:#19734e}
.fne-analysis-priority-card-badge.high{background:#ffe5e5;color:#b83d3d}
.fne-analysis-priority-card-values{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 9px;margin-top:8px}
.fne-analysis-priority-card-values strong{font-size:15px;color:#17324d}
.fne-analysis-priority-card-values span{font-size:10.5px;color:#6b7b89}
.fne-analysis-priority-progress{height:7px;margin-top:10px;border-radius:999px;background:#dfe6ec;overflow:hidden}
.fne-analysis-priority-progress-bar{height:100%;border-radius:inherit;transition:width .25s ease}
.fne-analysis-priority-progress-bar.low{background:#2f79d8}
.fne-analysis-priority-progress-bar.ok{background:#2b9a6a}
.fne-analysis-priority-progress-bar.high{background:#df5656}
.fne-analysis-priority-card-note{margin-top:7px;font-size:10.5px;line-height:1.35;color:#637382}
.fne-analysis-priority-card.low .fne-analysis-priority-card-note{color:#2567a9}
.fne-analysis-priority-card.ok .fne-analysis-priority-card-note{color:#257352}
.fne-analysis-priority-card.high .fne-analysis-priority-card-note{color:#b44848}
@media(max-width:980px){.fne-analysis-priority-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.fne-analysis-stage-grid,.fne-analysis-priority-grid{grid-template-columns:1fr}.fne-analysis-priority-narrative{font-size:12px;line-height:1.65}}

/* v1.6.32 — Analysis copy polish + consistent stars + compact stage balance */
.fne-analysis-stage-grid{grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);gap:14px;align-items:stretch}
.fne-analysis-stage-box{height:100%;box-sizing:border-box}
.fne-analysis-priority-narrative{font-size:13px;line-height:1.8;color:#334b5d}
.fne-analysis-priority-narrative strong{color:#6a5200}
.fne-analysis-safety-intro{margin:0 0 8px;color:#5d4a46;font-size:12px;line-height:1.55}
.fne-analysis-safety-list{gap:6px;line-height:1.5}
.fne-analysis-priority-card-name{display:flex;align-items:center;gap:6px}
.fne-analysis-priority-card-name .fne-today-priority-star{font-size:14px}
@media(max-width:760px){.fne-analysis-stage-grid{grid-template-columns:1fr}.fne-analysis-stage-box{height:auto}}

/* v1.6.41 — Try Add: ảnh hưởng hôm nay = 4 chỉ số chính + dưỡng chất ★ của Active Member. */
.fne-food-preview-impact{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:10px;background:#f1f7fb;border:1px solid #d9e7f1;color:#577084}
.fne-food-preview-impact-title{grid-column:1/-1;width:auto;font-size:10.5px;font-weight:800;color:#385d78;margin-bottom:1px}
.fne-food-preview-impact-item{padding:7px 8px;border:1px solid #dbe8f2;border-radius:8px;background:#fff;min-width:0}
.fne-food-preview-impact-item.is-priority{background:#fffaf0;border-color:#f1dfac}
.fne-food-preview-impact-name{font-size:9.5px;color:#637786;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fne-food-preview-impact-values{margin-top:2px;font-size:10.5px;font-weight:700;color:#385d78;white-space:nowrap}
.fne-food-preview-impact-star{color:#e5a000;margin-right:3px}
@media(max-width:640px){.fne-food-preview-impact{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.fne-food-preview-impact-item{padding:6px}.fne-food-preview-impact-values{font-size:10px}}


/* v1.6.44 — Report UX refresh */
.fne-member-chip{min-height:30px;padding:2px 11px}
.fne-member-chip-content{gap:1px}
.fne-report-range-tabs{gap:6px;margin:5px 0;flex-wrap:wrap}
.fne-report-range-tab{padding:3px 11px;min-height:30px}
.fne-report-custom-range{padding:8px 10px!important;gap:8px!important}
.fne-report-overview-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.fne-report-overview-progress{height:6px;background:#e8edf1;border-radius:999px;overflow:hidden;margin-top:8px}
.fne-report-overview-progress span{display:block;height:100%;border-radius:999px;background:#2474c7}
.fne-report-overview-progress span.is-ok{background:#1c9b67}.fne-report-overview-progress span.is-high{background:#d94b43}
.fne-report-overview-status{font-size:10px;font-weight:800;margin-top:6px;color:#2474c7}.fne-report-overview-status.is-ok{color:#16845e}.fne-report-overview-status.is-high{color:#c43e36}
.fne-report-trend-slicer{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none;gap:12px}
.fne-report-trend-slicer::-webkit-scrollbar{display:none}
.fne-report-trend-page{flex:0 0 100%;scroll-snap-align:start;min-width:100%}
.fne-report-chart-bars{min-width:0!important}
.fne-report-chart-bar-wrap{position:relative;overflow:visible}
.fne-report-target-mark{position:absolute;left:-6px;right:-6px;height:2px;background:#ef9d26;z-index:3}
.fne-report-meal-day{margin-bottom:8px}
.fne-report-meal-summary{width:100%;display:grid;grid-template-columns:120px 1fr 24px;gap:10px;align-items:center;border:0;background:#f7faf9;padding:10px 13px;text-align:left;cursor:pointer;color:#17384b}
.fne-report-meal-summary span{font-size:11px;color:#657985}.fne-report-meal-chevron{text-align:right;font-size:18px!important}
.fne-report-meal-detail{padding:10px 13px}.fne-report-meal-compact-block{margin-bottom:8px}.fne-report-meal-compact-block strong{display:block;color:#16845e;font-size:11px;margin-bottom:3px}
.fne-report-nutrition-tabs{display:flex;gap:6px;overflow-x:auto;margin-bottom:10px;scrollbar-width:none}.fne-report-nutrition-tabs::-webkit-scrollbar{display:none}
.fne-report-attention-summary{border:1px solid #dbe6ea;border-radius:14px;background:#f8fbfc;padding:12px 14px}.fne-report-attention-summary p{margin:0;padding:8px 0;border-bottom:1px solid #e8eef1;font-size:12px;line-height:1.5;color:#304b5b}.fne-report-attention-summary p:last-child{border-bottom:0}.fne-report-attention-summary p.is-high{color:#b43b32}.fne-report-attention-summary p.is-low{color:#315e91}
@media(max-width:760px){.fne-report-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.fne-report-meal-summary{grid-template-columns:90px 1fr 20px}.fne-report-chart{overflow:hidden}.fne-report-chart-bars{height:210px}}
.fne-shared-profile-holder{margin:6px 0 10px}
.fne-shared-profile-holder:empty{display:none}
.fne-shared-active-profile{margin:0}


/* v1.6.45 — Shared Active Member header + Report visual consistency */
.fne-shell,
.fne-shell button,
.fne-shell input,
.fne-shell select,
.fne-shell textarea{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
}
.fne-shell{color:#17384b;font-size:14px;line-height:1.5}
.fne-shell .fne-section-title{color:#102f44;font-size:18px;line-height:1.35;font-weight:800}
.fne-shell p,.fne-shell li,.fne-shell td,.fne-shell th{color:#415d6c}
.fne-shell .fne-btn{font-family:inherit}
.fne-member-chips{gap:6px;margin:4px 0 6px}
.fne-member-chip{min-height:28px!important;padding:2px 8px!important;font-size:12px!important;line-height:1.2}
.fne-member-chip-add{min-height:28px!important;padding:2px 8px!important;font-size:12px!important}
.fne-shared-member-header{margin:0 0 8px}
.fne-shared-profile-holder{margin:4px 0 8px}
.fne-shared-active-profile,.fne-overview-profile{padding:12px 16px!important}
.fne-profile-line{font-size:14px!important;color:#17384b!important}
.fne-active-member-contexts{margin-top:5px!important}
.fne-active-member-context-badge{font-size:10px!important;padding:3px 8px!important}

/* range selector: compact and single row on mobile */
.fne-report-range-tabs{display:flex;gap:4px;margin:4px 0 6px;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.fne-report-range-tabs::-webkit-scrollbar{display:none}
.fne-report-range-tab{padding:2px 6px!important;min-height:26px!important;font-size:11px!important;line-height:1.35;white-space:nowrap;flex:0 0 auto}

/* Trend chart: paired DRI/intake columns, equally spaced 7-day slicer */
.fne-report-chart{padding:14px 12px}
.fne-report-chart-legend{display:flex;justify-content:flex-end;gap:14px;margin:0 2px 8px;font-size:10px;color:#647986}
.fne-report-chart-legend span{display:inline-flex;align-items:center;gap:5px}
.fne-report-chart-legend span:before{content:"";width:8px;height:8px;border-radius:2px;display:inline-block}
.fne-report-chart-legend .is-target:before{background:#d7e0e6}
.fne-report-chart-legend .is-intake:before{background:#16845e}
.fne-report-chart-bars{height:220px!important;display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px!important;align-items:end;border-bottom:1px solid #dce5e9;min-width:0!important}
.fne-report-chart-col{min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%}
.fne-report-chart-pair-values{display:flex;gap:4px;font-size:8px;line-height:1;color:#71828c;margin-bottom:4px;white-space:nowrap}
.fne-report-chart-pair{height:165px;width:100%;display:flex;gap:4px;align-items:flex-end;justify-content:center}
.fne-report-chart-pair-bar{width:min(28%,18px);min-width:6px;border-radius:4px 4px 0 0}
.fne-report-chart-pair-bar.is-target{background:#d7e0e6}
.fne-report-chart-pair-bar.is-intake{background:#16845e}
.fne-report-chart-pair-missing{width:min(28%,18px);min-width:6px;height:18px;display:flex;align-items:center;justify-content:center;color:#a4b0b7;font-size:10px}
.fne-report-chart-date{font-size:10px;color:#70828d;padding:6px 0 5px;white-space:nowrap}

/* Meals: latest day expanded, compact typography */
.fne-report-meal-summary{grid-template-columns:92px minmax(0,1fr) 18px!important;padding:8px 10px!important;gap:8px!important}
.fne-report-meal-summary strong{font-size:12px!important;font-weight:700!important;line-height:1.35;color:#17384b}
.fne-report-meal-summary span{font-size:10.5px!important;line-height:1.35;color:#657985;white-space:normal}
.fne-report-meal-compact-block strong{font-size:10.5px!important;font-weight:700!important;text-transform:none!important;color:#16845e}
.fne-report-meal-item{font-size:10.5px!important;color:#4f6472}

/* Priority stars always use the shared yellow star */
.fne-priority-star{color:#e5a000!important;font-weight:900!important}
.fne-report-table-name .fne-priority-star{margin-right:2px}

/* Consistent report typography */
.fne-report-meta{font-size:11px;color:#71808c}
.fne-report-overview-label{font-size:11px;color:#637684}
.fne-report-overview-value{font-size:17px;color:#102f44}
.fne-report-overview-sub{font-size:10.5px;color:#758692}
.fne-report-trend-tab{font-size:11px;color:#526a78}
.fne-report-table-row{font-size:11px;color:#415d6c}
.fne-report-attention-summary p{font-size:11.5px;color:#304b5b}

@media(max-width:760px){
  .fne-shell{font-size:13px}
  .fne-member-chips{flex-wrap:nowrap!important;overflow-x:auto!important;scrollbar-width:none}
  .fne-member-chips::-webkit-scrollbar{display:none}
  .fne-shared-active-profile,.fne-overview-profile{padding:9px 11px!important}
  .fne-profile-line{font-size:12.5px!important}
  .fne-report-chart{overflow:hidden!important;padding:11px 7px!important}
  .fne-report-chart-bars{gap:5px!important;height:205px!important}
  .fne-report-chart-pair{gap:2px;height:150px}
  .fne-report-chart-pair-values{font-size:7px;gap:2px}
  .fne-report-chart-date{font-size:9px}
  .fne-report-meal-summary{grid-template-columns:78px minmax(0,1fr) 16px!important}
}

/* v1.6.46 — Report cards đồng bộ Today: status pill góc phải + sao Priority vàng */
.fne-report-overview-head{width:100%}
.fne-report-overview-badge{
  margin-left:auto;
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:22px;
  padding:2px 9px;
  border-radius:999px;
  font-size:10px;
  line-height:1.2;
  font-weight:800;
  background:#eef4fb;
  color:#1768b2;
}
.fne-report-overview-badge.is-low{background:#edf5ff;color:#1768b2}
.fne-report-overview-badge.is-ok{background:#e8f6ef;color:#16845e}
.fne-report-overview-badge.is-high{background:#fdebea;color:#c43e36}
.fne-report-overview-badge.is-none{background:#f1f3f5;color:#71808c}
.fne-report-overview-progress span.is-low{background:#2474c7}
.fne-report-overview-progress span.is-ok{background:#1c9b67}
.fne-report-overview-progress span.is-high{background:#d94b43}
.fne-report-trend-tab .fne-priority-star{color:#e5a000!important;font-weight:900!important;margin-right:2px}
@media(max-width:760px){
  .fne-report-overview-badge{font-size:9px;min-height:20px;padding:2px 7px}
}

/* v1.6.47 — Fix report period selector on mobile: no full-width buttons */
.fne-report-range-tabs{
  display:flex!important;
  flex-wrap:nowrap!important;
  gap:4px!important;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.fne-report-range-tabs::-webkit-scrollbar{display:none}
.fne-report-range-tab{
  width:auto!important;
  min-width:max-content!important;
  flex:0 0 auto!important;
  padding:2px 5px!important;
  min-height:26px!important;
  border-radius:999px!important;
  font-size:11px!important;
  line-height:1.25!important;
  white-space:nowrap!important;
}
@media(max-width:640px){
  .fne-report-range-tabs{
    display:flex!important;
    grid-template-columns:none!important;
    gap:3px!important;
    margin:4px 0 7px!important;
  }
  .fne-report-range-tab{
    width:auto!important;
    min-width:max-content!important;
    padding:2px 4px!important;
    min-height:25px!important;
    font-size:10.5px!important;
  }
}


/* v1.6.48 — Restore two-column Analysis priority cards on mobile */
@media(max-width:760px){
  .fne-analysis-stage-grid{grid-template-columns:1fr!important;}
  .fne-analysis-priority-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
  .fne-analysis-priority-card{padding:10px!important;border-radius:12px!important;}
  .fne-analysis-priority-card-name{font-size:12px!important;line-height:1.25!important;}
  .fne-analysis-priority-card-badge{font-size:9px!important;padding:2px 6px!important;}
  .fne-analysis-priority-card-values{gap:3px 6px!important;margin-top:7px!important;}
  .fne-analysis-priority-card-values strong{font-size:13px!important;}
  .fne-analysis-priority-card-values span{font-size:9.5px!important;}
  .fne-analysis-priority-card-note{font-size:9.5px!important;}
}
@media(max-width:360px){.fne-analysis-priority-grid{gap:6px!important}.fne-analysis-priority-card{padding:8px!important}}


/* v1.6.50 — Food search: natural page scroll so inline detail never jumps when opened. */
.fne-app .fne-food-search-results,
.fne-app .fne-food-search-results.detail-open {
	max-height: none !important;
	overflow: visible !important;
	padding-right: 0 !important;
	scrollbar-gutter: auto;
}


/* v1.6.52 — Overview final layout: pregnancy profile mobile polish. */
.fne-overview-preg-icon{display:none}
.fne-overview-physiology-label{display:flex;align-items:center;gap:6px}
@media(max-width:640px){
  .fne-overview-physiology-wrap.is-pregnancy .fne-overview-preg-icon{
    display:inline-flex;align-items:center;justify-content:center;
    width:25px;height:25px;flex:0 0 25px;border-radius:50%;
    background:#f5f1ff;font-size:14px;line-height:1;
  }
  .fne-overview-physiology-wrap.is-pregnancy .fne-overview-physiology-card{
    padding:9px 7px;gap:7px;
  }
  .fne-overview-physiology-wrap.is-pregnancy .fne-overview-physiology-label{
    align-items:flex-start;flex-direction:column;gap:5px;
  }
  .fne-overview-physiology-wrap.is-pregnancy .fne-overview-physiology-card strong{
    font-size:13px;line-height:1.25;
  }
  .fne-overview-v3 > section,
  .fne-overview-v3 > .fne-overview-physiology-wrap,
  .fne-overview-v3 > .fne-analysis-section{margin-top:14px;margin-bottom:14px}
}

/* v1.6.54 — client-side PDF/print export actions. */
.fne-pdf-actions{display:flex;justify-content:flex-end;gap:8px;margin:10px 0 14px}
.fne-export-pdf{white-space:nowrap}
@media (max-width:600px){.fne-pdf-actions{margin:8px 0 10px}.fne-export-pdf{padding:7px 12px;font-size:13px}}

/* v1.6.63 — PDF action is a compact utility CTA below nutrient tables. */
.fne-pdf-actions-after-nutrients{justify-content:flex-start;margin:14px 0 18px}
.fne-export-pdf{display:inline-flex;align-items:center;gap:8px;min-height:38px}
.fne-pdf-button-icon{display:inline-flex;align-items:center;justify-content:center;width:28px;height:30px;border:1.5px solid #c43a32;border-radius:4px;background:#fff;position:relative;box-sizing:border-box;flex:0 0 auto}
.fne-pdf-button-icon:after{content:"";position:absolute;right:-1.5px;top:-1.5px;width:8px;height:8px;border-left:1.5px solid #c43a32;border-bottom:1.5px solid #c43a32;background:#fff;border-radius:0 3px 0 2px}
.fne-pdf-button-sheet{font-size:9px;line-height:1;font-weight:800;color:#c43a32;letter-spacing:.2px;margin-top:7px}
.fne-pdf-button-label{font-weight:700}
@media (max-width:600px){.fne-pdf-actions-after-nutrients{margin:10px 0 14px}.fne-export-pdf{min-height:34px}.fne-pdf-button-icon{width:25px;height:27px}.fne-pdf-button-sheet{font-size:8px}}

/* ================================================================
 * Monetization Slot Engine v1.6.71
 * Các slot thương mại tách khỏi nội dung chuyên môn/thuật toán FNE.
 * ================================================================ */
.fne-monetization-slot{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  margin:16px auto;
  text-align:center;
  clear:both;
}
.fne-monetization-label{
  margin:0 0 5px;
  font-size:11px;
  line-height:1.25;
  color:#7a8791;
  letter-spacing:.02em;
}
.fne-monetization-content{
  width:100%;
  max-width:100%;
  overflow:hidden;
  box-sizing:border-box;
}
.fne-monetization-content > *{max-width:100%!important;box-sizing:border-box}
.fne-monetization-content img{max-width:100%;height:auto}
.fne-monetization-content iframe{max-width:100%}
.fne-monetization-affiliate .fne-monetization-label{color:#6f5b16}
.fne-monetization-contextual .fne-monetization-label{color:#516577}
@media(max-width:767px){
  .fne-monetization-slot{margin:12px auto}
  .fne-monetization-label{font-size:10px}
}
@media print{
  .fne-monetization-slot{display:none!important}
}
.fne-analysis-stage-grid > .fne-monetization-slot{grid-column:1 / -1}


/* v1.6.79 — Keep selected Food/Dish anchored while inline detail opens. */
.fne-app .fne-food-search-results,
.fne-app .fne-food-search-row,
.fne-app .fne-food-inline-detail {
	overflow-anchor: none;
}


/* v1.6.85 — Guest mobile: BMI/BMR/TDEE stay as one compact 3-card row.
 * Scope is intentionally limited to the public guest result hero so Member
 * Needs keeps its own responsive rules. */
@media (max-width: 640px) {
	.fne-guest-section > .fne-hero-stats-v2-three {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 6px;
	}
	.fne-guest-section > .fne-hero-stats-v2-three .fne-hero-stat-v2 {
		min-width: 0;
		min-height: 0;
		padding: 9px 7px;
		border-radius: 12px;
	}
	.fne-guest-section > .fne-hero-stats-v2-three .fne-metric-header {
		gap: 5px;
		min-height: 30px;
		margin-bottom: 6px;
	}
	.fne-guest-section > .fne-hero-stats-v2-three .fne-guest-metric-icon {
		width: 30px;
		height: 30px;
	}
	.fne-guest-section > .fne-hero-stats-v2-three .fne-metric-header-label {
		font-size: 10px;
	}
	.fne-guest-section > .fne-hero-stats-v2-three .fne-hero-stat-v2 .value {
		font-size: 15px;
		line-height: 1.25;
		word-break: normal;
		overflow-wrap: anywhere;
	}
	.fne-guest-section > .fne-hero-stats-v2-three .fne-hero-stat-v2 .label {
		font-size: 9.5px;
		line-height: 1.3;
	}
	/* Long explanatory notes make three narrow cards excessively tall on phones;
	 * the same information remains visible on tablet/desktop and in the PDF. */
	.fne-guest-section > .fne-hero-stats-v2-three .fne-hero-note {
		display: none;
	}
	.fne-guest-section > .fne-hero-stats-v2-three .fne-hero-badge {
		margin-top: 6px;
		font-size: 9px;
		padding: 3px 6px;
	}
}
@media (max-width: 340px) {
	.fne-guest-section > .fne-hero-stats-v2-three {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
	.fne-guest-section > .fne-hero-stats-v2-three .fne-hero-stat-v2 {
		padding-left: 5px;
		padding-right: 5px;
	}
	.fne-guest-section > .fne-hero-stats-v2-three .fne-hero-stat-v2 .value {
		font-size: 13px;
	}
}


/* v1.6.87 — Guest contextual headings restored above BMI/BMR/TDEE. */
.fne-guest-profile-heading{margin:14px 0 10px;font-size:20px;line-height:1.35;font-weight:800;color:#102f44}
@media(max-width:640px){.fne-guest-profile-heading{margin:12px 0 8px;font-size:18px}}


/* v1.6.88 — Guest mobile polish before desktop page-layout work.
 * The WordPress page owns the H1; the shortcode begins with a concise intro.
 * Keep mobile inputs at >=16px to prevent iOS Safari/Chrome focus zoom.
 * Constrain every guest child so result rendering cannot widen the visual viewport. */
.fne-app[data-view="guest-calculator"],
.fne-app[data-view="guest-calculator"] .fne-guest,
.fne-app[data-view="guest-calculator"] .fne-guest-form,
.fne-app[data-view="guest-calculator"] .fne-guest-form-grid,
.fne-app[data-view="guest-calculator"] .fne-form-group,
.fne-app[data-view="guest-calculator"] .fne-dob-picker,
.fne-app[data-view="guest-calculator"] .fne-guest-section {
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%;
}
.fne-app[data-view="guest-calculator"] {
	overflow-x: clip;
}
.fne-app[data-view="guest-calculator"] .fne-guest-hero {
	text-align: left;
	padding: 10px 0 2px;
	max-width: 780px;
	margin: 0 auto;
}
.fne-app[data-view="guest-calculator"] .fne-guest-hero p {
	max-width: none;
	margin: 0;
	text-align: left;
}
.fne-app[data-view="guest-calculator"] .fne-dob-picker > * {
	min-width: 0;
	max-width: 100%;
}
.fne-app[data-view="guest-calculator"] .fne-guest-profile-summary {
	scroll-margin-top: 78px;
}

@media (max-width: 768px) {
	.fne-app[data-view="guest-calculator"] {
		width: 100%;
		max-width: 100%;
		overflow-x: hidden;
	}
	.fne-app[data-view="guest-calculator"] .fne-guest {
		width: 100%;
		max-width: 100%;
	}
	.fne-app[data-view="guest-calculator"] .fne-guest-hero {
		padding: 8px 4px 0;
	}
	.fne-app[data-view="guest-calculator"] .fne-guest-hero p {
		font-size: 14px;
		line-height: 1.55;
	}
	.fne-app[data-view="guest-calculator"] .fne-guest-form {
		width: 100%;
		max-width: 100%;
		padding: 16px;
		margin-top: 14px;
		overflow: hidden;
	}
	/* 16px is intentional: iOS zooms the page when focusing smaller form controls. */
	.fne-app[data-view="guest-calculator"] .fne-input {
		font-size: 16px;
		line-height: 1.25;
		min-width: 0;
		max-width: 100%;
		padding-left: 10px;
		padding-right: 30px;
	}
	.fne-app[data-view="guest-calculator"] .fne-form-group {
		min-width: 0;
	}
	.fne-app[data-view="guest-calculator"] .fne-dob-picker {
		grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr) minmax(0,1fr);
		gap: 6px;
		width: 100%;
	}
	.fne-app[data-view="guest-calculator"] .fne-dob-picker .fne-input {
		padding-left: 8px;
		padding-right: 24px;
	}
	.fne-app[data-view="guest-calculator"] img,
	.fne-app[data-view="guest-calculator"] table,
	.fne-app[data-view="guest-calculator"] svg {
		max-width: 100%;
	}
}

@supports not (overflow: clip) {
	.fne-app[data-view="guest-calculator"] { overflow-x: hidden; }
}


/* ==================== v1.6.89 — WHO 5–19 alias + 3-card mobile row ==================== */
@media (max-width: 480px) {
	.fne-growth-grid.is-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 6px;
	}
	.fne-growth-grid.is-3 .fne-growth-card { padding: 9px 7px; }
	.fne-growth-grid.is-3 .fne-suggestion-name { font-size: 10.5px; line-height: 1.25; min-height: 39px; }
	.fne-growth-grid.is-3 .fne-growth-value-row { flex-direction: column; align-items: flex-start !important; gap: 4px; }
	.fne-growth-grid.is-3 .value { font-size: 16px; line-height: 1.2; }
	.fne-growth-grid.is-3 .fne-growth-badge { font-size: 9px; line-height: 1.2; padding: 2px 5px; max-width: 100%; border-radius: 999px; }
	.fne-growth-grid.is-3 .fne-growth-reference-summary { font-size: 9.5px !important; line-height: 1.35 !important; overflow-wrap: anywhere; }
	.fne-growth-grid.is-3 .fne-btn.secondary { font-size: 9px !important; padding: 4px 6px !important; white-space: nowrap; }
}
@media (max-width: 340px) {
	.fne-growth-grid.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
	.fne-growth-grid.is-3 .fne-growth-card { padding: 7px 5px; }
	.fne-growth-grid.is-3 .fne-suggestion-name { font-size: 9.5px; }
	.fne-growth-grid.is-3 .value { font-size: 14px; }
}


/* ==================== v1.6.90 — iOS member form viewport stability ==================== */
/* iOS Safari auto-zooms controls below 16px. Member inputs previously inherited 14–15px,
 * so after editing a meal/serving the visual viewport stayed zoomed until the user pinched out. */
@media (max-width: 768px) {
    .fne-app,
    .fne-app * {
        box-sizing: border-box;
    }

    .fne-app {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .fne-app input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    .fne-app select,
    .fne-app textarea,
    .fne-app .fne-input {
        font-size: 16px !important;
        max-width: 100%;
        min-width: 0;
    }

    .fne-app input[type="number"],
    .fne-app input[type="text"],
    .fne-app input[type="search"],
    .fne-app input[type="date"],
    .fne-app input[type="time"] {
        width: 100%;
    }
}


/* ==================== v1.6.95 — Member mobile drawer ==================== */
body.fne-member-app-active .fne-hide-member-site-search {
    display: none !important;
}

@media (max-width: 768px) {
    body.fne-member-app-active { overflow-x: hidden; }

    .fne-mobile-app-header {
        position: sticky;
        top: 0;
        z-index: 60;
        grid-template-columns: 42px minmax(0,1fr) 42px;
        align-items: center;
    }

    .fne-mobile-cart-button {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        border-radius: 12px;
        color: #17394f;
        background: #f6f9fa;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }
    .fne-mobile-cart-button svg { width: 25px; height: 25px; display: block; }

    .fne-mobile-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 998;
        background: rgba(10, 25, 38, .42);
        backdrop-filter: blur(1px);
    }

    .fne-mobile-menu-panel {
        position: fixed;
        z-index: 999;
        left: 0;
        top: 0;
        bottom: 0;
        display: block;
        width: min(88vw, 390px);
        max-width: 390px;
        padding: calc(18px + env(safe-area-inset-top)) 14px calc(24px + env(safe-area-inset-bottom));
        border: 0;
        border-radius: 0 20px 20px 0;
        background: #fff;
        overflow-y: auto;
        overscroll-behavior: contain;
        box-shadow: 18px 0 42px rgba(19,52,72,.22);
        transform: translateX(-102%);
        transition: transform .22s ease;
    }
    .fne-mobile-app-header.menu-open .fne-mobile-menu-panel { transform: translateX(0); }

    .fne-mobile-menu-heading {
        display: flex;
        flex-direction: column;
        gap: 3px;
        padding: 10px 10px 14px;
        margin: 0 0 8px;
        border-bottom: 1px solid #e5edf2;
    }
    .fne-mobile-menu-heading strong { font-size: 18px; line-height: 1.2; color: #12384f; }
    .fne-mobile-menu-heading span { font-size: 13px; line-height: 1.35; color: #7a8b96; }

    .fne-mobile-menu-link,
    .fne-mobile-menu-item {
        width: 100%;
        min-height: 52px;
        display: grid;
        grid-template-columns: 34px minmax(0,1fr) 20px;
        align-items: center;
        gap: 10px;
        padding: 9px 10px;
        margin: 0;
        border: 0;
        border-bottom: 1px solid #e7eef2;
        border-radius: 0;
        background: transparent;
        color: #17394f;
        text-decoration: none;
        text-align: left;
        box-sizing: border-box;
    }
    .fne-mobile-menu-link:hover,
    .fne-mobile-menu-link:focus,
    .fne-mobile-menu-item:hover,
    .fne-mobile-menu-item:focus {
        background: #f5f9fc;
        outline: none;
    }

    .fne-mobile-menu-link-icon,
    .fne-mobile-menu-item-icon {
        width: 32px;
        height: 32px;
        display: grid;
        place-items: center;
        border-radius: 10px;
        background: #eef6fb;
        color: #2f6fb3;
        font-size: 15px;
        font-weight: 800;
    }
    .fne-mobile-menu-link-label,
    .fne-mobile-menu-item-label {
        min-width: 0;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.25;
        color: #17394f;
    }
    .fne-mobile-menu-item-arrow { color: #98a7b0; font-size: 22px; line-height: 1; text-align: right; }
    .fne-mobile-menu-separator { height: 12px; border-bottom: 1px solid #e5edf2; margin: 0 0 6px; }
    .fne-mobile-menu-item.is-logout .fne-mobile-menu-item-label { color: #bb453b; }
    .fne-mobile-menu-item.is-logout .fne-mobile-menu-item-icon { background: #fff0ef; color: #bb453b; }
}


/* ==================== v1.6.96 — Member mobile chrome ==================== */
@media screen and (max-width: 767px) {
    /* Thanh search sticky custom của theme: chỉ ẩn trong Khu vực Thành viên. */
    body.fne-member-app-active #mobile-custom-search-bar {
        display: none !important;
    }

    /* Family Nutrition trở thành sticky header chính của Member. */
    body.fne-member-app-active .fne-mobile-app-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 997 !important;
        min-height: 58px;
        margin: 0 0 10px;
        padding: 7px 8px;
        border: 0;
        border-radius: 0;
        background: #0056b3 !important;
        box-shadow: 0 2px 8px rgba(0, 49, 102, .18);
    }

    body.fne-member-app-active .fne-mobile-app-title-main {
        color: #fff !important;
        font-size: 16px;
        font-weight: 850;
    }
    body.fne-member-app-active .fne-mobile-app-title-sub {
        color: rgba(255,255,255,.78) !important;
        font-size: 10px;
    }

    body.fne-member-app-active .fne-mobile-menu-button,
    body.fne-member-app-active .fne-mobile-cart-button {
        color: #fff !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }
    body.fne-member-app-active .fne-mobile-menu-button span {
        background: #fff !important;
    }
    body.fne-member-app-active .fne-mobile-cart-button svg {
        color: #fff !important;
    }

    /* Chừa đủ vùng cuối drawer để Đăng xuất kéo lên trên bottom navigation. */
    body.fne-member-app-active .fne-mobile-menu-panel {
        padding-bottom: calc(150px + env(safe-area-inset-bottom)) !important;
        scroll-padding-bottom: calc(150px + env(safe-area-inset-bottom));
    }
}

/* ==================== v1.6.97 — Full-bleed Member sticky header ==================== */
@media screen and (max-width: 767px) {
    /* Thoát khỏi padding của .fne-app/theme nhưng chỉ áp dụng cho app header. */
    body.fne-member-app-active .fne-mobile-app-header {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        margin-bottom: 10px !important;
        padding-left: max(12px, env(safe-area-inset-left)) !important;
        padding-right: max(12px, env(safe-area-inset-right)) !important;
        box-sizing: border-box !important;
    }

    /* Hai bánh/chấm dưới icon giỏ hàng dùng fill mặc định màu đen; ép về trắng. */
    body.fne-member-app-active .fne-mobile-cart-button svg circle {
        fill: #fff !important;
        stroke: #fff !important;
    }
}


/* =========================================================
 * Guest page v1.7.9: desktop 30/45/25, mobile tool-first
 * ======================================================= */
.fne-guest-page-shell{
	width:100%;
	max-width:1500px;
	margin:0 auto;
	padding:0 16px;
	box-sizing:border-box;
	display:grid;
	grid-template-columns:minmax(280px,30fr) minmax(520px,45fr) minmax(240px,25fr);
	gap:22px;
	align-items:start;
}
.fne-guest-layout-left,
.fne-guest-layout-main,
.fne-guest-layout-right{
	min-width:0;
	max-width:100%;
}
.fne-guest-layout-main .fne-app[data-view="guest-calculator"]{
	width:100%!important;
	max-width:none!important;
	margin:0!important;
}
.fne-guest-guide-scroll{
	max-height:var(--fne-guest-main-height, none);
	overflow-y:auto;
	overflow-x:hidden;
	padding-right:6px;
	scrollbar-width:thin;
}
.fne-guest-guide{
	background:#fff;
	border:1px solid #dbe7f3;
	border-radius:14px;
	padding:18px;
	color:#203449;
	line-height:1.65;
	box-shadow:0 4px 18px rgba(25,63,103,.05);
}
.fne-guest-guide-header{
	padding-bottom:6px;
	border-bottom:1px solid #e7eef5;
	margin-bottom:14px;
}
.fne-guest-guide-kicker,
.fne-guest-member-kicker{
	font-size:11px;
	font-weight:800;
	letter-spacing:.08em;
	color:#0056b3;
	margin:0 0 6px;
}
.fne-guest-guide h2{
	font-size:23px;
	line-height:1.25;
	margin:0 0 12px;
	color:#123b62;
}
.fne-guest-guide h3{
	font-size:17px;
	line-height:1.35;
	margin:24px 0 8px;
	color:#0b4f8a;
}
.fne-guest-guide p{
	margin:0 0 11px;
}
.fne-guest-guide table{
	width:100%;
	border-collapse:collapse;
	font-size:13px;
	margin:10px 0 14px;
}
.fne-guest-guide th,
.fne-guest-guide td{
	border:1px solid #dce6ef;
	padding:7px 8px;
	text-align:left;
	vertical-align:top;
}
.fne-guest-guide th{
	background:#f3f8fd;
}
.fne-guest-formula,
.fne-guest-flow{
	background:#f2f8ff;
	border-left:4px solid #0056b3;
	padding:10px 12px;
	border-radius:8px;
	margin:10px 0;
	color:#133f68;
}
.fne-guest-layout-right{
	display:flex;
	flex-direction:column;
	gap:16px;
}
.fne-guest-member-cta{
	background:linear-gradient(180deg,#f4f9ff 0%,#ffffff 100%);
	border:1px solid #c9dff5;
	border-radius:14px;
	padding:18px;
	box-shadow:0 4px 18px rgba(25,63,103,.06);
}
.fne-guest-member-cta h2{
	font-size:20px;
	line-height:1.3;
	margin:0 0 8px;
	color:#123b62;
}
.fne-guest-member-cta p{
	margin:0 0 14px;
	color:#4c6175;
	line-height:1.55;
}
.fne-guest-member-actions{
	display:grid;
	grid-template-columns:1fr;
	gap:8px;
}
.fne-guest-member-btn{
	display:flex;
	align-items:center;
	justify-content:center;
	min-height:44px;
	border-radius:10px;
	font-weight:700;
	text-decoration:none!important;
	padding:8px 12px;
	box-sizing:border-box;
}
.fne-guest-member-btn-primary{
	background:#0056b3;
	color:#fff!important;
	border:1px solid #0056b3;
}
.fne-guest-member-btn-secondary{
	background:#fff;
	color:#0056b3!important;
	border:1px solid #0056b3;
}
.fne-guest-promo-placeholder{
	min-height:160px;
	border:1px dashed #b8c8d8;
	border-radius:12px;
	background:#fafcfe;
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	text-align:center;
	padding:16px;
	box-sizing:border-box;
	color:#6a7b8b;
}
.fne-guest-promo-placeholder strong{
	display:block;
	color:#415b73;
	margin-bottom:6px;
}
.fne-guest-sticky-slot{
	position:sticky;
	top:18px;
}
.fne-guest-mobile-auth{
	display:none;
}

@media (max-width:1199px) and (min-width:769px){
	.fne-guest-page-shell{
		grid-template-columns:minmax(240px,28fr) minmax(500px,47fr) minmax(220px,25fr);
		gap:16px;
		padding:0 12px;
	}
}

@media (max-width:768px){
	.fne-guest-page-shell{
		display:flex;
		flex-direction:column;
		max-width:none;
		padding:0;
		gap:14px;
	}
	.fne-guest-mobile-auth{
		display:block;
		order:1;
		width:100%;
		padding:0 16px;
		box-sizing:border-box;
	}
	.fne-guest-layout-main{
		order:2;
		width:100%;
	}
	.fne-guest-layout-left{
		order:3;
		width:100%;
		padding:0 16px;
		box-sizing:border-box;
	}
	.fne-guest-layout-right{
		order:4;
		width:100%;
		padding:0 16px;
		box-sizing:border-box;
	}
	.fne-guest-desktop-auth{
		display:none;
	}
	.fne-guest-guide-scroll{
		max-height:none!important;
		overflow:visible!important;
		padding-right:0;
	}
	.fne-guest-guide{
		padding:16px;
	}
	.fne-guest-guide h2{
		font-size:21px;
	}
	.fne-guest-sticky-slot{
		position:static;
	}
	.fne-guest-member-actions{
		grid-template-columns:1fr 1fr;
	}
	.fne-guest-member-btn{
		min-height:46px;
	}
}

@media (max-width:420px){
	.fne-guest-member-actions{
		grid-template-columns:1fr;
	}
}


/* =========================================================
 * Guest page polish v1.8.0
 * ======================================================= */
body.fne-guest-tool-page .entry-header .entry-title,
body.fne-guest-tool-page .entry-title,
body.fne-guest-tool-page .page-title{
	display:none!important;
}
body.fne-guest-tool-page .site-main,
body.fne-guest-tool-page .content-area,
body.fne-guest-tool-page .entry-content{
	background:#eef7fb;
}
body.fne-guest-tool-page .entry-content{
	margin-top:0;
}
.fne-guest-page-shell{
	background:#eef7fb;
	padding:18px;
	border-radius:18px;
}
.fne-guest-layout-main{
	background:#fff;
	border:1px solid #d8e7f1;
	border-radius:16px;
	padding:20px;
	box-shadow:0 6px 24px rgba(17,72,110,.06);
}
.fne-guest-tool-header h1{
	margin:0 0 8px;
	font-size:30px;
	line-height:1.15;
	color:#123b62;
	letter-spacing:-.02em;
}
.fne-guest-mobile-inline-auth{display:none}
.fne-guest-layout-right{
	align-self:stretch!important;
}
.fne-guest-sticky-slot{
	position:sticky!important;
	top:88px!important;
	z-index:3;
}
.fne-guest-guide-scroll{
	scrollbar-width:thin;
	scrollbar-color:#b9cbd8 transparent;
}
.fne-guest-guide-scroll::-webkit-scrollbar{width:5px}
.fne-guest-guide-scroll::-webkit-scrollbar-thumb{background:#b9cbd8;border-radius:999px}
.fne-guest-guide-scroll::-webkit-scrollbar-track{background:transparent}
.fne-guest-guide{
	font-size:14px;
	line-height:1.62;
}
.fne-guest-guide h2{font-size:21px}
.fne-guest-guide h3{font-size:16px;margin-top:20px}
.fne-guest-guide p{margin-bottom:9px}

.fne-guest-dob-field{
	grid-column:1 / -1;
}
.fne-guest .fne-dob-picker{
	display:grid;
	grid-template-columns:.8fr 1.15fr 1fr;
	gap:8px;
	width:100%;
}
.fne-guest .fne-dob-picker .fne-input{
	font-size:13px!important;
	padding-left:10px!important;
	padding-right:28px!important;
	min-width:0;
}
.fne-guest-sex-field{
	grid-column:1 / -1;
}
.fne-guest-sex-options{
	display:flex;
	gap:8px;
	flex-wrap:wrap;
}
.fne-guest-sex-choice{
	display:flex!important;
	align-items:center;
	gap:7px;
	min-height:38px;
	padding:7px 14px;
	border:1px solid #cfdde8;
	border-radius:10px;
	background:#fff;
	cursor:pointer;
	font-weight:600!important;
	color:#29465f;
}
.fne-guest-sex-choice:has(input:checked){
	border-color:#0b66c3;
	background:#eef6ff;
	color:#0b5aaa;
	box-shadow:0 0 0 1px rgba(11,102,195,.08);
}
.fne-guest-sex-choice input{margin:0}
.fne-guest-activity-field{
	grid-column:1 / -1;
}
.fne-guest-validation-error{
	color:#b42318!important;
	background:#fff1f0!important;
	border:1px solid #f1aaa5!important;
	border-left:4px solid #d92d20!important;
	border-radius:10px;
	padding:10px 12px;
	font-size:13px;
	line-height:1.5;
}
.fne-field-error > label{
	color:#b42318!important;
	font-weight:700;
}
.fne-field-error .fne-input,
.fne-field-error .fne-dob-picker .fne-input,
.fne-field-error .fne-guest-sex-choice{
	border-color:#d92d20!important;
	box-shadow:0 0 0 1px rgba(217,45,32,.08)!important;
}
.fne-guest-layout-main .fne-guest-form{
	margin-top:14px;
}
@media (min-width:769px){
	.fne-guest-layout-main .fne-hero-stat-v2{
		padding:13px 11px;
		min-height:118px;
	}
	.fne-guest-layout-main .fne-hero-stat-v2 .value{font-size:18px}
	.fne-guest-layout-main .fne-hero-stat-v2 .label{font-size:10.5px}
	.fne-guest-layout-main .fne-hero-note{font-size:9.5px}
	.fne-guest-layout-main .fne-hero-badge{font-size:10px}
	.fne-guest-layout-main .fne-macro-card{
		padding:13px 14px;
		min-height:116px;
	}
	.fne-guest-layout-main .fne-macro-card-name{font-size:12.5px}
	.fne-guest-layout-main .fne-macro-card-value{font-size:17px}
	.fne-guest-layout-main .fne-macro-card-conversion{font-size:12.5px}
	.fne-guest-layout-main .fne-macro-card-explain{font-size:10.5px}
	.fne-guest-layout-main .fne-growth-card{font-size:12px}
}
@media (max-width:768px){
	body.fne-guest-tool-page .site-main,
	body.fne-guest-tool-page .content-area,
	body.fne-guest-tool-page .entry-content{
		background:#eef7fb;
	}
	.fne-guest-page-shell{
		padding:10px 0 0;
		border-radius:0;
	}
	.fne-guest-layout-main{
		order:1;
		width:100%;
		padding:16px;
		border-radius:0;
		border-left:0;
		border-right:0;
	}
	.fne-guest-tool-header h1{
		text-align:center;
		font-size:27px;
		margin-bottom:7px;
		text-transform:uppercase;
	}
	.fne-guest-mobile-inline-auth{
		display:flex;
		align-items:center;
		justify-content:center;
		gap:9px;
		font-size:14px;
		font-weight:700;
		margin:0 0 10px;
	}
	.fne-guest-mobile-inline-auth a{
		color:#0056b3;
		text-decoration:none;
		padding:4px 2px;
	}
	.fne-guest-mobile-inline-auth span{color:#9ab0c2}
	.fne-guest-layout-left{order:2}
	.fne-guest-layout-right{order:3;align-self:auto!important}
	.fne-guest-sticky-slot{position:static!important}
	.fne-guest-desktop-auth{display:none!important}
	.fne-guest .fne-dob-picker{
		grid-template-columns:.78fr 1.15fr 1fr;
		gap:6px;
	}
	.fne-guest .fne-dob-picker .fne-input{
		font-size:12px!important;
	}
}


/* =========================================================
 * Guest 3-column responsive content fix v1.8.1
 * The center calculator is ~45% of desktop width, so its inner
 * components must respond to column width, not full viewport width.
 * ======================================================= */

/* WHO growth: when the result has exactly 2 cards, use the full row 50/50. */
.fne-guest-layout-main .fne-growth-grid:has(> .fne-growth-card:nth-child(2):last-child){
	grid-template-columns:repeat(2,minmax(0,1fr))!important;
}

/* Priority / Safety: in the guest center column these two narrative boxes
 * are easier to read stacked vertically instead of squeezed side-by-side. */
.fne-guest-layout-main .fne-analysis-stage-grid{
	grid-template-columns:minmax(0,1fr)!important;
	gap:10px;
}

@media (max-width:768px){
	.fne-guest-layout-main .fne-growth-grid:has(> .fne-growth-card:nth-child(2):last-child){
		grid-template-columns:repeat(2,minmax(0,1fr))!important;
	}
	.fne-guest-layout-main .fne-analysis-stage-grid{
		grid-template-columns:minmax(0,1fr)!important;
	}
}


/* =========================================================
 * Guest growth cards v1.8.3
 * 4 card = 2x2 | 3 card = 3 cột | 2 card = 50/50 | 1 card = 100%
 * Nội dung card theo chiều dọc để số và badge không bị bẻ chữ.
 * ======================================================= */
.fne-guest-layout-main .fne-growth-grid{
	display:grid;
	gap:10px;
	align-items:stretch;
}
.fne-guest-layout-main .fne-growth-grid.is-4{
	grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.fne-guest-layout-main .fne-growth-grid.is-3{
	grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
.fne-guest-layout-main .fne-growth-grid.is-2{
	grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.fne-guest-layout-main .fne-growth-grid.is-1{
	grid-template-columns:minmax(0,1fr)!important;
}
.fne-guest-layout-main .fne-growth-card{
	padding:12px 13px;
	min-height:0;
}
.fne-guest-layout-main .fne-growth-card .fne-suggestion-name{
	font-size:12px;
	line-height:1.35;
	min-height:0;
	margin-bottom:7px;
}
.fne-guest-layout-main .fne-growth-value-only{
	display:block;
	margin:0 0 7px;
}
.fne-guest-layout-main .fne-growth-value-only .value{
	display:block;
	font-size:18px;
	line-height:1.2;
	white-space:nowrap;
	word-break:keep-all;
	overflow-wrap:normal;
}
.fne-guest-layout-main .fne-growth-badge-row{
	display:block;
	margin-bottom:7px;
}
.fne-guest-layout-main .fne-growth-badge{
	display:inline-flex;
	max-width:100%;
	font-size:10.5px;
	line-height:1.25;
	padding:3px 8px;
	text-align:left;
	white-space:normal;
}
.fne-guest-layout-main .fne-growth-reference-summary{
	margin-top:5px;
	font-size:10.5px;
	line-height:1.4;
	color:var(--fne-muted);
}
@media(max-width:480px){
	.fne-guest-layout-main .fne-growth-grid.is-4{
		grid-template-columns:repeat(2,minmax(0,1fr))!important;
	}
	.fne-guest-layout-main .fne-growth-grid.is-3{
		grid-template-columns:repeat(3,minmax(0,1fr))!important;
	}
	.fne-guest-layout-main .fne-growth-grid.is-2{
		grid-template-columns:repeat(2,minmax(0,1fr))!important;
	}
	.fne-guest-layout-main .fne-growth-card{
		padding:10px 9px;
	}
	.fne-guest-layout-main .fne-growth-card .fne-suggestion-name{
		font-size:11px;
	}
	.fne-guest-layout-main .fne-growth-value-only .value{
		font-size:16px;
	}
	.fne-guest-layout-main .fne-growth-badge{
		font-size:9.5px;
		padding:2px 6px;
	}
	.fne-guest-layout-main .fne-growth-reference-summary{
		font-size:9.5px;
		line-height:1.35;
	}
}
@media(max-width:340px){
	.fne-guest-layout-main .fne-growth-grid.is-3{
		grid-template-columns:1fr!important;
	}
}


/* =========================================================
 * Guest SEO layout v1.8.4 — desktop 60/40, mobile tool-first
 * ======================================================= */
.fne-guest-page-shell-v2{
	display:grid!important;
	grid-template-columns:minmax(0,3fr) minmax(320px,2fr)!important;
	gap:22px!important;
	align-items:start;
	max-width:1500px;
	margin:0 auto;
	padding:18px;
	background:#eef7fb;
	border-radius:18px;
}
.fne-guest-page-header{
	grid-column:1 / -1;
	background:transparent;
	padding:2px 2px 4px;
}
.fne-guest-page-header h1{
	margin:0 0 8px;
	font-size:30px;
	line-height:1.25;
	color:#123b62;
}
.fne-guest-page-intro{
	margin:0 0 8px;
	color:#4e6477;
	font-size:15px;
	line-height:1.55;
}
.fne-guest-top-auth{
	display:flex;
	align-items:center;
	gap:9px;
	font-size:13.5px;
	font-weight:700;
}
.fne-guest-top-auth a{color:#0056b3;text-decoration:none}
.fne-guest-layout-main{grid-column:1}
.fne-guest-layout-content{
	grid-column:2;
	min-width:0;
}
.fne-guest-guide-v2{
	background:#fff;
	border:1px solid #d8e7f1;
	border-radius:16px;
	padding:20px;
	box-shadow:0 6px 24px rgba(17,72,110,.05);
	font-size:14px;
	line-height:1.65;
	color:#263f54;
}
.fne-guest-guide-v2 section+section{
	border-top:1px solid #e7eef4;
	padding-top:17px;
	margin-top:17px;
}
.fne-guest-guide-v2 h2{
	font-size:19px;
	line-height:1.35;
	margin:0 0 9px;
	color:#123b62;
}
.fne-guest-guide-v2 h3{
	font-size:15px;
	line-height:1.4;
	margin:15px 0 7px;
	color:#0b568f;
}
.fne-guest-guide-v2 p{margin:0 0 9px}
.fne-guest-guide-v2 ol{margin:0 0 8px;padding-left:20px}
.fne-guest-guide-v2 li{margin-bottom:7px}
.fne-guest-author-card{
	background:#f6fbff;
	border:1px solid #d2e5f2!important;
	border-radius:12px;
	padding:14px!important;
}
.fne-guest-author-card a{font-weight:700;color:#0056b3}
.fne-guest-limitations{
	background:#fffaf0;
	border:1px solid #f0dfb6!important;
	border-radius:12px;
	padding:14px!important;
}
.fne-guest-faq details{
	border:1px solid #dbe7ef;
	border-radius:10px;
	background:#fff;
	padding:10px 12px;
	margin-bottom:8px;
}
.fne-guest-faq summary{
	cursor:pointer;
	font-weight:700;
	color:#123b62;
}
.fne-guest-faq details p{
	margin:8px 0 0;
}
body.fne-guest-tool-page .entry-header.page-title{
	display:none!important;
}

@media(max-width:768px){
	.fne-guest-page-shell-v2{
		display:flex!important;
		flex-direction:column;
		padding:10px 0 0!important;
		gap:14px!important;
		border-radius:0;
	}
	.fne-guest-page-header{
		order:1;
		width:100%;
		padding:0 16px 4px;
		box-sizing:border-box;
	}
	.fne-guest-page-header h1{
		font-size:25px;
		line-height:1.28;
		text-align:left;
	}
	.fne-guest-top-auth{
		font-size:14px;
	}
	.fne-guest-layout-main{
		order:2;
		width:100%;
	}
	.fne-guest-layout-content{
		order:3;
		width:100%;
		padding:0 16px 16px;
		box-sizing:border-box;
	}
	.fne-guest-guide-v2{
		padding:16px;
	}
}

/* =========================================================
 * Guest SEO/UX polish v1.8.5
 * ======================================================= */
body.fne-guest-tool-page .site-main,
body.fne-guest-tool-page .content-area,
body.fne-guest-tool-page .entry-content,
.fne-guest-page-shell-v2{
	background:#F1F7FA!important;
}
.fne-guest-page-header h1{color:#18384b!important}
.fne-guest-page-intro{
	color:#334b5a!important;
	font-size:16px!important;
	font-weight:500;
}
.fne-guest-layout-main,
.fne-guest-layout-main label,
.fne-guest-layout-main .fne-form-group label,
.fne-guest-layout-main .fne-guest-hero,
.fne-guest-layout-main .fne-card,
.fne-guest-layout-main .fne-result,
.fne-guest-layout-main p{
	color:#243746;
}
.fne-guest-layout-main .fne-muted,
.fne-guest-layout-main .fne-helper,
.fne-guest-layout-main small{
	color:#526675!important;
}
.fne-guest-layout-main{
	border-color:#D7E5EC!important;
}
.fne-guest-guide-v2{
	color:#243746!important;
	border-color:#D7E5EC!important;
}
.fne-seo-collapsible{
	border:1px solid #D7E5EC;
	border-radius:10px;
	background:#fff;
	margin-top:10px;
	padding:0;
}
.fne-seo-collapsible>summary{
	list-style:none;
	cursor:pointer;
	padding:12px 38px 12px 13px;
	font-size:15px;
	line-height:1.4;
	font-weight:700;
	color:#123b62;
	position:relative;
}
.fne-seo-collapsible>summary::-webkit-details-marker{display:none}
.fne-seo-collapsible>summary:after{
	content:'+';
	position:absolute;
	right:13px;
	top:50%;
	transform:translateY(-50%);
	font-size:20px;
	color:#0b66c3;
}
.fne-seo-collapsible[open]>summary:after{content:'−'}
.fne-seo-detail-body{
	border-top:1px solid #e5edf2;
	padding:12px 13px 4px;
}
.fne-guest-limitations,
.fne-guest-author-card{
	padding:0!important;
}
.fne-guest-limitations[open] .fne-seo-detail-body{background:#fffaf0}
.fne-guest-author-card[open] .fne-seo-detail-body{background:#f6fbff}
.fne-guest-faq{margin-top:18px}
.fne-guest-faq details:first-of-type{margin-top:0}


/* =========================================================
 * Guest mobile typography polish v1.8.6
 * Giữ nguyên trạng thái accordion; chỉ làm mobile gọn và dễ đọc hơn.
 * ======================================================= */
@media (max-width:768px){
	.fne-guest-page-header h1{
		font-size:22px!important;
		line-height:1.22!important;
		letter-spacing:-.015em;
		margin-bottom:7px!important;
	}
	.fne-guest-page-intro{
		font-size:14.5px!important;
		line-height:1.48!important;
		color:#2f4656!important;
		margin-bottom:8px!important;
	}
	.fne-guest-top-auth{
		font-size:13.5px!important;
		line-height:1.35;
		margin-top:2px;
	}

	/* Nội dung SEO mobile nhẹ hơn, bớt cảm giác "desktop thu nhỏ". */
	.fne-guest-guide-v2{
		font-size:14px!important;
		line-height:1.56!important;
		padding:14px!important;
	}
	.fne-guest-guide-v2 h2{
		font-size:18px!important;
		line-height:1.3!important;
		margin-bottom:8px!important;
	}
	.fne-guest-guide-v2 h3{
		font-size:15px!important;
		line-height:1.35!important;
		margin:13px 0 6px!important;
	}
	.fne-guest-guide-v2 p{
		margin-bottom:8px!important;
	}
	.fne-guest-guide-v2 ol{
		padding-left:19px!important;
		margin-bottom:6px!important;
	}
	.fne-guest-guide-v2 li{
		margin-bottom:6px!important;
	}

	/* Accordion SEO */
	.fne-seo-collapsible{
		margin-top:8px!important;
		border-radius:9px!important;
	}
	.fne-seo-collapsible>summary{
		font-size:14.5px!important;
		line-height:1.35!important;
		padding:10px 34px 10px 12px!important;
	}
	.fne-seo-collapsible>summary:after{
		right:11px!important;
		font-size:18px!important;
	}
	.fne-seo-detail-body{
		padding:10px 12px 3px!important;
	}
	.fne-guest-formula{
		font-size:13.5px!important;
		line-height:1.4!important;
		padding:9px 10px!important;
		margin:8px 0!important;
	}

	/* FAQ: compact hơn nhưng vẫn giữ vùng chạm lớn. */
	.fne-guest-faq{
		margin-top:14px!important;
	}
	.fne-guest-faq h2{
		font-size:19px!important;
		line-height:1.3!important;
		margin-bottom:9px!important;
	}
	.fne-guest-faq details{
		padding:0!important;
		margin-bottom:7px!important;
		border-radius:9px!important;
	}
	.fne-guest-faq summary{
		font-size:14.5px!important;
		line-height:1.38!important;
		font-weight:700!important;
		padding:10px 12px!important;
	}
	.fne-guest-faq details p{
		font-size:13.5px!important;
		line-height:1.5!important;
		margin:0!important;
		padding:0 12px 11px!important;
	}
}

@media (max-width:390px){
	.fne-guest-page-header h1{
		font-size:21px!important;
	}
	.fne-guest-page-intro{
		font-size:14px!important;
	}
	.fne-guest-guide-v2 h2{
		font-size:17.5px!important;
	}
	.fne-guest-faq summary{
		font-size:14px!important;
	}
}
