/* Convia Health. Every clinic sees the same Convia colors; a clinic's own branding is its logo
   (the white tile, top-left) and an optional accent color used only on printed documents. */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/Inter-Regular.woff) format("woff"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/Inter-Medium.woff) format("woff"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/Inter-SemiBold.woff) format("woff"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 700 900; font-display: swap; src: url(fonts/Inter-Bold.woff) format("woff"); }
:root {
  --corso-blue: #3B5B85;      /* primary: header, primary buttons, links */
  --corso-blue-soft: #5579A4; /* hover, selected nav item, tile accents */
  --corso-sage: #BFE0CF;      /* accent on the blue header */
  --corso-sage-deep: #3E7D5F; /* sage text / icons on white */
  --corso-sage-tint: #E6EFE7; /* light sage backgrounds */
  --corso-slate: #2D4140;     /* main text */
  --corso-gray: #66716F;      /* secondary text */
  --corso-bg: #F6F8F7;
  --corso-white: #FFFFFF;
  /* The names the screens already use, pointed at the Convia palette. */
  --teal: var(--corso-blue); --teal-2: var(--corso-blue-soft); --ink: var(--corso-slate); --muted: var(--corso-gray);
  --line: #E4E9E8; --bg: var(--corso-bg); --card: #FFFFFF; --band: #EEF2F7;
  --green: #0B7A43; --red: #B23A2E; --amber: #9A5B00; --amber-bg: #FFF4DE;
  --mint: var(--corso-sage-tint); --peach: #FBEBDD; --lav: #EAEAF5; --sky: #E7EEF4; --rose: #F6E9EC;
  --radius: 12px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; }
.num { font-variant-numeric: tabular-nums; }

/* ---- header + tabs ---- */
.top { background: var(--teal); color: #fff; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; padding-top: max(14px, env(safe-area-inset-top)); }
.brand { display: flex; gap: 12px; align-items: center; min-width: 0; }
/* Top-left: the Convia logo, then the practice's name. The same for every practice. */
.corso-head { height: 37px; width: auto; display: block; flex-shrink: 0; }
.brand-sep { width: 1px; align-self: stretch; background: rgba(255,255,255,.3); margin: 2px 2px; }
.brand-clinic { min-width: 0; }
@media (max-width: 600px) { .corso-head { height: 28px; } .brand { gap: 9px; } }
/* The app's own sign-in / welcome screens carry the Convia logo with its tagline. */
.corso-entry { display: flex; justify-content: center; padding: 34px 0 6px; }
.corso-entry img { width: 260px; max-width: 80%; height: auto; }
.practice { font-weight: 700; font-size: 17px; letter-spacing: .1px; }
.sub { font-size: 12.5px; opacity: .75; }
.demo-pill { font-size: 11px; font-weight: 700; letter-spacing: .6px; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3); padding: 4px 9px; border-radius: 99px; }
.top-r { display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; background: none; border: 0; padding: 6px; border-radius: 8px; }

