/* NewLife - Modern table styling (shared) */
:root{
	--nl-bg: #f5f7fb;
	--nl-card: #ffffff;
	--nl-text: #0f172a;
	--nl-muted: rgba(15,23,42,.72);
	--nl-border: rgba(15,23,42,.12);
	--nl-shadow: 0 18px 50px rgba(2,6,23,.14);
	--nl-radius: 18px;
	--nl-accent: #00bfa5;
}

html, body{ height: 100%; }
body{
	margin: 0;
	background: var(--nl-bg);
	color: var(--nl-text);
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.nl-table-page{
	padding: 18px 14px 22px;
}
.nl-table-header{
	max-width: 1100px;
	margin: 0 auto 12px;
	padding: 14px 16px;
	border-radius: var(--nl-radius);
	background: linear-gradient(135deg, var(--nl-accent), #22c55e);
	color: #fff;
	font-weight: 900;
	letter-spacing: .06em;
	text-transform: uppercase;
	box-shadow: 0 14px 34px rgba(0,191,165,.22);
}
.nl-table-sub{
	max-width: 1100px;
	margin: 0 auto 14px;
	color: var(--nl-muted);
	font-weight: 700;
	font-size: 13px;
}

.nl-table-scroll{
	max-width: 1100px;
	margin: 0 auto;
	background: var(--nl-card);
	border: 1px solid var(--nl-border);
	border-radius: var(--nl-radius);
	box-shadow: var(--nl-shadow);
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

/* Override old table styles with modern spacing */
.tg{
	width: 100% !important;
	border-collapse: separate !important;
	border-spacing: 0 !important;
	min-width: 920px; /* allow horizontal scroll on small screens */
}
.tg td, .tg th{
	border: 0 !important;
	border-bottom: 1px solid var(--nl-border) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	padding: 10px 12px !important;
	vertical-align: middle !important;
}

/* Round table corners */
.tg tr:first-child th:first-child{ border-top-left-radius: 14px; }
.tg tr:first-child th:last-child{ border-top-right-radius: 14px; }
.tg tr:last-child td:first-child{ border-bottom-left-radius: 14px; }
.tg tr:last-child td:last-child{ border-bottom-right-radius: 14px; }

/* Reset old color blocks and unify theme */
.tg .tg-ugqw,
.tg .tg-pbiw,
.tg .tg-uebu,
.tg .tg-xcj1,
.tg .tg-zuu3,
.tg .tg-3enq,
.tg .tg-m536,
.tg .tg-oi6l,
.tg .tg-7zss,
.tg .tg-nrix,
.tg .tg-1wig{
	background: transparent !important;
	color: inherit !important;
}

/* Section headers (top row of each group) */
.tg th.tg-ugqw{
	position: sticky;
	top: 0;
	z-index: 5;
	background: linear-gradient(135deg, #0f172a, #111827) !important;
	color: #fff !important;
	font-weight: 900 !important;
	letter-spacing: .08em;
	text-transform: uppercase;
	text-align: left !important;
	border-bottom: 1px solid rgba(255,255,255,.14) !important;
}

/* Column headers inside body (the repeated header rows) */
.tg td.tg-pbiw,
.tg td.tg-uebu{
	background: rgba(15,23,42,.06) !important;
	color: rgba(15,23,42,.92) !important;
	font-weight: 900 !important;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: 12px !important;
	border-bottom: 1px solid rgba(15,23,42,.12) !important;
}

/* Data rows zebra + hover */
.tg tbody tr td{
	background: #fff !important;
}
.tg tbody tr:nth-child(even) td{
	background: rgba(15,23,42,.02) !important;
}
.tg tbody tr:hover td{
	background: rgba(0,191,165,.08) !important;
}

/* First column sticky + emphasis */
.tg th:first-child,
.tg td:first-child{
	position: sticky;
	left: 0;
	z-index: 2;
	background: inherit !important;
}
.tg td:first-child{
	font-weight: 900 !important;
	color: rgba(15,23,42,.92) !important;
}

/* iOS/Safari fix: prevent text "bleed" under sticky first column while horizontally scrolling */
.tg td.tg-xcj1{
	/* Data-row first column (food label). Keep it opaque so other columns don't show through. */
	background: #fff !important;
}
.tg tbody tr:nth-child(even) td.tg-xcj1{
	background: rgba(15,23,42,.02) !important;
}
.tg tbody tr:hover td.tg-xcj1{
	background: rgba(0,191,165,.08) !important;
}

/* Keep header rows above sticky first column */
.tg td.tg-uebu:first-child{ z-index: 4; }
.tg th.tg-ugqw:first-child{ z-index: 6; }

/* Numeric alignment (all but first column) */
.tg td:not(:first-child),
.tg th:not(:first-child){
	text-align: right !important;
	font-variant-numeric: tabular-nums;
}

/* Footnote rows */
.tg .tg-1wig{
	color: rgba(15,23,42,.70) !important;
	font-weight: 800 !important;
	font-size: 12px !important;
}

/* Hide empty spacer rows */
.tg .tg-nrix{
	display: none;
}

@media (max-width: 480px){
	.nl-table-page{ padding: 14px 10px 18px; }
	.nl-table-header{ font-size: 13px; }
}

