/* Morning huddle page (lives inside Today) */
.huddle-btn { display: inline-flex; align-items: center; gap: 7px; margin-left: 14px; vertical-align: middle; font: inherit; font-size: 12.5px; font-weight: 700; letter-spacing: .01em; color: #fff; background: var(--navy-grad, linear-gradient(135deg, #1E2E60, #2a4f9e)); border: 0; border-radius: 999px; padding: 7px 13px 7px 11px; cursor: pointer; box-shadow: 0 6px 16px -8px rgba(30,46,96,.7); transition: transform .12s, box-shadow .12s; }
.huddle-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(30,46,96,.8); }
.huddle-btn:active { transform: translateY(0); }
.home-head h1 { display: inline-flex; align-items: center; }

.home.huddle-open > .home-head, .home.huddle-open > .ph-grid, .home.huddle-open > #docMetrics, .home.huddle-open > #opsBrief { display: none; }
.hd { --hd-ink: var(--ink, #19223b); --hd-muted: var(--ink-3, #6b7288); --hd-line: var(--line, rgba(24,36,96,.10)); animation: hdIn .28s var(--ease, ease-out); }
@keyframes hdIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hd, .hd-card { animation: none !important; transition: none !important; } }

.hd-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.hd-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan-text, #2766a8); margin-bottom: 4px; }
.hd-top h1 { font-size: 30px; font-weight: 700; letter-spacing: -.035em; color: var(--navy, #1E2E60); line-height: 1.05; }
.hd-sub { font-size: 13.5px; color: var(--hd-muted); margin-top: 6px; }
.hd-tools { display: flex; align-items: center; gap: 8px; }
.hd-nav { display: inline-flex; background: #f1f3f6; border-radius: 10px; padding: 3px; gap: 2px; }
.hd-nav button { border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 700; color: #5b6478; border-radius: 8px; padding: 6px 10px; cursor: pointer; min-width: 30px; }
.hd-nav button:hover:not(:disabled) { background: #fff; color: var(--navy); }
.hd-nav button:disabled { opacity: .45; cursor: default; }
.hd-btn { font: inherit; font-size: 12.5px; font-weight: 700; color: var(--navy); background: #fff; border: 1px solid var(--hd-line); border-radius: 10px; padding: 7px 12px; cursor: pointer; transition: all .12s; white-space: nowrap; }
.hd-btn:hover:not(:disabled) { border-color: #b9c3d9; background: #f7f8fb; }
.hd-btn:disabled { opacity: .55; cursor: default; }
.hd-btn.primary { color: #fff; background: var(--navy); border-color: var(--navy); }
.hd-btn.primary:hover:not(:disabled) { background: #2a4f9e; border-color: #2a4f9e; }
.hd-btn.ghost { background: transparent; }

.hd-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.hd-stat { background: #fff; border: 1px solid var(--hd-line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 1px 2px rgba(24,36,96,.04); }
.hd-stat b { font-size: 24px; font-weight: 700; letter-spacing: -.03em; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1; }
.hd-stat span { font-size: 11.5px; font-weight: 600; color: var(--hd-muted); }
.hd-stat.warn b { color: var(--warn, #d97706); }
.hd-stat.ok b { color: var(--ok, #16a34a); }

.hd-main { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 18px; align-items: start; }
.hd-rail { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 80px); overflow-y: auto; padding-right: 2px; }
.hd-rrow { display: grid; grid-template-columns: 52px minmax(0, 1fr) 18px; align-items: center; gap: 8px; text-align: left; font: inherit; background: transparent; border: 1px solid transparent; border-radius: 12px; padding: 8px 8px 8px 10px; cursor: pointer; position: relative; }
.hd-rrow::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--c); }
.hd-rrow:hover { background: #fff; border-color: var(--hd-line); }
.hd-rt { font-size: 11.5px; font-weight: 700; color: var(--hd-muted); font-variant-numeric: tabular-nums; }
.hd-rn { display: flex; flex-direction: column; min-width: 0; }
.hd-rn b { font-size: 13px; font-weight: 700; color: var(--hd-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-rn small { font-size: 11px; color: var(--hd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd-ring { width: 16px; height: 16px; border-radius: 50%; background: conic-gradient(var(--ok, #16a34a) calc(var(--p) * 1%), #e6e9f0 0); position: relative; }
.hd-ring::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: #fff; }

.hd-cards { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.hd-card { position: relative; background: #fff; border: 1px solid var(--hd-line); border-radius: 18px; padding: 18px 22px 14px 24px; box-shadow: 0 1px 2px rgba(24,36,96,.04), 0 10px 30px -22px rgba(24,36,96,.35); overflow: hidden; animation: hdIn .3s ease-out both; }
.hd-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--c); }
.hd-card.flash { box-shadow: 0 0 0 3px rgba(52,128,195,.35), 0 10px 30px -22px rgba(24,36,96,.35); }
.hd-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.hd-time { font-size: 20px; font-weight: 700; letter-spacing: -.03em; color: var(--navy); font-variant-numeric: tabular-nums; min-width: 78px; line-height: 1.2; }
.hd-who { min-width: 0; flex: 1; }
.hd-who h3 { font-size: 17px; font-weight: 700; letter-spacing: -.02em; color: var(--hd-ink); line-height: 1.2; }
.hd-meta { font-size: 12.5px; color: var(--hd-muted); margin-top: 3px; }
.hd-meta em { font-style: normal; color: var(--warn, #d97706); font-weight: 600; }
.hd-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hd-vit { font-size: 12px; font-weight: 700; color: var(--hd-ink); background: #f3f5f9; border-radius: 999px; padding: 5px 10px; font-variant-numeric: tabular-nums; }
.hd-vit small { font-weight: 600; color: var(--hd-muted); margin-left: 6px; }
.hd-badge { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 5px 10px; }
.hd-badge.warn { color: #9a5b00; background: #fff4e0; }
.hd-badge.ok { color: #12703a; background: #e7f6ec; }

.hd-lead { font: inherit; font-size: 13.5px; line-height: 1.5; color: var(--hd-ink); padding: 10px 14px; margin: 0 0 12px; background: linear-gradient(90deg, rgba(52,128,195,.08), rgba(52,128,195,.02)); border-left: 3px solid var(--cyan, #3480C3); border-radius: 0 12px 12px 0; text-wrap: pretty; }
.hd-lead b { color: var(--navy); font-weight: 700; }
.hd-lead.pending { color: var(--hd-muted); font-style: italic; }
.hd-shimmer { background: linear-gradient(90deg, #8a92a6 0%, #c3c9d6 50%, #8a92a6 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: hdShimmer 1.4s linear infinite; }
@keyframes hdShimmer { to { background-position: -200% 0; } }
.hd-probs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.hd-probs span { font-size: 11.5px; font-weight: 600; color: #3b4664; background: #f3f5f9; border-radius: 999px; padding: 4px 9px; }

.hd-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.hd-sec h4 { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--hd-muted); margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--hd-line); }
.hd-sec h4 i { width: 8px; height: 8px; border-radius: 50%; background: #9aa3b8; }
.hd-sec.why h4 i { background: var(--cyan, #3480C3); } .hd-sec.since h4 i { background: #7c3aed; } .hd-sec.results h4 i { background: #0e8a8a; } .hd-sec.gaps h4 i { background: var(--warn, #d97706); }
.hd-sec h4 .n { margin-left: auto; font-size: 11px; color: #9aa3b8; letter-spacing: 0; }
.hd-sec ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.hd-it { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px; align-items: start; padding: 3px 0; border-bottom: 1px dashed rgba(24,36,96,.07); }
.hd-it:last-child { border-bottom: 0; }
.hd-it.urgent .hd-t { color: #b42318; }
.hd-k { font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border-radius: 5px; padding: 2px 5px; margin-top: 3px; white-space: nowrap; color: #4b5563; background: #eef0f4; }
.hd-k.k-why { color: #2766a8; background: #e8f1fa; } .hd-k.k-ok { color: #12703a; background: #e7f6ec; } .hd-k.k-warn { color: #9a5b00; background: #fff4e0; } .hd-k.k-bad { color: #b42318; background: #fde8e7; }
.hd-k.k-info { color: #5b3fc4; background: #efeafc; } .hd-k.k-res { color: #0b6b6b; background: #e3f4f4; } .hd-k.k-purple { color: #6558d3; background: #ecebfa; } .hd-k.k-muted { color: #6b7288; background: #f1f3f6; }
.hd-body { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 1px 8px; }
.hd-t { font-size: 12.5px; line-height: 1.4; color: var(--hd-ink); overflow-wrap: anywhere; }
.hd-flag { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 800; color: #6b7288; background: #f1f3f6; border-radius: 5px; padding: 1px 5px; vertical-align: 1px; }
.hd-flag.on { color: #b42318; background: #fde8e7; }
.hd-s { font-size: 11px; color: var(--hd-muted); }
.hd-s::before { content: '· '; }
.hd-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.hd-act { font: inherit; font-size: 11px; font-weight: 700; color: var(--navy); background: #fff; border: 1px solid #c9d2e6; border-radius: 999px; padding: 2px 8px; cursor: pointer; transition: all .12s; line-height: 1.5; }
.hd-act:hover:not(:disabled) { background: var(--navy); border-color: var(--navy); color: #fff; }
.hd-act.busy { opacity: .6; cursor: progress; }
.hd-act.done { color: #12703a; background: #e7f6ec; border-color: transparent; cursor: pointer; }
.hd-act.done:hover { background: #d3efdc; border-color: transparent; color: #0f5c30; }
.hd-empty { font-size: 12.5px; color: var(--hd-muted); line-height: 1.45; padding: 2px 0; }
.hd-foot { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--hd-line); }
.hd-foot-note { font-size: 11.5px; color: var(--hd-muted); }
.hd-ready { font-size: 12.5px; font-weight: 700; color: #12703a; }
.hd-card.nochart .hd-empty { padding: 4px 0 6px; }
.hd-none, .hd-loading { background: #fff; border: 1px dashed #c9d2e6; border-radius: 16px; padding: 26px; font-size: 14px; color: var(--hd-muted); text-align: center; }
.hd-none b { color: var(--hd-ink); }

@media (max-width: 1500px) { .hd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .hd-main { grid-template-columns: 1fr; } .hd-rail { position: static; flex-direction: row; flex-wrap: wrap; max-height: none; } .hd-rrow { width: auto; } .hd-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .hd-grid { grid-template-columns: 1fr; } .hd-head { flex-wrap: wrap; } .hd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- views, trends, meds, coverage, plan, status, print --- */
.hd-seg { display: inline-flex; background: #f1f3f6; border-radius: 10px; padding: 3px; gap: 2px; }
.hd-seg button { border: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 700; color: #5b6478; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.hd-seg button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(24,36,96,.12); }
.hd-time { display: flex; flex-direction: column; gap: 4px; }
.hd-st { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; border-radius: 6px; padding: 3px 6px; width: max-content; }
.hd-st.hide { display: none; }
.hd-st.st-plain { color: #6b7288; background: #f1f3f6; } .hd-st.st-here { color: #0b6b6b; background: #d8f1f1; } .hd-st.st-done { color: #12703a; background: #e7f6ec; }
.hd-st.mini { font-size: 9px; padding: 2px 5px; }
.hd-rrow { grid-template-columns: 52px minmax(0, 1fr) auto 18px; }
.hd-who h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hd-hosp { font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #b42318; background: #fde8e7; border-radius: 6px; padding: 3px 7px; }
.hd-risk { font-size: 10.5px; font-weight: 800; color: #6558d3; background: #ecebfa; border-radius: 6px; padding: 3px 7px; }
.hd-card.hosp { border-color: rgba(180,35,24,.35); }
.hd-rrow.hosp::before { background: #b42318; }
.hd-pay { font-size: 12px; color: var(--hd-muted); }
.hd-pay.ok { color: #12703a; } .hd-pay.bad { color: #b42318; }
.hd-trends { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 12px; padding: 8px 12px; background: #f7f8fb; border-radius: 12px; }
.hd-tr { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.hd-tr label { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--hd-muted); }
.hd-tr > b { font-weight: 700; color: var(--hd-ink); font-variant-numeric: tabular-nums; }
.hd-spark { display: inline-flex; align-items: center; gap: 6px; color: #2766a8; }
.hd-spark svg { display: block; }
.hd-spark b { font-weight: 700; color: var(--hd-ink); font-variant-numeric: tabular-nums; }
.hd-spark i { font-style: normal; font-size: 11px; color: var(--hd-muted); }
.hd-spark.bad { color: #b42318; } .hd-spark.bad b { color: #b42318; }
.hd-meds { font-size: 12.5px; color: var(--hd-ink); margin: 0 0 14px; }
.hd-meds-h { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.hd-meds-l { display: flex; flex-wrap: wrap; gap: 5px; }
.hd-med { display: inline-flex; align-items: baseline; gap: 5px; font-size: 11.5px; color: var(--hd-ink); background: #f3f5f9; border: 1px solid transparent; border-radius: 8px; padding: 3px 8px; max-width: 100%; }
.hd-med b { font-weight: 700; white-space: nowrap; }
.hd-med small { font-size: 10.5px; color: var(--hd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.hd-med i { font-style: normal; font-size: 9px; font-weight: 800; color: #b42318; background: #fde8e7; border-radius: 4px; padding: 1px 4px; align-self: center; }
.hd-med.ctl { border-color: rgba(180,35,24,.25); }
.hd-med.renew { background: #fff8ea; border-color: rgba(154,91,0,.25); }
.hd-meds b { font-weight: 700; } .hd-meds em { font-style: normal; color: #9a5b00; font-weight: 600; }
.hd-k.k-teal { color: #0b6b6b; background: #e3f4f4; }
.hd-cflag { flex-basis: 100%; font-size: 11px; color: #9a5b00; background: #fff8ea; border-radius: 6px; padding: 2px 7px; line-height: 1.35; }
.hd-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hd-plan { margin-top: 14px; padding: 10px 12px; background: linear-gradient(90deg, rgba(30,46,96,.05), rgba(30,46,96,.015)); border-radius: 12px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; align-items: start; }
.hd-plan label { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); padding-top: 8px; white-space: nowrap; }
.hd-plan textarea { font: inherit; font-size: 13.5px; line-height: 1.45; color: var(--hd-ink); background: #fff; border: 1px solid var(--hd-line); border-radius: 9px; padding: 6px 10px; resize: none; width: 100%; min-height: 30px; overflow: hidden; }
.hd-plan textarea:focus { outline: none; border-color: #3480C3; box-shadow: 0 0 0 3px rgba(52,128,195,.18); }
.hd-plan-note { grid-column: 2; font-size: 11px; color: var(--hd-muted); }
.hd-plan.ro div { font-size: 13.5px; color: var(--hd-ink); padding-top: 6px; }
.hd.view-ma .hd-lead, .hd.view-fd .hd-lead { display: none; }

@media print {
  body.hd-printing * { visibility: hidden; }
  body.hd-printing #huddlePage, body.hd-printing #huddlePage * { visibility: visible; }
  body.hd-printing #huddlePage { position: absolute; left: 0; top: 0; width: 100%; padding: 0; }
  body.hd-printing .hd-tools, body.hd-printing .hd-rail, body.hd-printing .hd-acts, body.hd-printing .hd-foot, body.hd-printing .hd-plan-note, body.hd-printing [data-open] { display: none !important; }
  body.hd-printing .hd-main { grid-template-columns: 1fr; }
  body.hd-printing .hd-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccd; padding: 10px 12px 8px 14px; margin: 0; }
  body.hd-printing .hd-cards { gap: 8px; }
  body.hd-printing .hd-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  body.hd-printing .hd-lead { font-size: 12px; padding: 6px 10px; }
  body.hd-printing .hd-t, body.hd-printing .hd-s, body.hd-printing .hd-empty { font-size: 10.5px; }
  body.hd-printing .hd-stats { margin-bottom: 8px; } body.hd-printing .hd-stat b { font-size: 16px; }
  body.hd-printing .hd-top h1 { font-size: 20px; }
  body.hd-printing .hd-plan textarea { border: 0; padding: 0; background: transparent; }
}
