/* styles.css — Giao diện web app Dinh dưỡng lâm sàng – Bàn chân ĐTĐ */
:root {
  --navy: #1f3b63;
  --navy-dark: #162c4a;
  --teal: #0b5c8a;
  --bg: #f2f6fb;
  --panel: #ffffff;
  --line: #dbe4ef;
  --text: #1e2a38;
  --muted: #64748b;
  --green: #1e8449;
  --green-bg: #e8f6ee;
  --amber: #b9770e;
  --amber-bg: #fdf3e3;
  --red: #b03a2e;
  --red-bg: #fbeceb;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 40, 70, 0.08), 0 6px 18px rgba(16, 40, 70, 0.05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--teal); }

/* ------------------------------------------------------------- topbar -- */
.topbar {
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal) 100%);
  color: #fff;
  padding: 14px 20px 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
  display: grid; place-items: center;
  font-weight: 700; font-size: 19px; letter-spacing: .5px;
  flex: 0 0 auto;
}
.brand-text { min-width: 0; }
.brand-text h1 {
  font-size: 16px; margin: 0; font-weight: 650; letter-spacing: .2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-text small { opacity: .8; font-size: 12px; }

.mode-badge {
  margin-left: auto;
  font-size: 12px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.mode-badge:hover { background: rgba(255, 255, 255, .26); }

nav.tabs {
  max-width: 1180px;
  margin: 12px auto 0;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
nav.tabs a {
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px 10px 0 0;
  font-size: 14px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
nav.tabs a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
nav.tabs a.active {
  color: #fff; background: var(--bg);
  border-bottom-color: #fff;
  font-weight: 600;
}
nav.tabs a.active { color: var(--navy); }

/* -------------------------------------------------------------- layout -- */
main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 20px 60px;
}
.view { display: none; }
.view.active { display: block; }
.page-head {
  display: flex; align-items: flex-start; gap: 12px;
  margin: 4px 0 16px; flex-wrap: wrap;
}
.page-head h2 { margin: 0; font-size: 21px; color: var(--navy); }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.page-head .spacer { flex: 1 1 auto; }

/* --------------------------------------------------------------- cards -- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.card .label { font-size: 13px; color: var(--muted); }
.card .value { font-size: 30px; font-weight: 700; color: var(--navy); line-height: 1.15; margin-top: 4px; }
.card .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card.red .value { color: var(--red); }
.card.amber .value { color: var(--amber); }
.card.green .value { color: var(--green); }

/* --------------------------------------------------------------- panel -- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}
.panel-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.panel-head h3 { margin: 0; font-size: 16px; color: var(--navy); }
.panel-head .spacer { flex: 1; }
.panel-body { padding: 16px 18px; }
.panel-body.tight { padding: 0; }

/* -------------------------------------------------------------- tables -- */
.table-wrap { overflow-x: auto; }
table.grid {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
table.grid th, table.grid td {
  padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.grid thead th {
  background: #f6f9fd; color: var(--navy);
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em;
  position: sticky; top: 0;
}
table.grid tbody tr:hover { background: #f9fbfe; }
table.grid td.num, table.grid th.num { text-align: right; }
table.grid td.center, table.grid th.center { text-align: center; }
table.grid tr.clickable { cursor: pointer; }
.patient-name { font-weight: 600; color: var(--navy); }
.mono { font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- badges -- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; border-radius: 999px;
  padding: 3px 10px; white-space: nowrap;
}
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.grey { background: #eef2f7; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.red { background: var(--red); }
.dot.amber { background: #e6a23c; }
.dot.green { background: var(--green); }

/* -------------------------------------------------------------- alerts -- */
.alert-list { list-style: none; margin: 0; padding: 0; }
.alert-list li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px;
}
.alert-list li:last-child { border-bottom: none; }
.alert-list .who { font-weight: 600; min-width: 150px; }

/* ------------------------------------------------------------- buttons -- */
button, .btn {
  font: inherit; cursor: pointer; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 8px 14px; display: inline-flex; align-items: center; gap: 6px;
}
button:hover, .btn:hover { background: #f4f7fb; }
button.primary, .btn.primary {
  background: var(--teal); border-color: var(--teal); color: #fff;
}
button.primary:hover, .btn.primary:hover { background: #0a4f78; }
button.danger { color: var(--red); border-color: #e5b5b0; }
button.danger:hover { background: var(--red-bg); }
button.ghost { border-color: transparent; background: transparent; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.small { padding: 5px 10px; font-size: 13px; }

/* --------------------------------------------------------------- forms -- */
.form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; font-weight: 600; color: #33475f; }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
input[type="text"], input[type="number"], input[type="date"], input[type="search"],
select, textarea {
  font: inherit; padding: 9px 11px; border: 1px solid var(--line);
  border-radius: 9px; background: #fff; color: var(--text); width: 100%;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(11, 92, 138, .25); border-color: var(--teal);
}
textarea { min-height: 78px; resize: vertical; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type="search"] { max-width: 320px; }
.toolbar select { max-width: 220px; }

/* --------------------------------------------------------------- modal -- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 30, 50, .45);
  display: none; align-items: flex-start; justify-content: center;
  padding: 40px 16px; z-index: 100; overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 14px; width: 100%; max-width: 720px;
  box-shadow: 0 20px 60px rgba(10, 30, 60, .3);
}
.modal-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.modal-head h3 { margin: 0; font-size: 17px; color: var(--navy); }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 18px 20px; }
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
}
.error-box {
  background: var(--red-bg); color: var(--red); border-radius: 9px;
  padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; display: none;
}
.error-box.show { display: block; }

/* ----------------------------------------------------------- protocols -- */
.protocol-layout { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; }
.protocol-nav {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  position: sticky; top: 96px;
}
.protocol-nav a {
  display: block; padding: 11px 14px; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--line); font-size: 14px;
}
.protocol-nav a:last-child { border-bottom: none; }
.protocol-nav a small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.protocol-nav a:hover { background: #f6f9fd; }
.protocol-nav a.active { background: #eaf3fb; border-left: 4px solid var(--teal); font-weight: 600; color: var(--navy); }

.proto-body { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; }
.proto-body h3 { margin: 0 0 4px; color: var(--navy); font-size: 20px; }
.proto-body .subtitle { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.proto-body h4 { margin: 22px 0 8px; color: var(--teal); font-size: 15.5px; }
.proto-body p { margin: 0 0 12px; }
.proto-body ul { margin: 0 0 14px; padding-left: 22px; }
.proto-body li { margin-bottom: 6px; }
.proto-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 10px 0 16px; }
.proto-table th, .proto-table td { border: 1px solid var(--line); padding: 9px 11px; text-align: left; vertical-align: top; }
.proto-table thead th { background: #eef4fb; color: var(--navy); font-size: 12.5px; }
.proto-table tbody tr:nth-child(even) { background: #fafcfe; }
.note-box {
  background: #fdf8e9; border-left: 4px solid #e0a800;
  padding: 11px 14px; border-radius: 0 9px 9px 0; font-size: 13.5px; margin: 14px 0;
  color: #6b4e00;
}
.search-hit { background: #fff3bf; }

/* ------------------------------------------------------- patient detail -- */
.detail-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; align-items: start; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.target-box {
  background: #eef7f1; border: 1px solid #cfe9d9; border-radius: 10px;
  padding: 12px 14px; margin-top: 12px; font-size: 14px;
}
.target-box strong { color: #14532d; }
.target-box .num { font-size: 19px; font-weight: 700; color: #14532d; }
.notes-list { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; color: #475569; }

.empty {
  text-align: center; padding: 40px 20px; color: var(--muted);
}
.empty .big { font-size: 34px; margin-bottom: 8px; }
.empty h3 { margin: 0 0 6px; color: var(--navy); font-size: 17px; }

/* --------------------------------------------------------------- misc --- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: var(--navy-dark); color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 200;
  box-shadow: 0 8px 24px rgba(10, 30, 60, .3);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.stack-actions { display: flex; flex-direction: column; gap: 10px; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
hr.sep { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------ responsive -- */
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid, .protocol-layout { grid-template-columns: 1fr; }
  .protocol-nav { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  main { padding: 14px 12px 50px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card .value { font-size: 24px; }
  .brand-text h1 { font-size: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
  .panel-body { padding: 12px; }
  .proto-body { padding: 16px; }
  .mode-badge { font-size: 11px; padding: 3px 9px; }
  table.grid th, table.grid td { padding: 8px 9px; }
}

/* ---------------------------------------------------------------- print -- */
@media print {
  .topbar, nav.tabs, .mode-badge, .toolbar, .no-print, .toast { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  main { padding: 0; max-width: 100%; }
  .panel, .proto-body { box-shadow: none; border: none; padding: 0; }
  .protocol-nav { display: none; }
  .protocol-layout { display: block; }
  .proto-table { font-size: 10.5pt; }
  .proto-table th { background: #eef4fb !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .badge { border: 1px solid #ccc; }
  a { color: #000; text-decoration: none; }
}

/* ============================================================ đăng nhập */
body.logged-out nav.tabs { display: none; }
body.logged-out .user-chip { display: none; }

.login-wrap {
  min-height: 68vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.login-wrap[hidden] { display: none; }

.login-card {
  width: 100%;
  max-width: 390px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(16, 40, 70, .12);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-mark {
  width: 54px; height: 54px; border-radius: 15px;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 20px; margin: 0 auto 4px;
}
.login-card h2 { margin: 0; text-align: center; color: var(--navy); font-size: 22px; }
.login-card > p { margin: 0; text-align: center; font-size: 13.5px; }
.login-card .field { margin-top: 6px; }
.login-submit { justify-content: center; padding: 11px; margin-top: 6px; font-weight: 600; }
.login-note { margin-top: 6px !important; font-size: 12.5px !important; }

/* =========================================================== người dùng */
.user-chip {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 999px;
  padding: 4px 8px 4px 4px;
  color: #fff; font-size: 13px;
}
.user-chip[hidden] { display: none !important; }
.user-chip .avatar {
  width: 27px; height: 27px; border-radius: 50%;
  background: rgba(255, 255, 255, .26);
  display: grid; place-items: center; font-weight: 700; font-size: 12px;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-meta small { opacity: .78; font-size: 11px; }
.user-chip button { color: #fff; border-color: transparent; padding: 4px 8px; }
.user-chip button:hover { background: rgba(255, 255, 255, .18); }

/* ============================================================= biểu đồ */
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.chart-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 12px 8px;
  background: #fbfdff;
}
.chart-card h4 { margin: 0 0 6px; font-size: 13.5px; color: var(--navy); }
.chart-card canvas { width: 100%; height: 150px; display: block; }

/* ============================================================== in ấn */
.print-only { display: none; }
.print-doc {
  background: #fff; padding: 26px 30px; border: 1px solid var(--line);
  border-radius: 10px; max-width: 820px; margin: 0 auto;
}
.print-doc h2 { text-align: center; margin: 0 0 4px; color: #000; font-size: 20px; }
.print-doc .sub { text-align: center; margin: 0 0 18px; font-size: 13px; color: #444; }
.print-doc h3 { font-size: 14.5px; margin: 18px 0 8px; color: #000; border-bottom: 1px solid #ddd; padding-bottom: 4px; }
.print-doc .row { display: flex; gap: 10px; font-size: 14px; margin: 4px 0; }
.print-doc .row b { min-width: 190px; font-weight: 600; }
.print-doc .sign { display: flex; justify-content: space-between; margin-top: 36px; font-size: 13.5px; text-align: center; }
.print-doc .sign div { width: 45%; }
.print-doc .sign .space { height: 70px; }
.print-doc table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.print-doc table th, .print-doc table td { border: 1px solid #999; padding: 6px 8px; }
.print-doc table th { background: #eee; }

@media print {
  body.printing main > section.view { display: none !important; }
  body.printing .print-view { display: block !important; }
  body.printing .topbar { display: none !important; }
  .print-doc { border: none; padding: 0; max-width: none; }
  .print-only { display: block; }
}

@media (max-width: 720px) {
  .chart-grid { grid-template-columns: 1fr; }
  .print-doc { padding: 16px; }
  .print-doc .row { flex-direction: column; gap: 0; }
  .print-doc .row b { min-width: 0; }
}

/* ======================================================= ảnh vết loét */
.thumb {
  width: 46px; height: 46px; object-fit: cover; border-radius: 7px;
  border: 1px solid var(--line); background: #f4f7fb; cursor: zoom-in;
  display: block;
}
.thumb:hover { border-color: var(--teal); }
.photo-preview { margin-top: 8px; }
.photo-preview img {
  max-width: 100%; max-height: 240px; border-radius: 10px;
  border: 1px solid var(--line); display: block;
}
.photo-empty { font-size: 13px; color: var(--muted); }
.photo-full { max-width: 100%; max-height: 70vh; border-radius: 10px; display: block; margin: 0 auto; }
.photo-meta { text-align: center; color: var(--muted); font-size: 13px; margin-top: 8px; }
input[type="file"] {
  font: inherit; padding: 8px; border: 1px dashed var(--line); border-radius: 9px;
  background: #fbfdff; width: 100%;
}

/* ======================================================= báo cáo tuần */
.report-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.delta-down { color: var(--green); font-weight: 600; }
.delta-up { color: var(--red); font-weight: 600; }
.delta-flat { color: var(--muted); }
@media (max-width: 900px) { .report-kpi { grid-template-columns: repeat(2, 1fr); } }



/* ================================================= bệnh lý phối hợp */
.check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin-top: 4px; }
.check-group { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #fbfdff; }
.check-title { font-size: 12px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.check-item { display: flex; align-items: flex-start; gap: 6px; font-size: 13.5px; padding: 3px 0; cursor: pointer; }
.check-item input { margin-top: 3px; }
.target-note { margin-top: 12px; padding-top: 10px; border-top: 1px dashed #cfe9d9; font-size: 13.5px; }
.target-note b { color: #14532d; }
@media (max-width: 900px) { .check-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .check-grid { grid-template-columns: 1fr; } }

/* ==================================================== thuốc / ONS */
.med-status { display: inline-flex; gap: 4px; }
.med-empty { padding: 18px; color: var(--muted); font-size: 14px; text-align: center; }
.med-warn { color: var(--amber); font-weight: 600; }
.confirm-list { display: flex; flex-direction: column; gap: 8px; }
.confirm-row {
  display: grid; grid-template-columns: 1fr 90px 150px; gap: 10px; align-items: center;
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; font-size: 14px;
}
.confirm-row .name { font-weight: 600; color: var(--navy); }
.confirm-row .meta { color: var(--muted); font-size: 12.5px; }
.confirm-row select { padding: 6px 8px; }
@media (max-width: 640px) { .confirm-row { grid-template-columns: 1fr; } }

.login-hint {
  background: #eef4fb; border: 1px dashed #b9cfe6; border-radius: 9px;
  padding: 10px 12px; font-size: 13px; color: #1f3b63; line-height: 1.45;
}
.login-hint b { font-family: Consolas, monospace; font-size: 13.5px; }
.login-hint[hidden] { display: none; }

/* ================================================ xét nghiệm / chế độ ăn */
.alert-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px; }
.chip {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; border: 1px solid transparent;
}
.chip.red { background: var(--red-bg); color: var(--red); border-color: #f3c9c9; }
.chip.amber { background: var(--amber-bg); color: var(--amber); border-color: #f1ddb4; }
.badge.navy { background: #e8eef7; color: var(--navy); }
.badge.blue { background: #e6f0fb; color: #1f5fa8; }
.grid tr.group-row td {
  background: #f3f6fa; font-weight: 700; color: var(--navy);
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em;
}
.lab-dates { padding: 10px 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.lab-date { display: inline-block; margin-right: 12px; }
.link-danger {
  background: none; border: none; color: var(--red); cursor: pointer;
  font-size: 12px; padding: 0 2px; text-decoration: underline;
}
.lab-group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 4px; margin-top: 10px; }
.lab-group legend { font-weight: 700; color: var(--navy); font-size: 13px; padding: 0 6px; }
.diet-head { margin-bottom: 8px; }
.diet-meals { margin: 6px 0 10px 18px; padding: 0; font-size: 14px; }
.diet-meals li { margin-bottom: 4px; }
.diet-note { font-size: 13.5px; margin: 5px 0; color: #33415c; }

/* ============================================ đề xuất năng lượng */
.energy-top { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.energy-kcal { font-size: 34px; font-weight: 800; color: var(--navy); line-height: 1; }
.energy-unit { font-size: 14px; color: var(--muted); font-weight: 600; }
.energy-sub { font-size: 13px; color: var(--muted); }
.energy-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.energy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.energy-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fbfcfe; }
.energy-box .k { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.energy-box .v { font-size: 17px; font-weight: 700; color: var(--navy); margin-top: 3px; }
.energy-box .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.energy-steps { margin: 6px 0 0 20px; padding: 0; font-size: 13.5px; color: #26364f; }
.energy-steps li { margin-bottom: 5px; }
.energy-note { font-size: 13px; margin: 6px 0 0; padding: 8px 10px; border-radius: 8px; }
.energy-note.ons { background: #eaf6ee; color: #1d6b3a; }
.energy-note.ent { background: #eef3fb; color: #1f4c85; }

/* ================================================ chuẩn quốc tế / thực đơn */
.gl-card { margin-bottom: 14px; }
.gl-card h4 { margin: 14px 0 6px; font-size: 13px; color: var(--navy); text-transform: uppercase; letter-spacing: .03em; }
.gl-card ul { margin: 4px 0 0 20px; padding: 0; font-size: 13.5px; }
.gl-card li { margin-bottom: 4px; }
.gl-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gl-list { margin: 4px 0 0 20px; font-size: 13.5px; }
.menu-item { white-space: nowrap; }
#menuPatient { min-width: 220px; }
@media (max-width: 760px) { .gl-cols { grid-template-columns: 1fr; } }
