:root { --navy: #26345a; --blue: #2f5bdc; --line: #e3e6ef; --bg: #f1f3f9; --text: #1f2433; --muted: #68708a; --good: #177a3c; --bad: #b3261e; --warn: #9a5700; }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 "Segoe UI", system-ui, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--blue); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0; } h2 { font-size: 15px; margin: 0 0 10px; } h3 { font-size: 13px; margin: 6px 0 0; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
small { display: block; color: var(--muted); font-size: 12px; }
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
nav { background: var(--navy); color: #fff; padding: 12px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; margin-bottom: 16px; }
.brand i { font-style: normal; background: #0f9d8a; color: #fff; border-radius: 6px; padding: 3px 6px; font-size: 12px; }
#links { display: grid; gap: 2px; }
nav a { color: #d8def0; padding: 8px 10px; border-radius: 6px; } nav a:hover { background: #33436f; text-decoration: none; } nav a.on { background: #3d5084; color: #fff; font-weight: 600; }
.me { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; } .me small { color: #aab4d4; }
main { padding: 16px 20px 40px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.btn { font: inherit; border: 1px solid #cdd3e3; background: #fff; color: var(--text); border-radius: 7px; padding: 7px 14px; cursor: pointer; display: inline-block; }
.btn:hover { background: #f5f7fc; text-decoration: none; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; } .btn.primary:hover { background: #244bc0; }
.btn.small { padding: 3px 10px; font-size: 12.5px; } .btn:disabled { opacity: .45; cursor: not-allowed; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; } .card-head h2 { margin: 0; }
details summary { cursor: pointer; display: flex; gap: 8px; align-items: center; } details summary h2 { margin: 0; }
.count { background: var(--bg); border-radius: 10px; padding: 0 9px; font-weight: 600; }
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; } .toolbar input[type=search] { width: 320px; max-width: 100%; }
input, select, textarea { font: inherit; border: 1px solid #cdd3e3; border-radius: 7px; padding: 6px 9px; background: #fff; color: var(--text); width: 100%; }
.toolbar input { width: auto; }
.seg { margin-left: auto; display: flex; } .seg button { font: inherit; border: 1px solid #cdd3e3; background: #fff; padding: 6px 14px; cursor: pointer; } .seg button.on { background: #e6ecff; color: var(--blue); font-weight: 600; }
.split { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; align-items: start; }
.filters { display: grid; gap: 10px; }
label span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.table-wrap { overflow-x: auto; background: #fff; border-radius: 8px; }
#results > .table-wrap { border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; } th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
th { font-weight: 600; font-size: 13px; background: #fafbfe; } th button { font: inherit; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; }
td.blockers { white-space: normal; min-width: 200px; color: var(--muted); font-size: 12.5px; }
tbody tr:hover { background: #f7f9ff; }
.pager { display: flex; justify-content: space-between; padding: 10px 4px; }
.pill { display: inline-block; border-radius: 20px; padding: 2px 11px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.demographics-pending { background: #fff0d6; color: #7a4600; } .insurance-pending { background: #ffe5c7; color: #8a3d00; }
.ready-to-schedule { background: #c9eecf; color: #115c2b; } .scheduled { background: #d6e8ff; color: #134a8e; }
.re-verification-needed { background: #c2410c; color: #fff; } .seen { background: #177a3c; color: #fff; }
.on-hold { background: #e4e6ee; color: #444b62; } .closed-lost { background: #c0392f; color: #fff; }
.mark { font-size: 12px; font-weight: 600; } .mark.yes { color: var(--good); } .mark.no { color: var(--bad); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: #fff; border: 1px solid var(--line); border-top: 4px solid #8f9abb; border-radius: 10px; padding: 12px 14px; color: var(--text); }
.tile b { display: block; font-size: 28px; } .tile span { color: var(--muted); } .tile.good { border-top-color: var(--good); } .tile.warn { border-top-color: #e08a00; } .tile.bad { border-top-color: var(--bad); }
.bar-row { display: grid; grid-template-columns: 190px 1fr 40px; gap: 10px; align-items: center; margin: 7px 0; } .bar-row .pill { justify-self: start; }
.bar { background: var(--bg); border-radius: 4px; height: 10px; } .bar i { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.board { display: flex; gap: 12px; overflow-x: auto; align-items: start; padding-bottom: 8px; }
.lane { flex: 0 0 220px; background: #e7eaf3; border-radius: 10px; padding: 8px; } .wide-lane { flex-basis: 290px; }
.lane header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 0 2px; }
.kcard { display: grid; gap: 3px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 8px; padding: 9px 10px; margin-bottom: 8px; color: var(--text); }
.kcard span { font-size: 12.5px; color: var(--muted); } .kcard.risk { border-left-color: var(--bad); background: #fff7f5; } .kcard.cancelled, .kcard.no-show { opacity: .55; } .kcard.completed { border-left-color: var(--good); }
.columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
.back { display: inline-block; margin-bottom: 8px; }
dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 16px; margin: 0 0 10px; } dt { font-size: 12px; color: var(--muted); } dd { margin: 0; overflow-wrap: anywhere; }
tr.removed td { opacity: .5; text-decoration: line-through; }
.policy { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; } .policy.removed { opacity: .5; }
.policy-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.checks { list-style: none; padding: 0; margin: 8px 0; } .checks li { display: flex; gap: 8px; padding: 5px 0; } .checks .yes b { color: var(--good); } .checks .no b { color: var(--bad); }
.gate { border-radius: 8px; padding: 8px 12px; font-weight: 600; margin-bottom: 8px; } .gate.yes { background: #dff4e3; color: #115c2b; } .gate.no { background: #fde5e2; color: #8f1d17; }
.warn-text, .kcard span.warn-text { color: var(--warn); font-size: 12.5px; }
.entry { border-top: 1px solid var(--line); padding: 7px 0; } .entry p { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
#note { display: grid; gap: 6px; justify-items: start; margin-bottom: 8px; }
.note { color: var(--muted); margin: 6px 0 10px; } .empty { color: var(--muted); padding: 8px 2px; }
dialog { border: 0; border-radius: 12px; padding: 0; width: min(660px, 94vw); box-shadow: 0 20px 60px #0005; } dialog::backdrop { background: #1a223c88; }
dialog form { padding: 18px 20px; } dialog header, dialog footer { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; } dialog footer { justify-content: flex-end; gap: 8px; margin: 14px 0 0; }
.icon { background: none; border: 0; font-size: 16px; cursor: pointer; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; } .wide { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 8px; } .check input { width: auto; }
.form-error { color: var(--bad); margin-top: 10px; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; } .auth > .card, .auth > form { width: min(400px, 100%); display: grid; gap: 12px; padding: 24px; }
.stack { display: grid; gap: 12px; } .narrow { max-width: 520px; } [hidden] { display: none !important; }
.secret { font: 600 17px/1.6 Consolas, monospace; background: var(--bg); border-radius: 8px; padding: 10px 12px; overflow-wrap: anywhere; }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #14532d; color: #fff; padding: 10px 18px; border-radius: 8px; display: none; z-index: 10; } #toast.show { display: block; } #toast.bad { background: var(--bad); }
@media (max-width: 900px) {
  .shell, .split, .columns { grid-template-columns: minmax(0, 1fr); }
  nav { position: static; height: auto; } #links { grid-template-columns: 1fr 1fr; } .me { margin-top: 12px; }
  .grid { grid-template-columns: 1fr; } .bar-row { grid-template-columns: 160px 1fr 30px; }
}

/* MKB-SPC branding */
.brand .sub { display: block; font-weight: 400; font-size: 11px; color: #aab4d4; }
.auth .brand .sub { color: var(--muted); }

/* Care navigation: touch-first forms (targets at least 44px tall) */
.btn.big { min-height: 46px; padding: 10px 18px; font-size: 15px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; font-weight: 600; }
.btn[aria-disabled] { opacity: .45; pointer-events: none; }
.ok-text { color: var(--good); } .bad-text { color: var(--bad); }
dialog.tap-modal { width: min(920px, 100vw); max-width: 100vw; max-height: 100dvh; height: min(100dvh, 960px); }
dialog.tap-modal form.tap { display: flex; flex-direction: column; height: 100%; padding: 0; }
.tap > header { padding: 14px 20px; margin: 0; border-bottom: 1px solid var(--line); } .tap > header h2 { margin: 0; font-size: 18px; }
.tap > footer { padding: 12px 20px; margin: 0; border-top: 1px solid var(--line); background: #fafbfe; }
.tap .form-error { padding: 0 20px; margin: 0; } .tap .form-error:not(:empty) { padding: 10px 20px; background: #fde5e2; font-weight: 600; }
.tap-body { flex: 1; overflow-y: auto; padding: 4px 20px 20px; -webkit-overflow-scrolling: touch; }
.tap-section { padding: 14px 0; border-bottom: 1px solid var(--line); } .tap-section:last-child { border-bottom: 0; }
.tap-section h3 { margin: 0 0 10px; }
.tap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.tap-item, .tap-info, .tick, .tap-grid > .ticks { grid-column: 1 / -1; }
.tap-field:not(.wide) { grid-column: auto; }
.tap-label { display: block; font-weight: 600; font-size: 14px; margin: 6px 0 7px; } .tap-label em { color: var(--bad); font-style: normal; }
.tap-hint { margin-top: 4px; }
.tap-field input, .tap-field textarea { font-size: 16px; min-height: 46px; padding: 10px 12px; }
.tap-info p { margin: 0 0 8px; } .tap-info ul { margin: 4px 0 8px 18px; padding: 0; }
.script { background: #eef3ff; border-left: 4px solid var(--blue); padding: 10px 12px; border-radius: 6px; }
.big-num { font-size: 22px; font-weight: 700; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: 15px; min-height: 44px; padding: 9px 16px; border-radius: 22px; border: 1.5px solid #c3cbe0; background: #fff; color: var(--text); cursor: pointer; text-align: left; }
.chip:hover { border-color: var(--blue); } .chip.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.chip:disabled { opacity: .45; cursor: not-allowed; } .chip:focus-visible, .tick:focus-visible { outline: 3px solid #9fb6ff; outline-offset: 2px; }
.chips.small .chip { min-height: 36px; padding: 5px 12px; font-size: 13.5px; background: #f3f5fb; }
.ticks { display: grid; gap: 8px; }
.tick { display: flex; gap: 12px; align-items: center; width: 100%; font: inherit; font-size: 15px; text-align: left; min-height: 52px; padding: 10px 14px;
  border: 1.5px solid #c3cbe0; border-radius: 10px; background: #fff; color: var(--text); cursor: pointer; }
.tick b { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; border: 2px solid #9aa3bd; color: #fff; font-size: 17px; }
.tick.on { border-color: var(--good); background: #eefaf1; } .tick.on b { background: var(--good); border-color: var(--good); }
.tick.auto { cursor: default; } .tick.auto.bad { border-color: var(--bad); background: #fff5f4; } .tick.auto.bad b { background: var(--bad); border-color: var(--bad); }
.tick small { display: block; } .tick:disabled { cursor: default; }
.mbar { position: relative; height: 14px; background: #e6e9f2; border-radius: 7px; margin: 18px 0 6px; }
.mbar i { display: block; height: 100%; border-radius: 7px; background: #e08a00; } .mbar i.met { background: var(--good); }
.mbar b { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #59617a; }
.mbar b span { position: absolute; top: -16px; left: -8px; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.summary-card { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.sum-num b { display: block; font-size: 40px; line-height: 1; } .sum-num span { color: var(--muted); }
.sum-bar { flex: 1; min-width: 240px; } .sum-bar p { margin: 4px 0 0; }
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.pt { display: grid; gap: 10px; margin: 0; } .pt header a { font-size: 16px; }
.pt footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; }
.prog { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.prog-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .prog-head b { font-size: 18px; }
.prog .row { justify-content: space-between; margin-top: 6px; }
.pt .btn, .call .btn { min-height: 44px; }
.call-list { display: grid; gap: 8px; } .call { display: grid; grid-template-columns: 60px 1fr auto; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding-top: 8px; }
.call b { font-size: 17px; }
.month-nav .btn { min-width: 46px; }
.note-doc { max-width: 980px; } .note-doc > header { display: flex; justify-content: space-between; border-bottom: 2px solid #1e6b5e; padding-bottom: 8px; margin-bottom: 8px; color: #1e6b5e; font-size: 16px; }
.note-sec h3 { background: #1e6b5e; color: #fff; padding: 5px 10px; border-radius: 4px; margin: 14px 0 8px; text-transform: none; letter-spacing: 0; font-size: 13.5px; }
@media (max-width: 700px) {
  dialog.tap-modal { height: 100dvh; border-radius: 0; } .tap-grid { grid-template-columns: 1fr; } .tap-field:not(.wide) { grid-column: 1 / -1; }
  .call { grid-template-columns: 50px 1fr; } .call .row { grid-column: 1 / -1; }
}
.log-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 14px; align-items: start;
  grid-template-areas: "a b" "c c" "d e"; }
.log-a { grid-area: a; } .log-b { grid-area: b; } .log-c { grid-area: c; } .log-d { grid-area: d; } .log-e { grid-area: e; }
.pt-grid { align-items: start; }
@media (max-width: 900px) { .log-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "a" "b" "c" "d" "e"; } }
.view-seg { margin-left: auto; } .view-seg button { min-height: 44px; min-width: 72px; font-size: 15px; }
.list-card td { vertical-align: middle; } .list-card tr.cont td { border-top: 0; } .list-card tr.first td { border-top: 1px solid var(--line); }
.list-card td small { display: block; } .list-card .btn { min-height: 44px; } .nowrap { flex-wrap: nowrap; }
.mins b { font-size: 16px; margin-right: 6px; }
.mini { display: inline-block; width: 70px; height: 8px; background: #e6e9f2; border-radius: 4px; vertical-align: middle; overflow: hidden; }
.mini i { display: block; height: 100%; background: #e08a00; } .mini i.met { background: var(--good); }
.list-card th, .list-card td { white-space: normal; padding: 10px 8px; } .list-card .pill { white-space: nowrap; }
.list-card .row.nowrap { flex-wrap: wrap; } .list-card .mins { min-width: 130px; }
.btn.huge { min-height: 56px; padding: 14px 24px; font-size: 17px; }
.cn-action { border: 2px solid #c9d6ff; } .cn-action h2 { font-size: 17px; }
.visit-list { display: grid; gap: 10px; }
.visit-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto 24px; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line);
  border-left: 5px solid #8f9abb; border-radius: 10px; padding: 14px 16px; color: var(--text); min-height: 72px; }
.visit-row:hover { text-decoration: none; border-color: var(--blue); } .visit-row.ready { border-left-color: #e08a00; }
.vtime { font-size: 18px; font-weight: 700; } .vtime small { font-weight: 400; } .vwho b { font-size: 16px; }
.vtags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; } .vgo { font-size: 26px; color: var(--muted); }
@media (max-width: 700px) { .visit-row { grid-template-columns: 70px minmax(0, 1fr) 18px; } .vtags { grid-column: 2 / 3; justify-content: flex-start; } }
