/* Little Smiles Operations Hub (concept) */
.hub { background: #f6f4f1; }
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; padding-top: var(--bar); }
.side { position: sticky; top: var(--bar); height: calc(100vh - var(--bar)); overflow: auto; background: #fffdf9; border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; }
.brand { display: flex; flex-direction: column; gap: 4px; text-decoration: none; padding: 4px 10px 16px; }
.brand img { height: 38px; width: auto; align-self: flex-start; }
.brand span { font: 800 11px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
#nav { display: grid; gap: 2px; }
#nav .grp { font: 800 10.5px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; }
#nav a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-2); font-weight: 650; font-size: 14.5px; padding: 8px 10px; border-radius: 10px; transition: background-color .2s ease, color .2s ease; }
#nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
#nav a:hover { background: var(--paper); }
#nav a[aria-current="page"] { background: var(--sky); color: var(--blue-night); }
#nav a .ct { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; min-width: 20px; text-align: center; }
#nav a .ct.g { background: var(--gold); color: #3b2800; }
.side-foot { margin-top: auto; padding: 16px 10px 4px; font-size: 12px; color: var(--muted); }
.side-foot p { margin: 8px 0 0; }
.mainc { min-width: 0; }
.top { position: sticky; top: var(--bar); z-index: 40; display: flex; gap: 12px; align-items: center; padding: 12px 22px; background: rgba(246,244,241,.94); border-bottom: 1px solid var(--line); }
.menu { display: none; border: 0; background: #fff; width: 40px; height: 40px; border-radius: 10px; font-size: 20px; cursor: pointer; box-shadow: var(--shadow); }
.search { position: relative; flex: 1; max-width: 560px; }
.search input { width: 100%; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 10px 14px; background: #fff; font-size: 14.5px; }
.sres { position: absolute; top: 46px; left: 0; right: 0; background: #fff; border-radius: 12px; box-shadow: 0 20px 50px rgba(29,40,56,.18); padding: 6px; max-height: 420px; overflow: auto; z-index: 60; }
.sres a { display: flex; gap: 10px; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 14px; }
.sres a:hover, .sres a:focus { background: var(--sky); }
.sres a small { color: var(--muted); margin-left: auto; }
.who select { border: 1.5px solid var(--line-2); border-radius: 12px; padding: 9px 12px; background: #fff; font-weight: 650; font-size: 14px; }
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 90; top: var(--bar); left: 0; width: 270px; transform: translateX(-100%); transition: transform .3s cubic-bezier(.4,0,.2,1); box-shadow: 0 0 60px rgba(0,0,0,.2); }
  .side.open { transform: none; }
  .menu { display: block; }
  .viewsite { display: none; }
}
@media (max-width: 560px) { .top { padding: 10px 12px; gap: 8px; } .who select { max-width: 130px; } }

#view { padding: 22px 22px 80px; outline: none; max-width: 1500px; }
@media (max-width: 560px) { #view { padding: 16px 12px 80px; } }
.vh { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.vh h1 { font: 560 clamp(26px, 2.6vw, 34px)/1.1 var(--display); margin: 0; letter-spacing: -.01em; }
.vh p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.vh .acts { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pane { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.pane h2 { font: 600 18px/1.2 var(--display); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.pane h2 .more { margin-left: auto; font: 700 13px var(--body); }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g2 { grid-template-columns: 1fr 1fr; } .g21 { grid-template-columns: 2fr 1fr; } .g12 { grid-template-columns: 1fr 1.4fr; }
@media (max-width: 1200px) { .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .g3, .g2, .g21, .g12 { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .g4 { grid-template-columns: 1fr 1fr; gap: 10px; } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 14px; text-decoration: none; color: var(--ink); display: block; transition: transform .25s ease, box-shadow .25s ease; position: relative; overflow: hidden; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi .l { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.kpi .v { font: 600 30px/1.1 var(--display); margin: 6px 0 2px; }
.kpi .s { font-size: 12.5px; color: var(--ink-2); }
.kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--blue)); }
.chart { width: 100%; height: auto; display: block; }
.donut { width: 150px; flex: none; }
.legend { display: grid; gap: 6px; font-size: 13.5px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: middle; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.fchip { border: 1.5px solid var(--line-2); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13.5px; font-weight: 650; cursor: pointer; }
.fchip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.fchip .n { opacity: .65; margin-left: 4px; }
.finput { border: 1.5px solid var(--line-2); border-radius: 10px; padding: 7px 11px; font-size: 14px; background: #fff; min-width: 200px; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fff; position: sticky; top: 0; }
.tbl th button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; letter-spacing: inherit; text-transform: inherit; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid #f0ebe5; vertical-align: middle; }
.tbl tr.click { cursor: pointer; transition: background-color .15s ease; }
.tbl tr.click:hover td, .tbl tr.sel td { background: #f7fafe; }
.tbl tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.twrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 750; padding: 4px 9px; border-radius: 999px; white-space: nowrap; background: #eef1f5; color: var(--ink-2); }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .7; }
.p-new { background: #fde6e8; color: #a3142a; } .p-rev { background: var(--gold-soft); color: #7a4b00; } .p-info { background: #ece8fb; color: #4b3a8f; } .p-ok { background: var(--sky); color: var(--blue-night); } .p-sched { background: #e0f0fb; color: #0e5c8f; } .p-prep { background: #fff0df; color: #8a4b00; } .p-done { background: var(--mint); color: #0f5a3a; } .p-no { background: #eee; color: #666; }
.newtag { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: #fff; background: var(--red); padding: 2px 6px; border-radius: 6px; margin-left: 6px; vertical-align: 1px; }
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .split.has-detail .listcol { display: none; } }
.detail { position: sticky; top: calc(var(--bar) + 76px); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; max-height: calc(100vh - var(--bar) - 96px); overflow: auto; }
.detail .dh { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.detail .dh h2 { font: 600 22px/1.15 var(--display); margin: 0; flex: 1; }
.detail .back { display: none; }
@media (max-width: 1100px) { .detail { position: relative; top: 0; max-height: none; } .detail .back { display: inline-flex; margin-bottom: 10px; } }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 7px 12px; font-size: 14px; margin: 10px 0 14px; }
.kv dt { color: var(--muted); font-weight: 650; }
.kv dd { margin: 0; }
.stepper { display: flex; gap: 4px; margin: 6px 0 16px; flex-wrap: wrap; }
.stepper span { flex: 1; min-width: 70px; font-size: 11px; font-weight: 750; color: var(--muted); padding-top: 8px; border-top: 4px solid #ece6df; }
.stepper span.on { color: var(--blue-night); border-color: var(--blue); }
.stepper span.cur { color: var(--red-deep); border-color: var(--red); }
.acts-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tl { list-style: none; padding: 0; margin: 10px 0 0; border-left: 2px solid var(--line); }
.tl li { position: relative; padding: 0 0 12px 16px; font-size: 13.5px; }
.tl li::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); }
.tl li small { display: block; color: var(--muted); font-size: 12px; }
.bandbox { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0 12px; }
.bandbox div { background: var(--paper); border-radius: 10px; padding: 8px; text-align: center; font-size: 12px; color: var(--muted); }
.bandbox b { display: block; font-size: 18px; color: var(--ink); }
.prio { display: grid; gap: 8px; }
.prio-i { display: flex; gap: 12px; align-items: center; padding: 11px 12px; border-radius: 12px; background: var(--paper); }
.prio-i .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c, var(--red)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--red)) 18%, transparent); }
.prio-i .t { flex: 1; min-width: 0; font-size: 14px; }
.prio-i .t b { display: block; }
.prio-i .t span { color: var(--muted); font-size: 12.5px; }
.bar-mini { height: 8px; border-radius: 999px; background: #efe9e2; overflow: hidden; }
.bar-mini i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--red)); }
.low { color: var(--red-deep); font-weight: 750; }
.kan { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.kcol { background: #efebe6; border-radius: 14px; padding: 10px; min-height: 200px; }
.kcol h3 { font: 800 11.5px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: 4px 4px 10px; display: flex; justify-content: space-between; }
.kcard { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 8px; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.05); border: 1.5px solid transparent; text-align: left; width: 100%; display: block; }
.kcard:hover, .kcard.sel { border-color: var(--blue); }
.kcard b { display: block; font-size: 14.5px; }
.kcard span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.outbox-i { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; background: #fff; }
.outbox-i .h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.outbox-i .h b { color: var(--ink); font-size: 14.5px; }
.outbox-i pre { white-space: pre-wrap; font: 13.5px/1.5 var(--body); margin: 8px 0 0; color: var(--ink-2); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14px; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--blue-night); border-color: var(--blue); }
.qr { width: 120px; height: 120px; image-rendering: pixelated; border: 6px solid #fff; box-shadow: var(--shadow); border-radius: 8px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty b { display: block; font: 600 20px var(--display); color: var(--ink); margin-bottom: 6px; }
.ai-msg { padding: 14px 16px; border-radius: 14px; margin-bottom: 10px; font-size: 14.5px; white-space: pre-wrap; }
.ai-msg.me { background: var(--sky); margin-left: 15%; }
.ai-msg.bot { background: #fff; border: 1px solid var(--line); margin-right: 8%; }
.calc input { text-align: right; }
.calc .out { background: var(--paper); border-radius: 14px; padding: 16px; }
.calc .out div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: 14.5px; }
.calc .out div:last-child { border: 0; }
.calc .out b { font-size: 16px; }
.mapmini { background: linear-gradient(180deg, #dcebf8, #cfe2f4); border-radius: 14px; aspect-ratio: 4/5; overflow: hidden; }
.mapmini svg { width: 100%; height: 100%; }
.cmsprev { border: 1px dashed var(--line-2); border-radius: 12px; overflow: hidden; }
.cmsprev .bar { background: var(--red); color: #fff; padding: 8px 12px; font-size: 13.5px; font-weight: 600; text-align: center; }
.cmsprev .hero { padding: 20px; background: linear-gradient(90deg, #fffaf4, #fbe3e4); }
.cmsprev .hero b { font: 560 26px/1.1 var(--display); display: block; }
.state { font-size: 12px; font-weight: 750; padding: 3px 8px; border-radius: 6px; }
.state.pub { background: var(--mint); color: #0f5a3a; } .state.dr { background: var(--gold-soft); color: #7a4b00; }
.report { background: #fff; padding: 30px; border-radius: 16px; border: 1px solid var(--line); }
.report header { display: flex; align-items: center; gap: 16px; border-bottom: 3px solid var(--red); padding-bottom: 14px; margin-bottom: 18px; }
.report header img { height: 44px; }
.report h2 { font: 600 26px var(--display); margin: 0; }
@media print { .app { display: block; padding: 0; } .side, .top, .vh .acts, .noprint { display: none !important; } #view { padding: 0; } .pane, .report { border: 0; } }

/* audit fixes: nothing in the Hub may widen a phone screen */
.grid > *, .split > *, .listcol, .detcol, .vh > div, .pane, .kpi { min-width: 0; }
.pane h2 { flex-wrap: wrap; }
.pane pre { max-width: 100%; white-space: pre; overflow-x: auto; }
.filters .finput { min-width: 0; flex: 1 1 180px; }
@media (max-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .g3, .g2, .g21, .g12 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .vh h1 { font-size: 26px; overflow-wrap: anywhere; } .vh .acts { margin-left: 0; } .kv { grid-template-columns: 110px minmax(0, 1fr); } .kan { grid-template-columns: repeat(5, minmax(200px, 1fr)); } .bandbox { gap: 4px; } .bandbox div { padding: 6px 2px; font-size: 11px; } }
.vh .sample, .vh .sim { white-space: normal; }
/* audit: sticky bars pin to the very top once the concept bar scrolls away */
.top { top: 0; }
.side { top: 0; height: 100vh; }
.detail { top: 76px; max-height: calc(100vh - 96px); }
@media (max-width: 980px) { .side { top: 0; height: 100vh; padding-top: calc(var(--bar) + 12px); } }