/* ---- left rail ---- */
.shell { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.side { background: #fff; border-right: 1px solid var(--line); padding: 14px 10px 30px; position: sticky; top: 0;
  align-self: start; height: 100vh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.side .grp { font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .7px; color: var(--teal);
  padding: 14px 10px 6px; }
.side .grp:first-child { padding-top: 4px; }
.side a, .side .soon { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 11px;
  margin: 0 2px 5px; border-radius: 7px; font-size: 13.5px; text-decoration: none; border: 1px solid #CFDAD8; background: #fff; }
.side a { color: var(--teal); font-weight: 650; box-shadow: 0 1px 0 rgba(59,91,133,.08); }
.side a:hover { background: var(--band); border-color: var(--corso-blue-soft); }
.side a.on { background: var(--corso-blue-soft); border-color: var(--corso-blue-soft); color: #fff; }
.side a small { font-weight: 500; font-size: 11px; color: var(--muted); }
.side a.on small { color: rgba(255,255,255,.8); }
.side .soon { color: #A3AFAD; cursor: default; background: #FAFBFB; border-style: dashed; border-color: #DDE3E2; }
.side .soon::after { content: 'soon'; font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  background: #EEF1F1; color: #93A09E; padding: 2px 6px; border-radius: 99px; }
.side .grp { border-bottom: 2px solid var(--teal); margin: 0 2px 7px; padding-left: 2px; padding-right: 2px; }
.scrim { display: none; }
.content { min-width: 0; }

main { max-width: 1400px; margin: 0 auto; padding: 22px 24px 40px; outline: none; }
h1 { font-size: 22px; margin: 0 0 4px; color: var(--teal); }
.lede { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .7px; color: var(--teal); margin: 0; }

/* ---- toolbar / week picker ---- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 18px; }
.toolbar label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
select, input[type=number], input[type=date], input[type=time], input[type=text], input[type=tel], input[type=email], input[type=search], input[type=url], input[type=password], input:not([type]) {
  font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid #C7D0CE; border-radius: 8px; background: #fff;
  color: var(--ink); min-height: 42px; }
select:focus, input:focus { outline: 2px solid #9FD3B8; outline-offset: 1px; border-color: var(--teal-2); }

/* ---- KPI tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.tiles .tile { min-width: 0; overflow-wrap: anywhere; }
.tile { border-radius: var(--radius); padding: 14px 16px; min-height: 86px; display: flex; flex-direction: column; justify-content: flex-start; }
.tile .h { margin-top: auto !important; padding-top: 2px; }
.tile .k { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.tile .v { font-size: 24px; font-weight: 750; color: #274240; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tile .h { font-size: 12px; color: var(--muted); margin-top: 2px; }
.t0 { background: var(--mint); } .t1 { background: var(--peach); } .t2 { background: var(--lav); }
.t3 { background: var(--sky); } .t4 { background: var(--rose); }
.gap { height: 12px; }

/* ---- cards + tables ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 16px; overflow: hidden; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-h .note { font-size: 12.5px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x pan-y; max-width: 100%; }
/* The right edge fades while there's more to see; the fade goes away at the end. */
.scroll.more-r { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), rgba(0,0,0,.25)); mask-image: linear-gradient(to right, #000 calc(100% - 28px), rgba(0,0,0,.25)); }
.scroll.auto-wrap { margin: 0; }
.grid2 .card { margin-top: 0; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700;
  padding: 10px 14px; background: #FAFBFB; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: var(--band); }
.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td { font-weight: 750; color: var(--teal); background: #fff !important; border-top: 2px solid var(--teal); }
tr.held td { font-style: italic; color: var(--teal-2); background: #fff !important; }
.empty { padding: 22px 16px; color: var(--muted); text-align: center; }

/* ---- A/R tab: Sheet-style sections ---- */
.titlebar { background: var(--teal); color: #fff; border-radius: 10px; padding: 12px 16px; margin-bottom: 12px;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; }
.titlebar h1 { color: #fff; margin: 0; font-size: 19px; }
.titlebar span { font-size: 12.5px; opacity: .82; }
.tiles + .tiles { margin-top: 0; }
.ar-top { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.ar-top .col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ar-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.ar-top .sec, .ar-two .sec { margin-top: 0; }
.ar-top, .ar-two { margin-top: 14px; }
.sec { background: var(--card); border: 1px solid #CFDAD8; border-radius: 8px; margin-top: 14px; overflow: hidden; min-width: 0; }
.sec-h { background: var(--teal); color: #fff; padding: 8px 12px; display: flex; justify-content: space-between; align-items: baseline;
  gap: 4px 12px; flex-wrap: wrap; font-size: 12.5px; font-weight: 750; letter-spacing: .8px; text-transform: uppercase; }
.sec-n { font-size: 11.5px; font-weight: 500; letter-spacing: 0; text-transform: none; opacity: .8; }
table.dense { font-size: 13.5px; }
table.dense th { padding: 7px 10px; font-size: 11px; background: #E9F0EE; color: var(--teal); border-bottom: 1px solid #CFDAD8; }
table.dense td { padding: 7px 10px; border-bottom: 1px solid #EDF1F0; }
table.dense td.lead { font-weight: 600; }
table.dense .barcol { width: 30%; }
table.dense tr.total td { border-top: 2px solid var(--teal); }
td.muted { color: var(--muted); font-size: 12.5px; }
td.wrap { white-space: normal; }
.kv { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid #CFDAD8; background: #F7FAF9; }
.kv > div { padding: 8px 10px; border-right: 1px solid #E4EAE9; }
.kv > div:last-child { border-right: 0; }
.kv span { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.kv b { font-size: 15px; color: var(--teal); font-variant-numeric: tabular-nums; }
.kv b.owe { color: var(--red); }
.mixbar { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.mixbar .bar { flex: 1; }
.mixbar .r { font-size: 12.5px; min-width: 44px; }

/* titlebar week picker, filters, small bits */
.tb-pick { display: flex; align-items: center; gap: 8px; opacity: 1 !important; }
.tb-pick label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; opacity: .85; }
.tb-pick select { min-height: 34px; padding: 5px 9px; font-size: 14px; border-color: rgba(255,255,255,.35); }
.filters { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 10px 12px; background: #F7FAF9; border-bottom: 1px solid #CFDAD8; }
.filters.solo { background: none; border: 0; padding: 0 0 12px; }
.filters label { display: flex; align-items: center; gap: 7px; }
.filters span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.filters select { min-height: 34px; padding: 5px 9px; font-size: 14px; }
.sec-foot { padding: 8px 12px; font-size: 12.5px; color: var(--muted); border-top: 1px solid #EDF1F0; }
.tag { font-size: 10px; font-weight: 700; text-transform: uppercase; background: var(--amber-bg); color: var(--amber); padding: 1px 5px; border-radius: 4px; margin-left: 4px; }
.muted { color: var(--muted); }
.btn.danger { color: var(--red); border-color: #E7C3BE; }
.btn.danger:hover { background: #FBEDEB; }

/* round 3 bits */
.pad { padding: 12px 14px 4px; }
input.cell, select.cell { min-height: 32px; padding: 4px 8px; font-size: 13.5px; width: 96px; text-align: right; }
select.cell { width: 120px; text-align: left; }
.grid-entry input.hrs { width: 58px; min-height: 34px; padding: 4px 6px; font-size: 14px; text-align: right; }
.grid-entry td.days { font-weight: 750; color: var(--teal); }
.amber { color: var(--amber); font-weight: 700; }
.colorrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.colorrow input[type=color] { width: 46px; height: 38px; padding: 2px; border: 1px solid #C7D0CE; border-radius: 8px; background: #fff; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #C7D0CE; padding: 0; }
.logoprev { display: flex; align-items: center; gap: 12px; margin-top: 8px; min-height: 40px; }
.logoprev img { max-height: 56px; max-width: 200px; border-radius: 6px; background: #fff; padding: 4px; border: 1px solid var(--line); }
.ar-top .row-end { margin-top: 0; }
@media print {
  .top, .side, .foot, .noprint, .scrim { display: none !important; }
  .shell { display: block; } main { max-width: none; padding: 0; }
  .sec, .tile { break-inside: avoid; } body { background: #fff; }
  .titlebar, .sec-h { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tile { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* signed-in box */
.whobox { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #fff; }
.who-email { opacity: .9; } .who-role { background: rgba(255,255,255,.16); padding: 2px 8px; border-radius: 99px; font-weight: 700; text-transform: capitalize; }
.who-out { color: #fff; opacity: .85; } .who-sel { min-height: 28px; padding: 2px 6px; font-size: 12px; border-radius: 6px; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .who-email, .demo-pill, .who-role { display: none; }
  .top { flex-wrap: wrap; row-gap: 8px; }
  .brand { min-width: 0; flex: 1 1 auto; }
  .practice { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
  .whobox { order: 3; flex: 1 0 100%; justify-content: flex-start; flex-wrap: wrap; }
  .who-sel { max-width: 46vw; }
}

/* demo practice banner */
.demoban { background: #EAF2FA; color: #24496E; border-bottom: 1px solid #CFE0F1; padding: 9px 20px; font-size: 13.5px; font-weight: 650; text-align: center; }

code.copy { background: #EEF3F2; border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; cursor: pointer; word-break: break-all; }

.issues li { margin: 4px 0; } .fixbtn { margin-left: 6px; min-height: 26px !important; padding: 2px 10px !important; }

.snaphead { justify-content: flex-start; align-items: center; } .snaphead span { margin-left: auto; }
.snaplogo { height: 40px; width: auto; background: #fff; border-radius: 6px; padding: 2px; }

.bendet { border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; margin: 4px 0 12px; }
.bendet summary { cursor: pointer; font-weight: 700; color: var(--teal); padding: 4px 0; }
.bendet[open] summary { margin-bottom: 8px; }

/* ---- intake ---- */
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.idrow { display: flex; gap: 16px; align-items: flex-start; }
.idfields { flex: 1; min-width: 0; }
.photobox { width: 132px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1px dashed #C7D0CE; border-radius: 10px; padding: 8px; min-height: 150px; justify-content: center; }
.photobox img { width: 112px; height: 132px; object-fit: cover; border-radius: 8px; }
.photobtns { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.cardphoto { width: 72px; height: 86px; object-fit: cover; border-radius: 8px; flex: none; }
.docbtns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.polbox { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 2px; margin-bottom: 12px; }
.polh { font-weight: 750; color: var(--teal); margin-bottom: 6px; }
.lbl2 { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 6px 0; }
table.edit input, table.edit select { width: 100%; min-height: 34px; padding: 5px 8px; font-size: 14px; }
.assess { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; background: #FBFCFC; }
textarea { font: inherit; font-size: 15px; padding: 9px 11px; border: 1px solid #C7D0CE; border-radius: 8px; width: 100%; resize: vertical; }
.static { padding: 9px 0; font-weight: 650; }
.sticky-save { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; margin-top: 14px; z-index: 5; border-top: 1px solid var(--line); }
@media (max-width: 760px) { .three { grid-template-columns: 1fr; } .idrow { flex-direction: column; } }

/* ---- printable documents ---- */
.docbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; font-size: 12.5px; }
.doc { background: #fff; color: #111; max-width: 850px; margin: 0 auto; padding: 28px 32px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; line-height: 1.35; }
.dochead { display: flex; gap: 14px; align-items: center; border-bottom: 2px solid var(--teal); padding-bottom: 10px; }
.doclogo { height: 52px; width: auto; }
.docorg { font-size: 16px; font-weight: 800; color: var(--teal); }
.docaddr { font-size: 11.5px; color: #444; }
.doctitle { margin-left: auto; text-align: right; font-size: 17px; font-weight: 800; }
.docdate { font-size: 11px; font-weight: 400; color: #555; }
.part2 { margin: 10px 0; padding: 6px 10px; border: 1.5px solid #111; font-weight: 700; font-size: 11.5px; text-align: center; }
.doc h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--teal); margin: 14px 0 5px; border-bottom: 1px solid #DDE3E2; padding-bottom: 3px; }
.docgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.docphoto { width: 96px; height: 116px; object-fit: cover; border: 1px solid #ccc; float: right; margin: 0 0 6px 10px; }
.kvt { width: 100%; border-collapse: collapse; }
.kvt th { text-align: left; font-weight: 600; color: #444; width: 42%; padding: 3px 6px 3px 0; font-size: 12px; text-transform: none; letter-spacing: 0; background: none; border: 0; white-space: normal; }
.kvt td { padding: 3px 0; border-bottom: 1px dotted #ccc; background: none !important; }
.kvt.wide th { width: 38%; } .kvt.wide td { height: 24px; }
.blank { display: inline-block; min-width: 60%; }
.blankp { border-bottom: 1px dotted #aaa; height: 18px; margin: 4px 0; }
table.lined td { padding: 3px 6px 3px 0; border-bottom: 1px dotted #ccc; background: none !important; }
.sigline { margin-top: 26px; }
.docfoot { margin-top: 24px; padding-top: 6px; border-top: 1px solid #ccc; font-size: 10px; color: #555; }
.formgrid { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.formgrid th, .formgrid td { border: 1px solid #999; padding: 3px 5px; vertical-align: top; background: none !important; text-transform: none; letter-spacing: 0; color: #111; white-space: normal; }
.formgrid th { font-weight: 600; background: #F3F5F5 !important; width: 34%; }
.fl { display: inline-block; min-width: 34px; font-weight: 800; color: var(--teal); }
@media (max-width: 760px) { .docgrid { grid-template-columns: 1fr; } .doc { padding: 16px; } }
@media print {
  .docbar, .demoban, .toast { display: none !important; }
  .doc { border: 0; padding: 0; max-width: none; font-size: 11.5px; }
  .doc h3, .dochead, .docorg, .fl { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* status badges */
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.b-paid { background: #E3F3EA; color: var(--green); }
.b-sub { background: #E7EEF4; color: #2A5574; }
.b-part { background: #FFF6CC; color: #7A6000; }
.b-not { background: #EEF0F1; color: #55606A; }
.b-gray { background: #EEF0F1; color: #55606A; }
.b-den { background: #FBE7E4; color: var(--red); }
.b-disp { background: #EFE7F6; color: #5B3A7E; }
.b-owed { background: #FFE8D2; color: #A24A00; }
.no { color: var(--red); font-weight: 700; } .yes { color: var(--green); font-weight: 700; }
.neg { color: var(--green); } .owe { color: var(--red); }

/* aging bars */
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; min-width: 60px; }
.bar > span { display: block; height: 100%; background: var(--teal-2); border-radius: 99px; }
.bar.late > span { background: var(--red); }

/* strips */
.strip { margin-top: 12px; padding: 11px 14px; border-radius: 10px; font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.strip.disp { background: #E7ECEC; color: var(--teal); font-weight: 600; }
.strip.ok { background: #E3F3EA; color: var(--green); font-weight: 600; }
.strip.warn { background: var(--amber-bg); color: #6B4200; }
.strip.warn ul { margin: 4px 0 0; padding-left: 18px; }
.strip .ico { flex: none; font-size: 16px; line-height: 1.2; }

/* buttons */
button { font: inherit; cursor: pointer; white-space: nowrap; }
.btn { background: var(--teal); color: #fff; border: 0; border-radius: 8px; padding: 11px 18px; font-weight: 700; font-size: 15px; min-height: 44px; }
.btn:hover { background: var(--teal-2); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: #fff; color: var(--teal); border: 1px solid #C7D0CE; }
.btn.sm { padding: 6px 11px; font-size: 13px; min-height: 32px; font-weight: 600; }
.link { background: none; border: 0; color: var(--teal); text-decoration: underline; padding: 0; font-size: 13px; }
.acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.acts .btn { width: 100%; }
.claims .who { font-weight: 650; white-space: nowrap; }
.claims .wk { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.claims td, .claims th { padding-left: 12px; padding-right: 12px; }
.claims td:last-child { width: 1%; }
td.nw { white-space: nowrap; }

/* ---- payment form ---- */
.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; max-width: 560px; }
.field { margin-bottom: 16px; }
.field > label, .field > .lbl { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 6px; }
.field select, .field input { width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #C7D0CE; border-radius: 9px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 11px; font-weight: 700; color: var(--muted); min-height: 44px; }
.seg button.on { background: var(--teal); color: #fff; }
.check { display: flex; gap: 10px; align-items: flex-start; background: #F4F7F6; border-radius: 9px; padding: 12px; margin-bottom: 10px; cursor: pointer; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--teal); flex: none; }
.check .t { font-weight: 600; }
.check .d { font-size: 13px; color: var(--muted); margin-top: 2px; }
.preview { background: var(--band); border-radius: 9px; padding: 12px 14px; font-size: 14px; margin: 4px 0 16px; }
.preview b { color: var(--teal); }
.err { color: var(--red); font-size: 14px; margin-top: 10px; }

/* toast + modal */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); background: var(--ink); color: #fff;
  padding: 12px 16px; border-radius: 10px; font-size: 14px; max-width: min(92vw, 560px); opacity: 0; pointer-events: none;
  transition: .25s ease; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
dialog { border: 0; border-radius: 14px; padding: 0; width: min(92vw, 440px); box-shadow: 0 20px 50px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(26,43,41,.45); }
dialog form { padding: 20px; max-height: 86vh; overflow-y: auto; }
dialog h3 { margin: 0 0 6px; color: var(--teal); font-size: 18px; }
dialog p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.opt input { margin-top: 3px; accent-color: var(--teal); }
.row-end { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

.foot { max-width: 1400px; margin: 0 auto; padding: 0 20px 30px; display: flex; justify-content: space-between; gap: 10px;
  color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }

/* ---- phone ---- */
/* Narrower screens: the rail becomes a slide-in menu. */
@media (max-width: 1100px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .menu-btn { display: inline-flex; }
  .side { position: fixed; top: 0; left: 0; bottom: 0; width: 260px; max-height: none; z-index: 30;
    transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
  body.menu-open .side { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(26,43,41,.4); z-index: 20; }
  .scrim[hidden] { display: none; }
}
/* Half-width blocks: tighter so money columns fit side by side. */
.ar-top table.dense { font-size: 12.5px; }
.ar-top table.dense th, .ar-top table.dense td { padding: 6px 7px; }
.ar-top table.dense th:first-child, .ar-top table.dense td:first-child { padding-left: 10px; }
table.dense .acts { flex-direction: row; gap: 5px; }
table.dense .acts .btn { width: auto; }
table.dense .btn.sm { min-height: 28px; padding: 4px 10px; font-size: 12.5px; }
@media (max-width: 1499px) {
  .ar-two { grid-template-columns: 1fr; }
}
@media (max-width: 1240px) {
  table.dense .acts { flex-direction: column; }
  table.dense .acts .btn { width: 100%; }
}
@media (max-width: 980px) {
  .ar-top { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  main { padding: 16px 14px 30px; }
  .kv { grid-template-columns: 1fr 1fr; }
  .kv > div:nth-child(2) { border-right: 0; }
  .kv > div:nth-child(-n+2) { border-bottom: 1px solid #E4EAE9; }
  table.stack.dense tr { padding: 8px 12px; }
  table.dense .barcol { width: auto; }
  .mixbar { min-width: 0; width: 55%; }
  table.stack tr.total { border-top: 2px solid var(--teal); }
  table.stack tr.total td { border-top: 0; }
  /* Small summary tables stay as tables on a phone, just tighter. */
  .ar-top table.compact { font-size: 11.5px; }
  .ar-top table.compact th { font-size: 9.5px; letter-spacing: .2px; padding: 6px 4px; white-space: normal; }
  .ar-top table.compact td { padding: 6px 4px; }
  .ar-top table.compact th:first-child, .ar-top table.compact td:first-child { padding-left: 8px; }
  .ar-top table.compact th:last-child, .ar-top table.compact td:last-child { padding-right: 8px; }
  table.compact .barcol { display: none; }
  table.compact .hide-sm { display: none; }
  table.dense .acts { flex-direction: row; justify-content: flex-end; }
  table.dense .acts .btn { width: auto; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile .v { font-size: 20px; }
  .grid2 { grid-template-columns: 1fr; gap: 0; }
  .grid2 .card { margin-top: 16px; }
  .two { grid-template-columns: 1fr; }
  /* Tables become stacked cards on a phone. */
  table.stack thead { display: none; }
  table.stack tr { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); }
  table.stack tbody tr:nth-child(even) { background: var(--band); }
  table.stack td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 0; background: none !important; text-align: right; }
  table.stack td::before { content: attr(data-l); color: var(--muted); font-size: 12.5px; text-align: left; font-weight: 600; }
  table.stack td.lead { font-weight: 700; font-size: 15px; }
  table.stack td.lead::before { content: none; }
  table.stack td.lead { display: block; text-align: left; }
  .acts { flex-direction: row; }
  .acts .btn { width: auto; }
  table.stack td.hide-sm { display: none; }
}

/* ---- access editor & staff ---- */
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.acctbl { margin: 4px 0 12px; }
.acctbl td { vertical-align: middle; }
.lvls { display: inline-flex; border: 1px solid #C7D0CE; border-radius: 8px; overflow: hidden; }
.lvl { position: relative; cursor: pointer; display: flex; }
.lvl input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.lvl span { display: flex; align-items: center; justify-content: center; flex: 1; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--muted); background: #fff; min-width: 52px; text-align: center; }
.lvl + .lvl span { border-left: 1px solid #C7D0CE; }
.lvl input:checked + span { background: var(--teal); color: #fff; }
.lvl input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: -3px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { position: relative; cursor: pointer; }
.sw input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.sw span { display: block; width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px #C7D0CE; }
.sw input:checked + span { box-shadow: 0 0 0 2px var(--ink); }
.sw input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 7px; vertical-align: 0; }
.link.danger { color: #B3392F; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.days7 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 8px; }
.days7 .field input { padding-left: 8px; padding-right: 8px; }
.comptbl th:first-child { width: 42%; }
.authsum { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.authsum > div { display: flex; flex-direction: column; }
.authsum b { font-size: 20px; }
.authsum span { font-size: 12px; color: var(--muted); }
td a[href^="tel:"], td a[href^="mailto:"] { color: var(--teal); font-weight: 600; }

/* ================= calendar ================= */
.small { font-size: 12.5px; }
.iconbtn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--ink); cursor: pointer; }
.iconbtn:hover { background: #E9EFEE; }
.seg3 { display: inline-flex; border: 1px solid #C7D0CE; border-radius: 9px; overflow: hidden; background: #fff; }
.seg3 button { border: 0; background: #fff; padding: 7px 14px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg3 button + button { border-left: 1px solid #C7D0CE; }
.seg3 button.on { background: var(--teal); color: #fff; }
.btn.wide { display: block; width: 100%; text-align: center; margin-top: 6px; text-decoration: none; white-space: normal; line-height: 1.25; }
.cal-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-title { font-size: 20px; margin: 0 0 0 6px; font-weight: 700; }
.cal-tools { display: flex; gap: 10px; align-items: center; }
.cal-wrap { display: block; }
/* Calendar controls across the top, like the other pages: actions, then filters in one white bar. */
.cal-acts { gap: 8px; padding-bottom: 10px; }
.cal-top { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 12px; }
.cal-f { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.cal-f .cal-side-h { margin-bottom: 0; }
.cal-f .cal-find { min-height: 34px; min-width: 190px; }
.cal-f-who { flex: 1 1 340px; }
.cal-whos { display: flex; flex-wrap: wrap; gap: 2px 16px; align-items: center; min-height: 34px; }
.cal-whos .cal-wk { padding-left: 14px; border-left: 1px solid var(--line); }
.cal-hint { flex-basis: 100%; margin: -4px 0 0; }
.cal-side-h { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.cal-who { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 14px; cursor: pointer; }
.cal-who input { width: 16px; height: 16px; margin: 0; }
.cal-who .dot { margin-right: 0; }
.cal-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; max-height: calc(100vh - 170px); }
.tg { min-width: calc(56px + var(--cols) * 120px); }
.tg-head { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--line); }
.tg-colh { padding: 8px 4px; text-align: center; font-size: 13px; font-weight: 600; border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tg-colh.clickday { cursor: pointer; }
.tg-colh .dot { margin: 0; }
.dh-dow { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.dh-num { font-size: 20px; font-weight: 600; width: 36px; height: 36px; line-height: 36px; border-radius: 50%; }
.dh-num.today { background: var(--teal); color: #fff; }
.tg-body { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); }
.tg-hr { position: relative; }
.tg-hr span { position: absolute; top: -8px; right: 8px; font-size: 11px; color: var(--muted); }
.tg-hr:first-child span { display: none; }
.tg-col { position: relative; border-left: 1px solid var(--line); cursor: cell; touch-action: pan-y; }
.tg-line { border-top: 1px solid #EEF2F1; box-sizing: border-box; }
.tg-now { position: absolute; left: 0; right: 0; border-top: 2px solid #D93025; z-index: 2; pointer-events: none; }
.tg-now::before { content: ''; position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: #D93025; }
.ev { position: absolute; border-radius: 6px; padding: 3px 6px; font-size: 12px; line-height: 1.25; overflow: hidden; cursor: pointer; box-shadow: 0 0 0 1px #fff;
  touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; z-index: 1; }
.ev.armed { z-index: 5; box-shadow: 0 0 0 2px #fff, 0 6px 16px rgba(0,0,0,.35); transform: scale(1.02); }
.tg-col.armed { background: rgba(26,115,232,.06); }
.ev:hover, .ev:focus-visible { z-index: 4; box-shadow: 0 0 0 1px #fff, 0 2px 6px rgba(0,0,0,.25); outline: none; }
.ev.dragging { opacity: .85; z-index: 5; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.ev-t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-c { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ev-p { opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.short .ev-c, .ev.short .ev-p { display: none; }
.ev s { opacity: .7; }
.ev-warn { font-size: 11px; }
.ev-rs { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.ev-ghost { position: absolute; left: 2px; right: 4px; background: rgba(59, 91, 133, .18); border: 2px dashed var(--teal); border-radius: 6px; font-size: 12px; padding: 3px 6px; color: var(--teal); font-weight: 600; pointer-events: none; }
.mg-head { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.mg-head div { padding: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); text-align: center; }
.mg-body { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mg-day { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px; min-width: 0; cursor: pointer; }
.mg-day.other { background: #FAFBFB; }
.mg-day.other .mg-num { color: #A9B3B1; }
.mg-num { font-size: 12px; font-weight: 600; width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 50%; margin: 0 auto 2px; }
.mg-num.today { background: var(--teal); color: #fff; }
.mg-ev { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 1px 3px; border-radius: 4px; }
.mg-ev:hover { background: #EEF3F2; }
.mg-ev .dot { width: 8px; height: 8px; margin-right: 4px; }
.mg-more { font-size: 11.5px; color: var(--muted); padding: 1px 3px; font-weight: 600; }
.cal-warns { margin: 0; padding: 10px 14px 10px 30px; }
.cal-warns li { margin: 4px 0; }
.cal-warns .link { text-align: left; color: var(--ink); text-decoration: none; }
.cal-warns .link:hover { text-decoration: underline; }
.chips { display: flex; flex-direction: column; gap: 6px; }
.chip { display: flex; align-items: center; gap: 8px; background: #F4F7F6; border-radius: 8px; padding: 5px 6px 5px 10px; }
.chip-n { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chip select { width: auto; padding: 4px 8px; min-height: 0; font-size: 13px; }
.chip-x { border: 0; background: transparent; font-size: 20px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.chip-x:hover { background: #E4EAE9; color: var(--red); }
.addc { margin-top: 6px; }
.av-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.av-grid td { padding: 6px 6px; }
.av-grid td.lead { padding-left: 14px; min-width: 150px; }
.av-in { width: 92px; padding: 7px 8px; border: 1px solid #C7D0CE; border-radius: 7px; font: inherit; font-size: 13.5px; }
.av-in.diff { background: var(--amber-bg); border-color: #E9C46A; }
.av-in:disabled { background: #F6F8F7; color: var(--ink); }
.av-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.av-foot .muted { margin-right: auto; font-size: 12.5px; }
td.c { text-align: center; }
@media (max-width: 900px) {
  .btn.wide { display: inline-block; width: auto; margin-top: 0; }
  .cal-main { max-height: none; }
}
.tg-col .tg-now::before { display: none; }
.tg-gutter + .tg-col .tg-now::before { display: block; }
.field input[type=time] { width: 100%; }

/* ---- scheduler ---- */
.ev.draft { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.18) 0 6px, transparent 6px 12px); outline: 1px dashed rgba(0,0,0,.25); outline-offset: -1px; }
.draftbar { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #FFF8E6; border: 1px solid #F0D79A;
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px; font-size: 14px; }
.draftbar .warn-t { color: var(--amber); font-weight: 600; }
.draft-acts { display: flex; gap: 8px; }
.note-grp { border-bottom: 1px solid var(--line); padding: 8px 14px; }
.note-grp:last-child { border-bottom: 0; }
.note-h { display: flex; gap: 8px; align-items: baseline; }
.note-h .link { margin-left: auto; }
.note-grp ul { margin: 6px 0 2px; padding-left: 20px; font-size: 13.5px; }
.note-grp li { margin: 3px 0; }
.pick { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pickc { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.pickc .dot { margin: 0; }
.av-sel { padding: 6px 8px; min-height: 0; font-size: 13.5px; max-width: 130px; }
.av-num { width: 64px; padding: 6px 8px; border: 1px solid #C7D0CE; border-radius: 7px; font: inherit; font-size: 13.5px; }
.pickc .dot, .cal-who .dot { flex: none; }

/* ---- client card photo ---- */
.cardhead .cardwho { display: flex; align-items: center; gap: 16px; min-width: 0; }
.cardhead h1 { display: flex; flex-direction: column; gap: 2px; }
.cardhead h1 small { font-size: 13px; font-weight: 500; opacity: .8; letter-spacing: 0; }
.avatar { position: relative; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; border: 3px solid rgba(255,255,255,.85); padding: 0; flex: none;
  background: rgba(255,255,255,.18); color: #fff; font: 700 24px/1 inherit; cursor: pointer; }
.avatar:disabled { cursor: default; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.avatar em { position: absolute; left: 0; right: 0; bottom: 0; font: 600 10.5px/1 inherit; font-style: normal; padding: 4px 0 6px; background: rgba(0,0,0,.55); color: #fff; opacity: 0; transition: opacity .15s; }
.avatar.empty em, .avatar:hover em, .avatar:focus-visible em { opacity: 1; }
.avatar:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.logoprev .iconprev { width: 56px; height: 56px; border-radius: 13px; box-shadow: 0 0 0 1px var(--line); margin-left: 12px; object-fit: cover; }
.setbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.setbar > label { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.setbar select { width: auto; min-width: 220px; }
.setbar-sep { flex: 1; }

/* ================= notes ================= */
.notehead { align-items: flex-start; }
.notehead h1 { margin-bottom: 4px; }
.notehead .muted-w { opacity: .75; font-weight: 500; font-size: .8em; }
.nh-sub { font-size: 14px; opacity: .92; margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nh-sub .dot { margin: 0; border: 2px solid rgba(255,255,255,.8); }
textarea.notebox { width: 100%; font: inherit; font-size: 15px; line-height: 1.5; padding: 10px 12px; border: 1px solid #C7D0CE; border-radius: 9px; resize: vertical; }
textarea.notebox:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: var(--teal); }
.phrasebar { margin-bottom: 10px; }
.phrasebar select { width: auto; max-width: 100%; }
.pcgrid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.pc { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #FBFCFC; }
.pc.absent { opacity: .6; background: #F4F5F5; }
.pc-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pc-h select { width: auto; padding: 5px 8px; min-height: 0; font-size: 13px; }
.pc p { margin: 4px 0; }
.notetext h4 { margin: 10px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.notetext h4:first-child { margin-top: 0; }
.notetext p { margin: 0 0 8px; line-height: 1.55; white-space: normal; }
.sigrow { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 4px 0; }
.sigrow > span:first-child { width: 80px; color: var(--muted); font-size: 13px; }
.addm { border-left: 3px solid var(--line); padding: 2px 0 2px 10px; margin-bottom: 10px; }
.addm p { margin: 4px 0 0; }
.nhist { margin-top: 14px; font-size: 13px; }
.nhist summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.nhist ul { margin: 6px 0; padding-left: 18px; }
.tplrow { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 10px; }
#nsf textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid #C7D0CE; border-radius: 8px; }
@media print { .side, .top, .row-end, .sticky-save, .nhist, #n-add, #n-addb, .demo-banner { display: none !important; } }
#modal-form .row-end { flex-wrap: wrap; }
#modal-form .three > .field, #modal-form .two > .field { min-width: 0; }
#modal-form .field input, #modal-form .field select { min-width: 0; max-width: 100%; }
.se-notebtn { margin: 4px 0 12px; font-size: 15px; padding: 11px; }
#toast { pointer-events: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.avatar.empty span { padding-bottom: 12px; font-size: 22px; } .avatar em { font-size: 10px; }

/* ---- UR narrative ---- */
.urbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: #F3F6FF; border: 1px solid #C9D4F5; border-radius: 10px; padding: 10px 12px; margin: 14px 0 4px; font-size: 13.5px; }
.uracts { display: flex; gap: 6px; flex-wrap: wrap; }
.urtext { line-height: 1.55; margin: 4px 0 10px; }
mark.urgap { background: #FFF0B3; padding: 0 2px; border-radius: 3px; }
.urwater { text-align: center; font-weight: 800; letter-spacing: .12em; color: #B3392F; border: 2px solid #B3392F; padding: 4px; margin: 12px 0 6px; font-size: 12px; }
@media print { mark.urgap { background: none; border-bottom: 1px dashed #999; } }

/* ---- one color rule for money owed (see app.js) ---- */
.owe { color: var(--red); font-weight: 700; }
.late { color: var(--amber); font-weight: 700; }
.credit { color: var(--green); }
.tag.credit-t { background: #E3F4EA; color: var(--green); }
.bar.mid > span { background: #E0A43B; }
.colorkey { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; margin: -4px 0 12px; color: var(--ink); }

/* Calendar's top bar uses the same dark title bar as every other screen */
.cal-bar.titlebar { align-items: center; padding: 8px 12px; }
.cal-bar.titlebar .cal-title { color: #fff; }
.cal-bar.titlebar .iconbtn { color: #fff; }
.cal-bar.titlebar .iconbtn:hover { background: rgba(255,255,255,.15); }
.cal-bar.titlebar .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.cal-bar.titlebar .btn:not(.ghost) { background: #fff; color: var(--teal); border-color: #fff; }
.cal-bar.titlebar .seg3 { border-color: rgba(255,255,255,.5); background: transparent; }
.cal-bar.titlebar .seg3 button { background: transparent; color: rgba(255,255,255,.85); }
.cal-bar.titlebar .seg3 button + button { border-left-color: rgba(255,255,255,.4); }
.cal-bar.titlebar .seg3 button.on { background: #fff; color: var(--teal); }

/* Pull down to refresh (home-screen app) */
#ptr { position: fixed; top: 0; left: 50%; z-index: 60; width: 38px; height: 38px; margin-left: -19px; border-radius: 50%;
  background: #fff; color: var(--teal); box-shadow: 0 2px 8px rgba(0,0,0,.2); display: grid; place-items: center; font-size: 20px;
  transform: translateY(-50px); opacity: 0; pointer-events: none; }
#ptr.go { animation: ptrspin .8s linear infinite; }
@keyframes ptrspin { to { rotate: 360deg; } }

/* Staff colors: faded = already used by someone; no dot for staff who don't see clients */
.swatches .sw.used span { opacity: .3; }
.swatches .sw.used input:checked + span { opacity: 1; }
.dot.none { background: transparent; border: 1.5px dashed #B0BCBA; }

/* ---- Calendar: find a client, list view, session summary, at-a-glance ---- */
.cal-find { width: 100%; }
.seg3.sm button { padding: 4px 8px; font-size: 12.5px; }
.ev.dim { opacity: .22; filter: grayscale(.6); }
.ev.lit { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); z-index: 3; }
.cal-main.is-list { overflow: visible; max-height: none; }
.lv-strip { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 3; }
.lv-day { border: 0; background: none; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; font: inherit; color: var(--muted); }
.lv-day span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.lv-day b { font-size: 17px; color: var(--ink); width: 32px; height: 32px; line-height: 32px; border-radius: 50%; }
.lv-day i { font-style: normal; font-size: 11px; min-height: 14px; }
.lv-day.today b { color: #1A73E8; }
.lv-day.on b { background: var(--teal); color: #fff; }
.lv { padding: 6px 10px 12px; }
.lv-slot { display: grid; grid-template-columns: 64px 1fr; gap: 0 10px; padding: 6px 0; border-top: 1px solid #EEF2F1; }
.lv-slot:first-child { border-top: 0; }
.lv-slot-h { font-size: 12.5px; font-weight: 700; color: var(--muted); padding-top: 10px; grid-row: span 50; }
.lv-card { grid-column: 2; display: flex; gap: 10px; text-align: left; width: 100%; border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 8px; background: #fff;
  padding: 8px 10px; margin: 3px 0; cursor: pointer; font: inherit; color: inherit; }
.lv-card:hover { background: #F7FAF9; }
.lv-card.draft { border-style: dashed; border-left-style: solid; }
.lv-time { display: none; }
.lv-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lv-t { font-weight: 700; }
.lv-c { font-size: 13.5px; }
.lv-p { font-size: 12.5px; color: var(--muted); }
.lv-p .dot { margin-right: 4px; }
.ss-head { border-left: 6px solid var(--c); padding: 2px 0 2px 12px; margin-bottom: 12px; }
.ss-head h3 { margin: 0 0 2px; }
.ss-rows { display: grid; gap: 8px; margin-bottom: 12px; }
.ss-row { display: grid; grid-template-columns: 100px 1fr; gap: 10px; font-size: 14px; }
.ss-row > span { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; padding-top: 2px; }
.ss-row b .dot { margin-right: 5px; }
.gl-tiles { padding: 12px 12px 0; }
.gl-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 4px 14px 14px; }
table.gl td { padding: 4px 6px; font-size: 13.5px; }
table.gl .dot { margin-right: 6px; }
.gl-open { margin: 0; padding-left: 18px; max-height: 260px; overflow: auto; font-size: 13.5px; }
.gl-open .link { text-align: left; color: var(--ink); }
@media (max-width: 900px) {
  .gl-cols { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .cal-bar.titlebar { padding: 6px 8px; gap: 6px; }
  .cal-title { font-size: 16px; }
  .cal-tools { width: 100%; justify-content: space-between; }
  .gl-tiles { grid-template-columns: repeat(2, 1fr); }
  .lv-slot { grid-template-columns: 54px 1fr; }
  #modal { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 16px 16px 0 0; max-height: 92vh; }
}
@media (max-width: 760px) {
  .cal-tools .seg3 button { padding: 6px 9px; font-size: 13px; }
  .cal-tools .btn.sm { padding: 6px 10px; font-size: 13px; }
}
.lv-strip { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.lv-slot { grid-template-columns: 64px minmax(0, 1fr); }
.lv-card { white-space: normal; min-width: 0; }
@media (max-width: 760px) { .lv-slot { grid-template-columns: 50px minmax(0, 1fr); } .lv { padding: 4px 6px 10px; } }

/* Save confirmations appear at the top of the screen, where you are — not hidden at the bottom */
.toast { top: 18px; bottom: auto; transform: translate(-50%, -30px); z-index: 1000; max-width: min(560px, calc(100vw - 32px)); box-shadow: 0 8px 24px rgba(0,0,0,.25); font-weight: 600; }
.toast.show { transform: translate(-50%, 0); }
.toast.ok { background: #137333; }
.toast.ok::before { content: '✓  '; }

/* ---- Payroll ---- */
.pr-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.pr-bar b { font-size: 17px; }
.mt-as label { font-weight: 600; }
.mt-as select { min-width: 200px; }
.pr-status { margin-left: auto; font-size: 13.5px; }
.pr-tabs { display: flex; flex-wrap: wrap; margin-bottom: 14px; width: max-content; max-width: 100%; }
.pr-grid input { width: 100%; min-width: 64px; text-align: right; padding: 5px 6px; }
.pr-grid .pr-h { min-width: 52px; }
.tc-sum { width: 100%; border-collapse: collapse; }
.tc-sum td { padding: 4px 6px; border-bottom: 1px solid #E6EAE9; }
.tc-sum .tc-total td { font-weight: 800; border-top: 2px solid var(--teal); border-bottom: 0; font-size: 14px; }
.tc-list { width: 100%; border-collapse: collapse; font-size: 12px; }
.tc-list th, .tc-list td { text-align: left; padding: 3px 6px; border-bottom: 1px solid #EEF1F0; }
.tc-list .r, .tc-sum .r { text-align: right; }
.tcard + .pagebreak { height: 18px; }
@media print { .pagebreak { break-after: page; height: 0; } .tcard { break-inside: auto; } }
label.check.inline { display: inline-flex; padding: 4px 8px; margin: 0; }
.gl-tiles { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.tc-ack { margin-top: 12px; padding: 8px 10px; border-radius: 6px; background: #FEF7E0; font-weight: 600; font-size: 13px; }
.tc-ack.ok { background: #E6F4EA; color: #137333; }
.ok-t { color: #137333; font-weight: 600; }
.mt-card { margin-bottom: 22px; }
.mt-ack { max-width: 850px; margin: 10px auto 0; background: #fff; border: 2px solid var(--teal); border-radius: 8px; padding: 12px 14px; }
.mt-ack label { font-weight: 700; display: block; margin-bottom: 6px; }
.mt-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mt-row input { flex: 1; min-width: 200px; }

.econ-rows { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; padding: 4px 14px 10px; }
.econ-rows > div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 1px; }
.econ-rows span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.econ-rows b { font-size: 18px; }
.econ-rows i { font-style: normal; font-size: 12px; color: var(--muted); }

.vobbox { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.vobbox summary { font-weight: 700; cursor: pointer; color: var(--teal); margin-bottom: 8px; }
.vobgrid { display: grid; grid-template-columns: minmax(130px, 1fr) 1fr 1fr; gap: 0 10px; align-items: center; margin: 6px 0 4px; }
.vobgrid .vh { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.vobgrid .vl { font-size: 13.5px; font-weight: 600; }
.vobgrid .field label:empty { display: none; }

.kvt.mse th { width: 28%; }
.rv-h { margin: 14px 0 6px; color: var(--teal); text-transform: uppercase; font-size: 12px; letter-spacing: .05em; }
/* Calendar sidebar: Day view choices stacked so the labels never get cut off */

/* per-client parts stacked full width; optional mental status picks */
.pc .notebox { min-height: 84px; }
.msebox { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 6px; }
.msebox summary { cursor: pointer; font-weight: 700; font-size: 13.5px; color: var(--teal); padding: 4px 0; }
.mse-n { font-weight: 600; color: var(--muted); margin-left: 6px; font-size: 12.5px; }
.mse-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0 8px; }
.msegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 10px; }
.msegrid .field { margin-bottom: 8px; }
.msegrid input { padding: 6px 8px; font-size: 13.5px; }

.att-bar { padding-bottom: 0; }
.att-tiles { padding: 10px 12px 4px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.nf-info { background: var(--band); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; margin: 0 0 12px; }
/* Tile labels stay on one line so every number lines up across a row */
.tile .k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-tiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
/* scheduler notes: by day & hour */
.note-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.note-by { width: auto; min-width: 240px; }
.note-by button { min-height: 36px; padding: 6px 12px; }
.note-sub { margin: 10px 14px 0; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.nt-day { border-bottom: 1px solid var(--line); }
.nt-day:last-child { border-bottom: 0; }
.nt-day > summary { padding: 10px 14px; cursor: pointer; }
.nt-hour { padding: 0 14px 8px; }
.nt-h { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 4px 0; }
.nt-list { list-style: none; margin: 0; padding: 0 14px 6px 0; }
.nt-day > .nt-list { padding-left: 14px; }
.nt { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 13.5px; }
.nt + .nt { border-top: 1px dashed var(--line); }
.nt-tag { flex: none; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; margin-top: 1px; min-width: 44px; text-align: center; }
.nt.found .nt-tag { background: #FFF1D6; color: #8A5A00; }
.nt.did .nt-tag { background: #DFF3E4; color: #1E6B35; }
.nt.did { padding-left: 18px; }
.nt-d { color: var(--ink, inherit); margin-top: 2px; }

.cal-wrap, .cal-body { overflow-x: clip; }
/* notes print / PDF */
.np-panel { max-width: 850px; margin: 0 auto 12px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.np-h { margin-bottom: 8px; }
.np-opts { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.np-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; min-height: 32px; }
.np-opt select { min-height: 30px; padding: 2px 6px; }
.np-top { margin: 10px 0 6px; }
.np-note { border-top: 1.5px solid #9FB3B0; padding: 10px 0 6px; margin-top: 10px; break-inside: avoid; }
.np-note h4 { margin: 8px 0 3px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--teal); }
.np-note p { margin: 3px 0; }
.np-nh { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.np-st { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; color: #8A5A00; background: #FFF1D6; padding: 2px 7px; border-radius: 4px; }
.np-pc { margin: 4px 0 6px; }
.np-sig { font-size: 12px; margin-top: 4px; color: #333; }
@media print { .np-page { break-before: page; border-top: 0; } .np-page:first-of-type { break-before: auto; } .np-st { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.claimtag { font-size: 10.5px; font-weight: 600; color: #8A5A00; background: #FFF1D6; border-radius: 999px; padding: 1px 6px; margin-left: 4px; white-space: nowrap; vertical-align: 1px; }
/* status color key */
.status-key { margin: 16px 0 8px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; }
.status-key summary { cursor: pointer; font-weight: 600; font-size: 14px; min-height: 32px; display: flex; align-items: center; }
.sk-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 24px; margin-top: 6px; }
.status-key ul { list-style: none; margin: 4px 0 0; padding: 0; }
.status-key li { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13.5px; }
.status-key li .badge { min-width: 96px; text-align: center; }
/* dictation: a mic in the bottom-right corner of the note box */
.dict-btn { position: relative; float: left; margin: -44px 0 0 8px; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 36px; height: 36px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; }
.dict-btn:hover { color: var(--teal); border-color: var(--teal); }
.dict-btn.rec { background: #C62828; border-color: #C62828; color: #fff; animation: dictpulse 1.4s ease-in-out infinite; }
.dict-btn > * { pointer-events: none; }
.dict-btn + * { clear: both; }
.dict-t { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dict-spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: dictspin .8s linear infinite; }
@keyframes dictpulse { 50% { box-shadow: 0 0 0 5px rgba(198, 40, 40, .18); } }
@keyframes dictspin { to { transform: rotate(360deg); } }
textarea.notebox, textarea#n-add { padding-bottom: 44px; }
tr.subtotal td { font-weight: 700; border-top: 1px solid #9FB3B0; background: #F7FAF9; }
.kv.kv2 { grid-template-columns: repeat(2, 1fr); }
/* clients by day (calendar at a glance): seven short columns */
.tile.byday { grid-column: span 3; }
.bd-cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 6px 0 4px; align-items: start; }
.bd-col { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.bd-n { font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bd-bar { position: relative; width: 100%; max-width: 44px; height: 54px; border-radius: 6px; background: rgba(0,0,0,.04); overflow: hidden; }
.bd-bar .cap { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(74,122,168,.20); }
.bd-bar .in { position: absolute; left: 0; right: 0; bottom: 0; background: #4A7AA8; }
.bd-day { font-weight: 700; font-size: 13px; margin-top: 2px; }
.bd-date, .bd-h { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bd-col.peak .bd-bar .in { background: #2E5E8C; }
.bd-col.peak .bd-n, .bd-col.peak .bd-day { color: #2E5E8C; }
.bd-col.off { opacity: .45; }
@media (max-width: 760px) { .tile.byday { grid-column: 1 / -1; } }
@media (min-width: 761px) { #modal.wide { width: min(860px, 94vw); max-width: min(860px, 94vw); } }
.bd-col.tap { cursor: pointer; border-radius: 8px; } .bd-col.tap:hover { background: rgba(74,122,168,.08); }
.los-detail { margin: 10px 14px; } .los-detail summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.ce-pay { border-top: 1px dashed var(--line); padding-top: 6px; margin-top: 6px; } .ce-rm { align-self: end; padding-bottom: 10px; }
/* medical necessity / LOCUS */
.crit { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; font-size: 14px; border-bottom: 1px dashed var(--line); cursor: pointer; }
.crit input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.locus-sel { min-width: 200px; }
.locus-sug { margin: 8px 0; }
.crit-guide { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #FAFBFB; }
.crit-guide summary { cursor: pointer; font-weight: 600; min-height: 30px; display: flex; align-items: center; }
.cg-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; font-size: 13px; }
.cg-cols ul { margin: 4px 0 0; padding-left: 18px; } .cg-cols li { margin: 3px 0; }
.crit-print { list-style: none; padding: 0; margin: 4px 0; } .crit-print li { margin: 2px 0; }
.rv-locus { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 12px; }
.sec2-ins { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; } .sec2-ins > summary { cursor: pointer; font-weight: 600; min-height: 36px; display: flex; align-items: center; }

/* Client Card: full legal name from the intake, under the short name */
.legalname { display: block; font-size: .55em; font-weight: 500; opacity: .8; margin-top: 2px; }

/* Import from CollaborateMD */
.impgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 14px; }
.impmap { display: flex; flex-direction: column; gap: 3px; font-size: .85em; }
.impmap span { font-weight: 600; } .impmap select { width: 100%; }
ol.steps li { margin: 4px 0; }
.impfile { border: 1px solid var(--line, #dde3e0); border-radius: 8px; padding: 8px 12px; margin: 6px 0; } .impfile summary { cursor: pointer; } .impfile .impgrid { margin-top: 10px; }
.pmodes { margin-top: 12px; } .pmodes label.chk { display: flex; gap: 8px; align-items: baseline; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 400; margin: 6px 0; color: inherit; }
.claimnos { margin-top: 4px; line-height: 1.45; }

/* Users & Access: screen switches */
.scrlist { max-height: 340px; overflow: auto; border: 1px solid var(--line, #dde3e0); border-radius: 8px; padding: 6px 10px; }
.scrgrp { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #6b7a76); margin: 8px 0 2px; }
.scr { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.scr.na span:first-of-type { color: var(--muted, #6b7a76); }

/* Monthly Owner Review */
.ortbl td.r, .ortbl th.r { white-space: nowrap; } .up { color: var(--green); font-weight: 600; } .down { color: var(--red); font-weight: 600; }

/* Monthly P&L */
.ortbl tr.grp-row td { background: var(--band); padding-top: 8px; }
.pnlbars { display: flex; flex-direction: column; gap: 2px; min-width: 80px; }
.pnlbar { display: block; height: 6px; border-radius: 3px; }
.pnlbar.rev, .pnlkey.rev { background: var(--teal, #1b7f79); } .pnlbar.cost, .pnlkey.cost { background: #c9a227; }
.pnlkey { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 8px; vertical-align: -1px; }
.pnltrend tr.cur td { font-weight: 600; }
.pnlpay { margin-bottom: 12px; } .inline-form { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; margin: 8px 0; }

/* Read-only value in a form, with a link-style button */
.field .ro { padding: 7px 0; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--teal, #1b7f79); text-decoration: underline; cursor: pointer; font: inherit; font-size: .92em; }

/* One client page: the Card, Intake and Billing screens are tabs (their menu items stay only for access switches) */
.side a.subnav { display: none !important; }
.ctabs { display: flex; gap: 4px; margin: -4px 0 14px; border-bottom: 1px solid var(--line, #d9e2e1); overflow-x: auto; }
.ctabs a { padding: 9px 16px; text-decoration: none; color: var(--muted, #5b6b6a); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.ctabs a.on { color: var(--ink, #183634); border-bottom-color: var(--teal, #1b7f79); }
.ctabs a:hover { color: var(--ink, #183634); }

/* Claims: the action list for one claim */
.actlist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 10px 0; }
.actrow { display: grid; width: 100%; box-sizing: border-box; white-space: normal; min-width: 0; text-align: left; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); cursor: pointer; font: inherit; color: var(--ink); }
.actrow:hover { border-color: var(--teal); background: var(--band); }
.actrow span { font-size: 12.5px; color: var(--muted); }

/* Billing Week: numbered steps */
.bwsteps { display: grid; gap: 12px; }
.bwstep { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.bwnum { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; border: 2px solid var(--teal); color: var(--teal); }
.bwstep.done .bwnum { background: var(--teal); color: #fff; }
.bwbody h3 { margin: 4px 0 6px; font-size: 16px; }
.bwbody p { margin: 4px 0; }
.bwbtn { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.titlebar h1 .tb-sub { display: block; font-size: 13px; font-weight: 500; opacity: .85; letter-spacing: 0; margin-top: 2px; }

.cmdline { background: var(--band); border: 1px solid var(--line); border-radius: 6px; padding: 10px; white-space: pre-wrap; word-break: break-all; font-size: 12.5px; }
/* First sign-in: no sidebar at all, so the form sits in the middle of the window. */
body.welcoming #side { display: none; }
body.welcoming .menubtn { visibility: hidden; }
body.welcoming .shell, body.signing .shell { grid-template-columns: minmax(0, 1fr); }
a.btn { text-decoration: none; }

/* Standing requests (Availability → Clients) */
.av-req { min-width: 170px; font-size: 12.5px; }
.av-req .rq { white-space: nowrap; }
.rq-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; align-items: end; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid #E3E8E7; }
.rq-row .field { margin: 0; min-width: 0; }
.rq-row select, .rq-row input { width: 100%; }
.rq-row > button { grid-column: 1 / -1; justify-self: end; }

/* Section switches (Users & Access → Choose sections) */
.sec[hidden] { display: none !important; }
.sec-pick { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none;
  background: rgba(255,255,255,.18); border-radius: 999px; padding: 2px 10px 2px 6px; cursor: pointer; white-space: nowrap; }
.sec-pick input { margin: 0; width: 16px; height: 16px; accent-color: #fff; }
.sec-h .sec-n + .sec-pick { margin-left: 12px; }
.sec-picked-off { opacity: .45; }
.sec-picked-off .sec-h { background: #7F8C8A; }
.secpick-bar { position: sticky; top: 0; z-index: 30; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  background: #FFF6DB; border: 1px solid #E8D28A; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px; font-size: 14px; }

/* Email Notifications (Settings) */
.nt-sub { margin-left: 26px; padding-left: 12px; border-left: 3px solid #E3E8E7; }
#topbars:empty { display: none; }
#topbars .card-banner { margin: 0 0 12px; }
#topbars { max-width: 1400px; margin: 0 auto; padding: 22px 24px 0; }
#topbars .secpick-bar, #topbars .card-banner { margin: 0; }
#topbars > * + * { margin-top: 10px !important; }
@media (max-width: 760px) { #topbars { padding: 16px 14px 0; } }
@media print { #topbars { display: none; } }

/* Pay over time (Payroll) */
.spark { display: block; overflow: visible; }
.spark path { fill: none; stroke: var(--teal); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark circle { fill: var(--teal); stroke: var(--card); stroke-width: 2; }
.tr-tbl td.lead { white-space: nowrap; }
.tr-chg { color: var(--ink, inherit); font-variant-numeric: tabular-nums; }

/* Tours on the calendar: blocked time, not a session */
.ev.tour { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.22) 0 6px, transparent 6px 12px); outline: 2px dashed rgba(255,255,255,.7); outline-offset: -3px; }

/* Admissions (the CRM) */
.clickrow { cursor: pointer; } .clickrow:hover td { background: var(--band); }
.tag.stage-new { background: var(--sky); } .tag.stage-tour-booked { background: var(--lav); } .tag.stage-screened, .tag.stage-toured { background: var(--peach); }
.tag.stage-agreement { background: var(--mint); } .tag.stage-admitted { background: var(--mint); font-weight: 700; } .tag.stage-closed { background: var(--band); color: var(--muted); }
.stagebar { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 12px; }
.stagebar span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--band); color: var(--muted); }
.stagebar span.done { background: var(--mint); color: #274240; } .stagebar span.on { background: var(--teal); color: #fff; font-weight: 700; } .stagebar span.on.closed { background: #8a8a8a; }
.iq-actions { flex-wrap: wrap; gap: 8px; }
.logrow { padding: 8px 0; border-bottom: 1px solid var(--line); } .logrow:last-child { border-bottom: 0; }
.tag.lk { background: var(--sky); }
.docs { margin: 4px 0; padding-left: 18px; } .docs li { margin: 4px 0; }
.rs-edit { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
/* Signing: the device shows only the agreement until staff take it back. */
body.signing #side { display: none; }
body.signing .top-r, body.signing #topbars { visibility: hidden; }
body.signing header.top { pointer-events: none; }
.sign-wrap { max-width: 760px; margin: 0 auto; padding: 8px 0 40px; font-size: 16px; line-height: 1.55; }
.sign-wrap h1 { font-size: 24px; margin: 4px 0; } .sign-top { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.sign-logo { max-height: 56px; max-width: 160px; }
.sign-sec { background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 12px 0; }
.sign-sec h2 { font-size: 17px; margin: 0 0 8px; }
.sign-ack { margin-top: 10px; background: var(--band); border-radius: 8px; padding: 8px 10px; }
canvas.sig { display: block; width: 100%; height: 170px; border: 2px dashed var(--line); border-radius: 8px; background: #fff; touch-action: none; margin-bottom: 6px; }
.signed-doc { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 24px 28px; max-width: 820px; line-height: 1.5; }
.sd-head { display: flex; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 8px; } .sd-head h2 { margin: 2px 0; }
.signed-doc h3 { font-size: 15px; margin: 16px 0 4px; }
.sd-sigs { display: flex; gap: 40px; flex-wrap: wrap; margin: 18px 0 10px; } .sd-sig { height: 70px; max-width: 280px; border-bottom: 1px solid #333; display: block; margin-bottom: 4px; }
.sd-list { border-top: 1px solid var(--line); }
@media print { body.signing #side { display: none; } .signed-doc { border: 0; padding: 0; max-width: none; } }
.btn.disabled { opacity: .45; }
select.need { border-color: #C0563B; outline: 2px solid #f3c9bd; }
.iq-delrow { margin: 28px 0 8px; text-align: right; }
.tag.plan-tag { background: var(--lav); font-size: 11px; }
.ick .ick-row { margin-top: 4px; } .ick-item { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; margin: 2px 4px 2px 0; font-size: 13px; }
button.ick-item { font: inherit; font-size: 13px; cursor: pointer; color: inherit; } button.ick-item:hover { border-color: var(--teal); background: var(--mint); }
.ick-flash { outline: 3px solid #E6B54A; outline-offset: 2px; border-radius: 6px; transition: outline-color .4s; }
/* A practitioner's own calendar: their available hours, quietly. */
.tg-line.av-on { background: rgba(72, 170, 98, .30); box-shadow: inset 4px 0 0 rgba(46, 139, 74, .75); }
.tg-line.av-off { background: rgba(110, 120, 118, .16); }
.ins-box.ins-off{display:none}
/* A row of pick-one-or-more name pills (e.g. who finishes intakes). */
.npicks { display: flex; flex-wrap: wrap; gap: 8px; }
.npick { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 10px; border: 1px solid #C7D0CE; border-radius: 999px; background: #fff; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink); }
.npick input[type=checkbox] { width: 16px; height: 16px; margin: 0; flex: none; accent-color: #fff; }
.npick:has(input:checked) { background: var(--teal); border-color: var(--teal); color: #fff; }
.npick:hover { border-color: var(--teal); }

/* Tick boxes inside editable tables stay normal-sized (not stretched like the text boxes). */
table.edit input[type=checkbox] { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; accent-color: var(--teal); vertical-align: middle; }
/* Rooms by Service rows */
.srm-row { display: grid; grid-template-columns: minmax(180px, 240px) 1fr auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.srm-row .field { margin: 0; }
.srm-x { margin-top: 22px; }
@media (max-width: 700px) { .srm-row { grid-template-columns: 1fr; } .srm-x { margin-top: 0; justify-self: start; } }
.srm-row .pickc { white-space: nowrap; }
.srm-row .pickc input { width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; accent-color: var(--teal); }

/* A dropdown that picks several people (Services → Provider(s)). */
.msel { min-width: 200px; }
.msel > summary { list-style: none; cursor: pointer; border: 1px solid #C7D0CE; border-radius: 8px; padding: 6px 30px 6px 10px; min-height: 34px; font-size: 14px; background: #fff; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.msel > summary::-webkit-details-marker { display: none; }
.msel > summary::after { content: '▾'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.msel[open] > summary { border-color: var(--teal); }
.msel-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; max-height: 240px; overflow-y: auto; }
.msel-list .pickc input { width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; accent-color: var(--teal); }

/* Client Reminders */
.cr-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cr-row .t { font-weight: 600; }
.cr-row .pick { flex: none; }
.cr-row .pickc input, .cr-prev input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--teal); }
.cr-days { margin-top: 8px; max-width: 360px; }
.cr-days .field { margin: 0; }
.cr-prev { display: inline-flex; gap: 6px; align-items: center; }
.cr-prev input[type=date] { max-width: 170px; }
.cr-log { margin-top: 12px; }
.cr-log > summary { cursor: pointer; font-weight: 600; color: var(--teal); }
.cr-msg { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-top: 8px; background: #fff; }
.cr-h { font-size: 13px; margin-bottom: 4px; }
.cr-body { white-space: pre-wrap; font-family: inherit; font-size: 13.5px; margin: 4px 0 0; color: var(--ink); }
.cr-list { max-height: 60vh; overflow-y: auto; }
@media (max-width: 600px) { .cr-row { flex-direction: column; gap: 6px; } }

/* Paste-an-email on New inquiry; the website form's address */
.nq-paste { margin: 0 0 12px; border: 1px dashed #C7D0CE; border-radius: 8px; padding: 8px 10px; }
.nq-paste > summary { cursor: pointer; font-weight: 600; color: var(--teal); }
.nq-paste textarea { width: 100%; margin-top: 8px; }
.wf-addr { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wf-addr code { background: #F1F6F2; padding: 6px 8px; border-radius: 6px; word-break: break-all; font-size: 13px; }

/* Tabs on setup pages (Settings, Admissions Setup) */
.stabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.stab { border: 0; background: none; padding: 9px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.stab.on { color: var(--teal); border-bottom-color: var(--teal); }
.stab:hover { color: var(--ink); }
.tabpane[hidden] { display: none !important; }

/* Responses / forms as a list that opens one at a time */
.rs-item { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 8px; background: #fff; }
.rs-item > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 9px 80px 9px 12px; position: relative; }
.rs-item > summary::-webkit-details-marker { display: none; }
.rs-item > summary::after { content: 'Edit ▾'; position: absolute; right: 12px; top: 10px; color: var(--teal); font-weight: 600; font-size: 13px; }
.rs-item[open] > summary::after { content: 'Close ▴'; }
.rs-item[open] > summary { border-bottom: 1px solid var(--line); }
.rs-t { font-weight: 600; }
.rs-prev { flex-basis: 100%; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-item .rs-edit { padding: 10px 12px; border: 0; margin: 0; }
.warn-tag { background: #F9EEDA; color: #8A5A00; }

/* Client ID */
.cid { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.sd-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
/* Card payments (Authorize.net) */
.cp-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 12px; max-height: 300px; overflow: auto; }
.cp-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.cp-row input[type=checkbox] { width: 18px; height: 18px; flex: none; }
.cp-what { flex: 1; min-width: 0; font-size: 14px; }
.cp-what small { display: block; color: var(--muted); font-size: 12.5px; }
.cp-amt { width: 110px !important; flex: none; text-align: right; }
.cp-total { font-size: 20px; font-weight: 600; padding-top: 4px; }
.cp-total.cp-off { color: var(--red); }
#cp-note { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.ccx { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ccx-h { padding: 8px 10px; font-weight: 600; font-size: 13.5px; background: var(--band); display: flex; justify-content: space-between; }
.ccx.bad .ccx-h { border-left: 4px solid var(--red); } .ccx.warn .ccx-h { border-left: 4px solid var(--amber); } .ccx.ok .ccx-h { border-left: 4px solid var(--green); }
.ccx ul { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow: auto; }
.ccx li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 10px; border-top: 1px solid var(--line); font-size: 13.5px; }
.ccx li small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 560px) { .cp-row { flex-wrap: wrap; } .cp-amt { width: 100% !important; } .ccx li { flex-direction: column; align-items: flex-start; } }
.ag-ticks { margin: 4px 0 12px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.ag-ticks summary { cursor: pointer; }
.ag-tick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 12px; }
.sub-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px 14px; margin-bottom: 10px; }
.sub-photos { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.roi-ed { margin: 8px 0 12px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.roi-ed summary { cursor: pointer; }
.roi-info { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 12px; margin-bottom: 6px; }
.tag.roi-active { background: var(--green-bg, #e5f4e4); } .tag.roi-expired, .tag.roi-revoked { background: #fbebeb; }
.roi-sum { margin: 4px 0 6px; }
/* Client statements */
.stmt { background: var(--card, #fff); border: 1px solid var(--line); border-radius: 10px; padding: 28px 32px; margin: 12px 0 18px; max-width: 860px; }
.stmt-h { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.stmt-h > div:first-child { display: flex; gap: 12px; align-items: flex-start; }
.stmt-logo { width: 48px; height: 48px; object-fit: contain; }
.stmt-org { font-size: 13.5px; line-height: 1.45; }
.stmt-meta { text-align: right; font-size: 13.5px; } .stmt-meta h2 { margin: 0 0 4px; font-size: 22px; letter-spacing: .02em; }
.stmt-to { margin: 22px 0 18px; font-size: 14px; line-height: 1.45; }
.stmt-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.stmt-t th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 2px solid var(--line); padding: 6px 8px; }
.stmt-t td { border-bottom: 1px solid var(--line); padding: 7px 8px; vertical-align: top; } .stmt-t .r { text-align: right; white-space: nowrap; }
.stmt-t tr.total td { font-weight: 600; border-top: 2px solid var(--line); }
.stmt-due { display: flex; justify-content: flex-end; gap: 16px; align-items: baseline; margin: 16px 0 6px; font-size: 15px; }
.stmt-due b { font-size: 24px; }
.stmt-pays { font-size: 13px; margin: 10px 0; }
.stmt-f { margin-top: 18px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
@media print { .stmt { border: 0; padding: 0; margin: 0; max-width: none; break-after: page; } .stmt:last-child { break-after: auto; } }
@media (max-width: 560px) { .stmt { padding: 18px 14px; } .stmt-meta { text-align: left; } .stmt-t { font-size: 12.5px; } }
/* Discharge checklist */
.dchks { list-style: none; padding: 0; margin: 6px 0 10px; }
.dchk { padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; display: flex; gap: 8px; align-items: flex-start; }
.dchk:first-child { border-top: 0; }
.dchk label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.dchk input[type=checkbox] { width: 18px; height: 18px; margin-top: 1px; flex: none; }
.dchk-i { width: 18px; text-align: center; flex: none; color: var(--muted); }
.dchk.done .dchk-i { color: var(--green); font-weight: 700; }
.addendum { border-left: 3px solid var(--line); padding: 6px 10px; margin: 10px 0; font-size: 14px; }
.sb-t { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 10px; }
.sb-t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 2px solid var(--line); padding: 5px 6px; }
.sb-t td { border-bottom: 1px solid var(--line); padding: 5px 6px; } .sb-t .r { text-align: right; white-space: nowrap; } .sb-t tr.total td { font-weight: 600; }
/* Survey results */
.sv-q { padding: 12px 0; border-top: 1px solid var(--line); } .sv-q:first-child { border-top: 0; }
.sv-big { font-size: 26px; font-weight: 700; margin-left: 8px; }
.sv-bars { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.sv-bar { display: grid; grid-template-columns: minmax(140px, 38%) 1fr 90px; gap: 10px; align-items: center; font-size: 13.5px; }
.sv-t { height: 10px; background: var(--band); border-radius: 5px; overflow: hidden; } .sv-t span { display: block; height: 100%; background: var(--teal); border-radius: 5px; }
.sv-n { text-align: right; white-space: nowrap; }
.sv-c { padding: 8px 0; border-top: 1px solid var(--line); } .sv-c:first-child { border-top: 0; }
@media (max-width: 560px) { .sv-bar { grid-template-columns: 1fr 70px; } .sv-t { grid-column: 1 / -1; order: 3; } }

/* ---- Settings: branding preview ---- */
.logo-acts { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.sqprev { width: 40px; height: 40px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 3px; }
.bp-head { background: var(--corso-blue); color: #fff; border-radius: 10px 10px 0 0; padding: 12px 14px; }
.bp-head .practice { font-size: 16px; }
.bp-doc { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 18px; }
.bp-doc .cdoc-h { font-size: 12px; }
.bp-lines span { display: block; height: 8px; background: #EEF1F0; border-radius: 4px; margin: 10px 0; } .bp-lines span:nth-child(2) { width: 80%; } .bp-lines span:nth-child(3) { width: 60%; }

/* ---- Clinic documents: the clinic's header and footer ---- */
.cdoc-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 2px solid var(--acc, #3B5B85); color: #2D4140; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.cdoc-l { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cdoc-logo { max-height: .75in; max-width: 2.6in; width: auto; height: auto; object-fit: contain; align-self: flex-start; display: block; }
.cdoc-org { font-size: 12px; line-height: 1.45; color: #66716F; }
.cdoc-name { font-size: 15px; font-weight: 700; color: #2D4140; }
.cdoc-r { text-align: right; font-size: 12.5px; line-height: 1.5; color: #66716F; flex-shrink: 0; }
.cdoc-r h2 { margin: 0 0 4px; font-size: 21px; font-weight: 700; color: var(--acc, #3B5B85); letter-spacing: .01em; text-transform: none; }
.cdoc-r b { color: #2D4140; }
.cdoc-f { display: flex; justify-content: space-between; gap: 14px; margin-top: 20px; padding-top: 8px; border-top: 1px solid #E4E9E8; font-size: 9pt; color: #66716F; }
.cdoc-pb { white-space: nowrap; }
@media (max-width: 560px) { .cdoc-h { flex-direction: column; gap: 10px; } .cdoc-r { text-align: left; } }
/* In print, page numbers and "Powered by Convia Health" go in the page margin, on every page. */
@page cdoc { margin: .5in .5in .6in; @bottom-left { content: "Powered by Convia Health"; font: 8pt Inter, Arial, sans-serif; color: #66716F; }
  @bottom-right { content: "Page " counter(page) " of " counter(pages); font: 8pt Inter, Arial, sans-serif; color: #66716F; } }
@page cdocnp { margin: .5in .5in .6in; @bottom-right { content: "Page " counter(page) " of " counter(pages); font: 8pt Inter, Arial, sans-serif; color: #66716F; } }
@media print { .cdoc { page: cdoc; } .cdoc.cdoc-np { page: cdocnp; } .cdoc-f .cdoc-pb { display: none; } }

/* ---- the app's own sign-in screen ---- */
.signin-box { max-width: 460px; margin: 10px auto 0; text-align: center; }
.signin-box .strip { text-align: left; }

/* A practice's own logo is for what it prints: on report screens it shows only on the printout. */
.snaplogo { display: none !important; }
@media print { .snaplogo { display: block !important; } }

.cp-draft { white-space: pre-wrap; font: inherit; font-size: 13.5px; background: #F6F8F7; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 0; max-height: 240px; overflow: auto; }

/* Settings → Billing Rules: who else gets the concurrent review alert */
.aa-whos { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 2px 0 4px; }
.aa-whos .aa-who { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.aa-whos .aa-who input { width: auto; margin: 0; }

/* One "Needs your attention" bar that opens into the list of reminders */
.att-bar { background: var(--amber-bg); color: #6B4200; border-radius: 10px; font-size: 14px; }
.att-bar > summary { list-style: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; cursor: pointer; user-select: none; }
.att-bar > summary::-webkit-details-marker { display: none; }
.att-bar > summary:focus-visible { outline: 2px solid var(--corso-blue, #3B5B85); outline-offset: 2px; border-radius: 10px; }
.att-n { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #6B4200; color: #fff; font-size: 12px; font-weight: 700; text-align: center; }
.att-late { font-size: 12px; font-weight: 700; color: #B23A2E; text-transform: uppercase; letter-spacing: .04em; }
.att-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; flex: 1 1 260px; }
.att-chip { background: rgba(255,255,255,.65); border: 1px solid rgba(107,66,0,.18); border-radius: 999px; padding: 2px 9px; font-size: 12.5px; }
.att-open { margin-left: auto; font-weight: 700; font-size: 13px; white-space: nowrap; }
.att-bar[open] .att-chips { visibility: hidden; height: 0; flex-basis: 0; overflow: hidden; }
.att-list { border-top: 1px solid rgba(107,66,0,.18); }
.att-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; line-height: 1.9; }
.att-item + .att-item { border-top: 1px solid rgba(107,66,0,.12); }
.att-item a { color: inherit; font-weight: 600; }

/* Code picker (diagnosis, CPT/HCPCS, revenue code, modifier, place of service) */
.cpk { position: fixed; z-index: 1000; background: #fff; border: 1px solid #C7D0CE; border-radius: 10px; box-shadow: 0 10px 28px rgba(45,65,64,.18); overflow-y: auto; font-size: 13.5px; }
.cpk-g { position: sticky; top: 0; background: var(--corso-sage-tint, #E6EFE7); color: var(--corso-slate, #2D4140); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 5px 10px; }
.cpk-o { display: grid; grid-template-columns: 74px 1fr; gap: 8px; padding: 7px 10px; cursor: pointer; border-top: 1px solid #EEF2F1; line-height: 1.3; }
.cpk-o b { font-variant-numeric: tabular-nums; color: var(--corso-blue, #3B5B85); }
.cpk-o em { display: block; font-style: normal; color: var(--muted, #66716F); font-size: 12px; margin-top: 1px; }
.cpk-o:hover, .cpk-o.on { background: #EEF3F8; }
.cpk-none { padding: 10px; color: var(--muted, #66716F); }
@media print { .cpk { display: none; } }

/* Clients: search next to + Add client */
.cl-top { align-items: center; }
.cl-search { flex: 1 1 320px; max-width: 520px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #C7D0CE; border-radius: 10px; padding: 0 12px; min-height: 44px; }
.cl-search:focus-within { border-color: var(--corso-blue, #3B5B85); box-shadow: 0 0 0 3px rgba(59,91,133,.15); }
.cl-search .ico { font-size: 15px; opacity: .65; }
.cl-search input { border: 0; outline: 0; flex: 1; font-size: 15px; padding: 10px 0; background: transparent; min-width: 0; }
@media (max-width: 760px) { .cl-search { flex-basis: 100%; max-width: none; } }
tr[data-q][hidden], tr.cl-none[hidden] { display: none !important; }

/* A client's name links to their client card */
a.cl-link { color: inherit; text-decoration: underline; text-decoration-color: rgba(59,91,133,.35); text-underline-offset: 3px; }
a.cl-link:hover, a.cl-link:focus-visible { color: var(--corso-blue, #3B5B85); text-decoration-color: currentColor; }
@media print { a.cl-link { text-decoration: none; color: inherit; } }

/* New inquiry: warning when the person may already be in Admissions */
.nq-hits:empty { display: none; }
.nq-hits { margin: -4px 0 12px; background: var(--amber-bg, #FBF1DC); border: 1px solid rgba(107,66,0,.25); border-radius: 10px; }
.nq-found { padding: 9px 12px 5px; font-weight: 700; color: #6B4200; }
.nq-hit { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 6px 12px; border-top: 1px solid rgba(107,66,0,.12); background: rgba(255,255,255,.55); }
.nq-hit:last-child { border-radius: 0 0 10px 10px; }
.bl-list { margin: 6px 0; padding-left: 18px; }
.bl-list li { margin: 3px 0; }

/* After admitting: start date, therapist and usual days in one box */
.an-box { background: var(--corso-sage-tint, #E6EFE7); border: 1px solid rgba(62,125,95,.25); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.an-h { color: var(--corso-sage-deep, #3E7D5F); margin-bottom: 8px; }
.an-h a { color: inherit; }
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; }
.an-days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.an-day { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 700; color: var(--corso-slate, #2D4140); }
.an-day input { width: 100%; text-align: center; }
@media (max-width: 600px) { .an-days { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Intake: the Part 2 consent greyed out when it isn't needed */
.p2-off label, .p2-off .hint { color: #9AA5A3; }
.p2-off input[disabled] { background: #F1F4F3; color: #9AA5A3; cursor: not-allowed; }
.fa-strip .fa-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fa-strip .fa-row input { flex: 1 1 200px; min-width: 0; }

/* Welcome page: a smaller logo with the tagline centered under it */
.welcome-mark { text-align: center; padding: 28px 0 14px; }
.welcome-mark img { width: 190px; max-width: 60%; height: auto; display: block; margin: 0 auto; }
.welcome-mark div { margin-top: 6px; color: var(--gray, #66716F); font-size: 1rem; }

/* Header: a slightly smaller logo, and the practice name lined up with the logo's letters
   (the logo's box includes the dot on the "i", so its letters sit low; nudge the name to match). */
.corso-head { height: 32px; }
.brand-clinic { padding-top: 4px; }
@media (max-width: 600px) { .corso-head { height: 26px; } .brand-clinic { padding-top: 3px; } }

/* Header lined up with the sidebar (wide screens): the logo centered over the 244px menu,
   the divider right above the menu's edge, the practice name just to its right. */
.brand-sep { align-self: center; height: 28px; margin: 0; }
@media (min-width: 1101px) {
  .top { padding-left: 0; }
  .brand { gap: 0; }
  .corso-head { box-sizing: content-box; padding: 0 calc((243px - 117px) / 2); }
  .brand-clinic { margin-left: 24px; }
}
.practice { white-space: nowrap; }

/* The menu's scrollbar: a slim rounded bar, the same in every browser on every computer,
   with the header divider centered right above it. */
.side::-webkit-scrollbar { width: 8px; }
.side::-webkit-scrollbar-track { background: transparent; }
.side::-webkit-scrollbar-thumb { background: #C9D2D0; border-radius: 8px; }
.side::-webkit-scrollbar-thumb:hover { background: #AEB9B6; }
@media (min-width: 1101px) {
  .corso-head { padding: 0 calc((239px - 117px) / 2); }
  .brand-sep { width: 1px; transform: translateX(-0.5px); }
}

/* ---------- User Guide ---------- */
.gd-build .gd-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.gd-lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.gd-build .gd-picks label { display: flex; text-transform: none; letter-spacing: 0; text-align: left; justify-content: flex-start; margin: 0; font-size: 13.5px; color: inherit; font-weight: 500; }
.gd-build .gd-picks label input { width: auto; min-height: 0; margin: 0; flex: none; }
.gd-build .gd-picks label.gd-pick-fig { font-size: 12.5px; color: #3E4F4E; }
.gd-build .gd-picks label.gd-off { color: var(--muted); }
.gd-areas { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px 16px; margin: 4px 0 14px; }
.gd-area { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 13.5px; }
.gd-area .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.gd-area .seg button { padding: 6px 10px; min-height: 32px; font-size: 12.5px; }
.gd-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 18px; align-items: start; }
.gd-pick-figs { margin: 2px 0 4px 26px; display: grid; gap: 1px; }
.gd-pick-fig { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: #3E4F4E; }
.gd-pick-fig.gd-off { color: var(--muted); }
.gd-pick { display: flex; gap: 8px; align-items: center; font-size: 13.5px; padding: 3px 0; }
.gd-pick.gd-off { color: var(--muted); }
.gd-doc { max-width: 880px; margin: 16px auto 40px; color: #1f2d2c; }
.gd-page { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 40px 48px; margin-bottom: 18px; }
.gd-cover { min-height: 820px; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(180deg, #fff 0%, #fff 62%, #EAF4EE 100%); }
.gd-band { background: #3B5B85; margin: -40px -48px 0; padding: 22px 48px 20px; border-radius: 12px 12px 0 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.gd-logo { width: 150px; display: block; }
.gd-cover-mid h1 { font-size: 54px; line-height: 1.05; color: #3B5B85; margin: 0 0 10px; letter-spacing: -.02em; }
.gd-sub { font-size: 20px; color: #2D4140; margin: 0; }
.gd-for { margin-top: 34px; font-size: 17px; color: #2D4140; }
.gd-cover-foot { display: flex; justify-content: space-between; gap: 16px; font-size: 12.5px; color: #5b6b6a; border-top: 2px solid #BFE0CF; padding-top: 12px; }
.gd-page h2 { font-size: 26px; color: #3B5B85; margin: 0 0 8px; display: flex; align-items: center; gap: 12px; }
.gd-hn, .gd-tn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #3B5B85; color: #fff; font-size: 16px; flex: none; }
.gd-tn { width: 26px; height: 26px; font-size: 13px; margin-right: 10px; }
.gd-toc ol { list-style: none; padding: 0; margin: 18px 0 0; }
.gd-toc > ol > li { padding: 9px 0; border-bottom: 1px solid #e7eeeb; }
.gd-toc a { color: #1f2d2c; text-decoration: none; font-weight: 650; font-size: 16.5px; display: inline-flex; align-items: center; }
.gd-toc a:hover { color: #3B5B85; text-decoration: underline; }
.gd-toc ul { list-style: none; margin: 4px 0 0 36px; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 18px; }
.gd-toc ul a { font-weight: 450; font-size: 13.5px; color: #3E7D5F; }
.gd-toc-hint { margin-top: 22px; color: #5b6b6a; font-size: 13px; }
.gd-intro { font-size: 15.5px; color: #2D4140; margin: 0 0 18px; }
.gd-sec h3 { font-size: 16px; color: #2D4140; margin: 20px 0 8px; }
.gd-list, .gd-steps { font-size: 15px; line-height: 1.6; padding-left: 22px; }
.gd-steps li { margin-bottom: 6px; }
.gd-fig { margin: 0 0 28px; break-inside: avoid; page-break-inside: avoid; }
.gd-fig figcaption { font-weight: 700; font-size: 14px; color: #3E7D5F; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.gd-fig img { display: block; max-width: 100%; max-height: 560px; margin: 0 auto; border: 1px solid #d6dfdc; border-radius: 8px; box-shadow: 0 2px 10px rgba(45,65,64,.08); }
.gd-fig-phone img { max-height: 430px; }
.gd-marks { list-style: none; padding: 0; margin: 12px 0 0; }
.gd-marks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; margin-bottom: 6px; }
.gd-b { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #E03131; color: #fff; font-weight: 700; font-size: 12px; margin-top: 1px; }
.gd-tip { background: #EAF4EE; border-left: 4px solid #3E7D5F; padding: 10px 14px; border-radius: 6px; font-size: 14px; margin: 8px 0 4px; }
.gd-faq dt { font-weight: 700; margin-top: 14px; font-size: 15px; } .gd-faq dd { margin: 4px 0 0; font-size: 14.5px; line-height: 1.55; }
.gd-contact { margin-top: 28px; font-size: 15px; }
.gd-top { display: inline-block; margin-top: 10px; font-size: 13px; }
@media print {
  body:has(.gd-doc) .titlebar, body:has(.gd-doc) #topbars, body:has(.gd-doc) .filters { display: none !important; }
  .gd-doc { max-width: none; margin: 0; }
  .gd-page { border: 0; border-radius: 0; padding: 0; margin: 0; break-before: page; page-break-before: always; }
  .gd-band { margin: 0; border-radius: 0; }
  .gd-page.gd-cover { break-before: auto; page-break-before: auto; min-height: 9.4in; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .gd-hn, .gd-tn, .gd-b, .gd-tip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .gd-fig img { max-height: 3.9in; max-width: 92%; box-shadow: none; }
  .gd-fig { margin-bottom: 18px; }
  .gd-fig-phone img { max-height: 3.1in; } .gd-marks li { font-size: 12.5px; margin-bottom: 3px; } .gd-intro { font-size: 13.5px; margin-bottom: 12px; }
  .gd-toc > ol > li { padding: 3px 0; } .gd-toc-hint { margin-top: 10px; } .gd-toc a { font-size: 14px; } .gd-toc ul a { font-size: 11.5px; } .gd-page h2 { font-size: 22px; text-transform: none; }
  @page { margin: 0.6in 0.6in 0.6in; }
}

/* automatic sign-out */
.idle-warn { position: fixed; inset: 0; background: rgba(45,65,64,.55); display: grid; place-items: center; z-index: 10000; }
.idle-box { background: #fff; border-radius: 14px; padding: 26px 28px; max-width: 400px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.idle-box h2 { margin: 0 0 8px; color: #3B5B85; } .idle-box p { margin: 0 0 18px; line-height: 1.5; }
.idle-out { max-width: 440px; margin: 14vh auto; text-align: center; padding: 0 20px; }
.idle-out h1 { color: #3B5B85; margin: 26px 0 10px; } .idle-out p { line-height: 1.55; margin-bottom: 22px; }
