/* Practice scheduling app — one stylesheet for every screen.
   Compact layout arranged like the system it replaces: dark header, menu down the left, grey page panels. */
:root {
  --page: #FFFFFF;
  --ink: #222222;
  --muted: #666666;
  --navy: #2A2B45;          /* header and menu */
  --navy-deep: #1E1F33;
  --navy-line: #45476A;
  --nav-ink: #FFFFFF;
  --gold: #E7B43A;          /* search button, highlights */
  --panel: #D8D8D8;         /* grey page panel */
  --panel-line: #BDBDBD;
  --strip: #7789A1;         /* blue-grey filter strip */
  --btn-dark: #4A4950;
  --slate: #374353;         /* side-panel headings, calendar day bar */
  --card: #FFFFFF;
  --line: #C9C9C9;
  --line-soft: #E3E3E3;
  --zebra: #EDEDED;
  --link: #0B4A8F;
  --accent: #2C6BB0;
  --warn-bg: #FBE6A8;
  --warn-ink: #4D3800;
  --bad-bg: #F6D5CF;
  --bad-ink: #8A2A1B;
  --ok-bg: #D5EBCF;
  --ok-ink: #1F4A1A;
  --cal-day: #F7E69A;       /* mini calendar day */
  --cal-line: #DCCDB3;      /* calendar grid lines */
  --cal-stripe: #FEF5CE;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 12px; line-height: 1.35; }
a { color: var(--link); }
h1, h2, h3 { margin: 0; }
.mono { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.num { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=date], input[type=time], input[type=datetime-local], input[type=number], input[type=password], select, textarea {
  width: 100%; min-height: 24px; padding: 2px 6px; border: 1px solid #B5B5B5; border-radius: 4px; background: #fff; }
textarea { min-height: 60px; resize: vertical; }
input[type=color] { width: 44px; height: 24px; padding: 0; border: 1px solid #B5B5B5; border-radius: 4px; background: #fff; }

/* ---- Frame ---------------------------------------------------------- */
.trial-banner { padding: 4px 16px; background: var(--warn-bg); color: var(--warn-ink); font-size: 11px; font-weight: 700; text-align: center; }
.hdr { background: linear-gradient(#3B3B5D, var(--navy-deep)); color: #fff; }
.hdr-in, .shell { width: 100%; max-width: 1030px; margin: 0 auto; }
body.wide .hdr-in, body.wide .shell { max-width: none; padding: 0 16px 0 26px; }
.hdr-in { display: flex; align-items: center; gap: 16px; height: 76px; padding: 0 0 0 10px; }
.brand { margin-right: auto; color: #fff; font-size: 20px; font-weight: 700; font-style: italic; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.brand b { color: var(--gold); font-weight: 700; }
.hdr-search { display: flex; margin: 0; }
.hdr-search select { width: auto; height: 32px; border: 0; border-radius: 0; background: #33344F; color: #D5D6E2; font-size: 11px; }
.hdr-search input[type=search] { width: 250px; height: 32px; border: 0; border-radius: 0; background: #131320; color: #E8E8EE; }
.hdr-search input::placeholder { color: #8F8F9E; }
.hdr-search button { width: 36px; height: 32px; border: 0; background: var(--gold); color: #33270A; cursor: pointer; }
.hdr-icons { display: flex; align-self: stretch; }
.hdr-icons > a, .hdr-icons > details > summary { position: relative; display: flex; align-items: center; justify-content: center; width: 62px; height: 100%; border-left: 1px solid var(--navy-line); color: var(--gold); cursor: pointer; list-style: none; }
.hdr-icons > a:hover, .hdr-icons > details > summary:hover { background: rgba(255, 255, 255, .08); }
.hdr-icons summary::-webkit-details-marker { display: none; }
.hdr-icons svg, .side svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hdr-icons svg { width: 26px; height: 26px; }
.hdr-icons details { position: relative; border-right: 1px solid var(--navy-line); }
.hdr-icons .menu { position: absolute; right: 0; top: 100%; z-index: 30; min-width: 190px; padding: 10px; border: 1px solid var(--line); border-radius: 0 0 6px 6px; background: #fff; color: var(--ink); box-shadow: 0 6px 16px rgba(0, 0, 0, .25); }
.hdr-icons .menu b { display: block; margin-bottom: 8px; }
.hdr-icons .menu form { margin: 0; }

.shell { display: flex; align-items: flex-start; min-height: calc(100vh - 76px); }
.side { flex: 0 0 153px; align-self: stretch; background: var(--navy); }
.side a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 62px; border-bottom: 1px solid var(--navy-line); color: var(--nav-ink); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.side a:hover { background: #35375A; }
.side a[aria-current=page] { background: #3F4168; box-shadow: inset 4px 0 0 var(--gold); }
.side svg { width: 20px; height: 20px; }
main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 10px 0 30px 10px; }

.messages { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.messages li { padding: 6px 10px; border-radius: 4px; background: var(--ok-bg); color: var(--ok-ink); font-weight: 700; }
.messages li.warning { background: var(--warn-bg); color: var(--warn-ink); }
.messages li.error { background: var(--bad-bg); color: var(--bad-ink); }

/* ---- Buttons -------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 24px; padding: 3px 10px; border: 1px solid #8E8E8E; border-radius: 4px; background: linear-gradient(#FFFFFF, #DADADA); color: #222; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn:hover { background: linear-gradient(#FFFFFF, #C8C8C8); }
.btn.primary, .btn.mint { border-color: #2B2B30; background: linear-gradient(#65646C, #3B3A41); color: #fff; }
.btn.primary:hover, .btn.mint:hover { background: linear-gradient(#55545C, #2B2A31); }
.btn.danger { border-color: #8A2A1B; background: linear-gradient(#C8523F, #9A2F1E); color: #fff; }
.btn.small { min-height: 20px; padding: 1px 6px; font-size: 10px; }
.btn[aria-pressed=true] { border-color: #8A6A10; background: linear-gradient(#F6D989, var(--gold)); color: #33270A; }

/* ---- Grey page panel (lists) ---------------------------------------- */
.panel { border-radius: 8px; background: var(--panel); }
.panel-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 40px; padding: 6px 12px; }
.panel-title h1 { margin-right: auto; font-size: 15px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #333; }
.panel-title h1 i { font-weight: 400; color: #555; }
.panel-title form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
.panel-title label { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #333; }
.panel-title select, .panel-title input[type=search] { width: auto; }
.tabstrip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 5px 10px; background: var(--strip); }
.tabstrip .right { margin-left: auto; display: flex; gap: 4px; }
.tabbtn, .filter > summary { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 1px solid #333238; border-radius: 4px; background: linear-gradient(#66656D, var(--btn-dark)); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; cursor: pointer; list-style: none; }
.filter > summary::-webkit-details-marker { display: none; }
.filter { position: relative; }
.filter[open] > summary, .filter.on > summary { background: linear-gradient(#3A3940, #222127); }
.filter .count { padding: 0 5px; border-radius: 8px; background: var(--gold); color: #33270A; font-size: 10px; }
.filter .pop { position: absolute; left: 0; top: 30px; z-index: 20; width: 250px; max-height: 340px; overflow: auto; padding: 10px; border: 1px solid #666; border-radius: 6px; background: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .3); display: flex; flex-direction: column; gap: 6px; }
.filter .pop label { display: flex; align-items: center; gap: 6px; }
.filter .pop input[type=checkbox] { flex: none; }
.panel-body { padding: 10px; }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.card > h2, .cardhead { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cardhead h2 { margin-right: auto; font-size: 13px; letter-spacing: .06em; }
.cardbody { padding: 10px; }
.tablewrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 11px; }
table.list th { padding: 7px 6px; background: #F5F5F5; color: #777; font-size: 10px; font-weight: 400; text-align: left; white-space: nowrap; }
table.list td { padding: 6px; vertical-align: middle; }
table.list tbody tr:nth-child(odd) { background: var(--zebra); }
table.list tbody tr:hover { background: #FFF6D6; }
table.list a { color: #111; font-weight: 700; }
table.list td.empty { padding: 16px; background: #fff; text-align: center; color: var(--muted); }
table.list form { margin: 0; }
.star { border: 0; padding: 0; background: none; color: #B9B9B9; font-size: 15px; line-height: 1; cursor: pointer; }
.star[aria-pressed=true] { color: #3A84D8; }
.stars { color: #C8C8C8; letter-spacing: 1px; white-space: nowrap; }
.stars b { color: var(--gold); font-weight: 400; }
.pager { display: flex; align-items: center; gap: 6px; padding: 8px 2px 0; font-size: 11px; color: #444; }
.pager span { margin-right: auto; }

/* ---- Record pages (patient, plan, forms) ---------------------------- */
.pagehead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.pagehead h1 { margin-right: auto; font-size: 15px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 6px; background: var(--panel); }
.toolbar form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.toolbar input, .toolbar select { width: auto; }
.who-card { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 4px 2px; }
.who-card h1 { font-size: 15px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.who-card .sub { font-size: 11px; font-weight: 700; }
.avatar { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 5px; background: linear-gradient(#A9ADB5, #6F747E); color: #fff; font-size: 14px; font-weight: 700; }
.tag { padding: 1px 6px; border-radius: 3px; background: var(--ok-bg); color: var(--ok-ink); font-size: 10px; font-weight: 700; }
.tag.warn { background: var(--bad-bg); color: var(--bad-ink); }
.rectabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px 0 0; border-bottom: 2px solid var(--slate); }
.rectabs a { padding: 5px 8px; border: 1px solid var(--line); border-bottom: 0; border-radius: 5px 5px 0 0; background: linear-gradient(#FFFFFF, #E2E2E2); color: #333; font-size: 10px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; }
.rectabs a.soon { color: #8A8A8A; font-weight: 400; }
.rectabs a[aria-current=page] { border-color: var(--slate); background: var(--slate); color: #fff; }
.columns { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.columns > * { flex: 1 1 380px; min-width: 0; }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 16px; }
.field { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 2px 8px; min-width: 0; }
.field > label, .field > legend, fieldset.field > legend { font-size: 11px; font-weight: 700; text-align: right; }
fieldset.field { display: grid; }
fieldset.field > legend { float: left; width: 96px; }
.field.wide { grid-column: 1 / -1; }
.field .help, .field .errorlist { grid-column: 2; margin: 0; padding: 0; list-style: none; font-size: 10px; color: var(--muted); }
.field .errorlist { color: var(--bad-ink); font-weight: 700; }
.choices > div, .choices { display: flex; flex-wrap: wrap; gap: 2px 12px; }
.choices label, .check { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 400; }
.checkgrid > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 10px; }
.checkgrid label { display: flex; align-items: center; gap: 4px; font-size: 11px; }
.checkgrid .grouphead, .checkgrid > div > div > label:first-child { font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.formerrors { padding: 6px 10px; border-radius: 4px; background: var(--bad-bg); color: var(--bad-ink); font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 14px; margin: 0; }
.facts dt { font-size: 10px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; }
.stagebar { display: flex; flex-wrap: wrap; gap: 3px; }
.stagebar form { margin: 0; }
.stage { display: inline-flex; align-items: center; min-height: 26px; padding: 0 12px; border: 1px solid #B9B9B9; border-radius: 4px; background: #EFEFEF; color: #9A9A9A; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
button.stage.allowed { border-color: #2B2B30; background: linear-gradient(#65646C, #3B3A41); color: #fff; cursor: pointer; }
.stage.current { border-color: #8A6A10; background: linear-gradient(#F6D989, var(--gold)); color: #33270A; }
.chips { display: flex; flex-wrap: wrap; gap: 3px; padding: 6px 10px; }
.chips a { padding: 2px 8px; border: 1px solid var(--line); border-radius: 10px; color: #333; font-size: 10px; text-decoration: none; }
.chips a[aria-current=true] { border-color: var(--slate); background: var(--slate); color: #fff; }
.logentry { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 8px 10px; border-top: 1px solid var(--line-soft); }
.logentry .body { flex: 1 1 300px; min-width: 0; overflow-wrap: anywhere; }
.logentry .body p { margin: 3px 0 0; white-space: pre-wrap; }
.notbuilt { padding: 24px; text-align: center; }
.notbuilt h2 { font-size: 14px; letter-spacing: .05em; text-transform: uppercase; }
.notbuilt p { max-width: 520px; margin: 8px auto 0; color: #444; }

/* ---- Calendar ------------------------------------------------------- */
.cal-layout { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px 10px; }
.cal-side { flex: 0 0 200px; display: flex; flex-direction: column; gap: 8px; }
.cal-side form { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.sidebox { border: 1px solid #9A9A9A; border-radius: 5px; background: #fff; overflow: hidden; }
.sidebox > h2 { display: flex; align-items: center; padding: 4px 6px; background: var(--slate); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sidebox > h2 button { margin-left: auto; }
.sidebox .in { display: flex; flex-direction: column; gap: 4px; padding: 6px; }
.sidebox .row { display: flex; align-items: center; gap: 5px; }
.sidebox select, .sidebox input[type=text] { width: auto; flex: 1 1 auto; min-width: 0; min-height: 20px; padding: 0 3px; font-size: 11px; }
.sidebox label.check { font-size: 10px; font-weight: 700; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 5px; border: 1px solid #777; border-radius: 3px; background: linear-gradient(#FFFFFF, #CFCFCF); color: #222; font-size: 10px; font-weight: 700; cursor: pointer; text-decoration: none; }
.group { border: 1px solid #5D7B9B; border-radius: 5px; background: linear-gradient(#FFFFFF, #DADFE6); }
.group > summary { display: flex; align-items: center; gap: 4px; padding: 3px 6px; font-size: 11px; font-weight: 700; cursor: pointer; list-style: none; }
.group > summary::-webkit-details-marker { display: none; }
.group > summary .n { margin-left: auto; padding: 0 6px; border-radius: 8px; background: #6A6A6A; color: #fff; font-size: 10px; }
.group .list { display: flex; flex-direction: column; gap: 2px; max-height: 190px; overflow: auto; padding: 4px 6px; border-top: 1px solid #B8C3D0; background: #fff; }
.group .list label { display: flex; align-items: center; gap: 4px; font-size: 10px; }
.group .list .none { color: var(--muted); font-size: 10px; }
.mini { padding: 6px; }
.mini .head { display: flex; align-items: center; gap: 2px; margin-bottom: 4px; font-size: 11px; }
.mini .head b { flex: 1; text-align: center; font-weight: 400; }
.mini table { width: 100%; border-collapse: separate; border-spacing: 2px; table-layout: fixed; }
.mini th { font-size: 9px; font-weight: 400; color: #666; }
.mini td { height: 23px; padding: 0; text-align: center; }
.mini td a { display: block; height: 23px; line-height: 23px; border-radius: 2px; background: var(--cal-day); color: #4C4C4C; font-size: 11px; text-decoration: none; }
.mini td a:hover { background: #EBCF58; }
.mini td a.today { color: #C2410C; font-weight: 700; }
.mini td a.sel { outline: 2px solid var(--slate); }

.cal-main { flex: 1 1 auto; min-width: 0; }
.cal-date { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cal-date h2 { flex: 1; font-size: 15px; font-weight: 700; text-align: center; }
.arrow { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 22px; border-radius: 3px; background: #838383; color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
.arrow:hover { background: #666; }
.cal-bar { display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 4px 4px 0 0; background: #222E3E; color: #fff; font-size: 11px; font-weight: 700; }
.cal-bar .sp { margin-left: auto; }
.cal-bar a { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 3px; background: #69A84F; color: #fff; font-size: 10px; text-decoration: none; }
.cal-bar a.blk { background: #B9A66A; color: #2B2204; }
.cal-scroll { overflow-x: auto; border: 1px solid #8E8E8E; border-top: 0; border-radius: 0 0 5px 5px; background: #fff; }
.cal { display: flex; min-width: min-content; }
.cal-times { flex: 0 0 68px; }
.cal-corner { height: 52px; background: #fff; }
.cal-time { height: 22px; padding: 0 6px; background: #EFEFEF; border-bottom: 1px solid #fff; font-size: 11px; font-weight: 700; line-height: 21px; text-align: right; white-space: nowrap; }
.cal-col { flex: 1 1 0; min-width: 36px; border-left: 1px solid var(--cal-line); }
.cal.week .cal-col { min-width: 90px; }
.cal.week .cal-head { font-size: 11px; }
.cal-head { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 52px; padding: 1px; overflow-wrap: anywhere; hyphens: auto; border-radius: 4px 4px 0 0; background: linear-gradient(#FFFFFF, #B5B5B5); color: #000; font-size: 8.5px; font-weight: 700; line-height: 1.05; text-align: center; overflow: hidden; }
.cal-head span { font-weight: 400; }
.cal-head a { color: #000; text-decoration: none; }
.cal-head.today { background: linear-gradient(#FFF6C9, #E9C94F); }
.cal-body { position: relative; cursor: cell; background-color: var(--cal-stripe); background-image: linear-gradient(to bottom, transparent 21px, var(--cal-line) 21px); background-size: 100% 22px; }
.cal-body .jump { position: absolute; left: 0; top: 0; width: 0; height: 0; overflow: hidden; }
.cal-block { position: absolute; left: 0; right: 0; opacity: .75; overflow: hidden; border-left: 3px solid rgba(0, 0, 0, .25); color: #3A2F0B; font-size: 9px; line-height: 1.1; text-decoration: none; }
.cal.sep .cal-block { right: auto; width: 9px; border-left: 0; text-indent: -99px; }
.cal.sep .cal-body { padding-left: 9px; }
.cal-lane { position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; }
.cal.sep .cal-lane { left: 9px; }
.cal-appt { position: absolute; display: block; overflow: hidden; padding: 1px 2px; border: 2px solid #8A8F98; border-radius: 7px; font-family: Arial, Helvetica, sans-serif; font-size: 10px; line-height: 1.1; text-decoration: none; overflow-wrap: anywhere; pointer-events: auto; }
.cal-appt b { font-weight: 700; }
.cal-appt.cancelled { opacity: .55; text-decoration: line-through; }
.cal-appt:hover { z-index: 5; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.cal-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid #D0021B; pointer-events: none; z-index: 4; }
#cal-tip { position: fixed; z-index: 60; display: none; max-width: 260px; padding: 6px 8px; border: 1px solid #555; border-radius: 5px; background: #FFFDF2; color: #222; font-size: 11px; white-space: pre-line; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 2px 0; font-size: 10px; color: #444; }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 4px; border: 2px solid; border-radius: 4px; vertical-align: -2px; background: #fff; }

table.month { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; }
table.month th { padding: 4px; background: linear-gradient(#FFFFFF, #B5B5B5); font-size: 10px; text-align: center; }
table.month td { height: 92px; padding: 2px; border: 1px solid var(--cal-line); background: var(--cal-stripe); vertical-align: top; }
table.month td.out { background: #F1F1F1; }
table.month .dn { display: flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; }
table.month .dn a { color: #222; text-decoration: none; }
table.month .dn .add { margin-left: auto; padding: 0 4px; border-radius: 3px; background: #69A84F; color: #fff; font-size: 10px; }
table.month td.today .dn a:first-child { color: #C2410C; }
table.month .it { display: block; margin-top: 1px; padding: 0 3px; border-radius: 4px; overflow: hidden; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; text-decoration: none; }
table.month .more { display: block; margin-top: 1px; font-size: 10px; }
.ov-head { display: flex; align-items: center; gap: 6px; margin: 8px 0 3px; font-size: 12px; font-weight: 700; }
.ov-head i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }

/* ---- Sign-in -------------------------------------------------------- */
.signin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(#3B3B5D, var(--navy-deep)); }
.signin .card { width: 100%; max-width: 340px; }
.signin h1 { padding: 16px 16px 0; font-size: 16px; }
.signin form { display: flex; flex-direction: column; gap: 10px; padding: 16px; }
.signin label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-weight: 700; }
.signin input { min-height: 30px; }
.signin .btn { min-height: 30px; }

@media (max-width: 760px) {
  .hdr-in { flex-wrap: wrap; height: auto; padding: 8px 10px; }
  .hdr-icons { height: 44px; }
  .hdr-search input[type=search] { width: 150px; }
  .shell, body.wide .shell { flex-direction: column; padding: 0; }
  .side { flex: none; width: 100%; display: flex; flex-wrap: wrap; }
  .side a { flex: 1 1 25%; height: 52px; border-right: 1px solid var(--navy-line); }
  main { width: 100%; min-width: 0; padding: 8px; }
  .shell { align-items: stretch; }
  .cal-layout { flex-direction: column; align-items: stretch; }
  .cal-side { flex: none; width: 100%; }
  .cal-main { width: 100%; }
  .panel { max-width: 100%; }
  .field { grid-template-columns: 1fr; }
  .field > label, fieldset.field > legend { text-align: left; }
}
@media print {
  .hdr, .side, .trial-banner, .cal-side, .tabstrip, .btn, .arrow, .panel-title form { display: none !important; }
  main { padding: 0; }
  .panel { background: #fff; }
}

/* ---- Patient and plan screens ---- */
img.avatar { object-fit: cover; }
.avatar.big { width: 96px; height: 96px; border-radius: 6px; font-size: 30px; }
.tag.vip { background: #F6D989; color: #33270A; }
.tag.off { background: #E4E4E4; color: #444; }
.rectabs a.btn { margin-left: auto; align-self: center; padding: 3px 10px; border: 1px solid #2B2B30; border-radius: 4px; background: linear-gradient(#65646C, #3B3A41); color: #fff; font-size: 11px; letter-spacing: .03em; }
.rectabs a.btn:hover { background: linear-gradient(#55545C, #2B2A31); }
.who-card form { margin: 0; }
table.list th a { color: #555; font-weight: 400; text-decoration: none; }
table.list th a:hover { color: #111; text-decoration: underline; }
table.list th[aria-sort] a { color: #111; font-weight: 700; }
table.list tr.current td { background: #FFF2C2; }
table.list td.wrap { white-space: normal; min-width: 110px; }
.striplabel { margin-right: 2px; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.filter .count.off { background: #C9C9C9; color: #333; }
.filter .pop .popbar { display: flex; flex-wrap: wrap; gap: 4px; position: sticky; top: -10px; margin: -10px -10px 0; padding: 8px 10px 6px; background: #fff; border-bottom: 1px solid var(--line-soft); z-index: 1; }
.filter .pop .pophead { margin-top: 4px; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #555; }
.filter .pop.wide { width: 330px; }
.filter .pop .daterow { display: flex; gap: 8px; }
.filter .pop .daterow label { flex: 1 1 0; flex-direction: column; align-items: stretch; gap: 2px; font-size: 10px; font-weight: 700; }
.tabstrip label.tabbtn input { margin: 0; }
.panel-title .viewform { display: flex; align-items: center; gap: 6px; }

/* Demographics */
.demo { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 14px 20px; }
.demo .photo-col { flex: 0 0 150px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.demo .photo-col form { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.demo .photo-col input[type=file] { width: 150px; font-size: 10px; }
.portalbox { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 5px; background: #F5F5F5; text-align: center; font-size: 11px; }
.portalbox b { display: block; margin: 2px 0 6px; font-size: 12px; }
.demo > form.fields { flex: 1 1 420px; margin: 0; }
.fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fields.one { grid-template-columns: minmax(0, 1fr); }
.fields.labels-wide .field { grid-template-columns: 140px 1fr; }
.fields.labels-wide fieldset.field > legend { width: 140px; }
.field .static { font-weight: 700; }
.dob { display: inline-flex; align-items: center; gap: 4px; }
.dob input[type=text] { width: 38px; text-align: center; padding: 2px 3px; }
.dob input[type=text]:last-child { width: 54px; }
.inline2 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.inline2 > label { font-size: 11px; font-weight: 700; white-space: nowrap; }
.inline2 > input, .inline2 > select { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 10px; }
.section-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }

/* Tags */
.taglist { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.taglist form { display: inline-flex; margin: 0; }
.tagchip { display: inline-flex; align-items: center; gap: 2px; padding: 1px 2px 1px 8px; border: 1px solid #9AA9BC; border-radius: 10px; background: #E6ECF4; color: #1F3552; font-size: 11px; font-weight: 700; }
.tagchip button { border: 0; padding: 0 5px; background: none; color: #1F3552; font-size: 13px; line-height: 1; cursor: pointer; }
.tagchip button:hover { color: var(--bad-ink); }
.tagpick { padding: 1px 8px; border: 1px dashed #8E8E8E; border-radius: 10px; background: #fff; color: #333; font-size: 11px; cursor: pointer; }
.tagpick:hover { border-style: solid; background: #F2F2F2; }
.tagadd { display: inline-flex; align-items: center; gap: 4px; }
.tagadd input[type=text] { width: 150px; }

/* Plan page */
.planbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 10px; }
.planbar form { display: flex; align-items: center; gap: 6px; margin: 0; }
.planbar label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.planbar select { width: auto; font-weight: 400; text-transform: none; letter-spacing: 0; }
.planbar .sp { margin-left: auto; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.seg label { position: relative; display: inline-flex; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 22px; padding: 1px 8px; border: 1px solid #8E8E8E; border-radius: 4px; background: linear-gradient(#FFFFFF, #DADADA); font-size: 11px; font-weight: 700; cursor: pointer; }
.seg input:checked + span { border-color: #8A6A10; background: linear-gradient(#F6D989, var(--gold)); color: #33270A; }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 1px; }
.seg label.quiet span { border-style: dashed; font-weight: 400; color: #555; }
.seg label.quiet input:checked + span { border-color: #8E8E8E; background: #EDEDED; color: #333; }
.pcard-top { display: flex; align-items: center; gap: 10px; }
.pcard-top form { margin: 0 0 0 auto; display: flex; align-items: center; gap: 6px; }
.pcard-top .nm { font-size: 13px; font-weight: 700; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.logactions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px; }
.logactions form { margin: 0; }
.logentry.cancelled .body > b, .logentry.cancelled .body > .what { text-decoration: line-through; color: #777; }
.logreply { margin: 6px 0 0 4px; padding: 4px 0 2px 10px; border-left: 3px solid var(--line); }
.logentry .inlineform { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; background: #F5F5F5; }
.logentry .inlineform input { width: auto; }
.logentry:target { background: #FFF6D6; }
.replybox { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 4px; background: var(--warn-bg); color: var(--warn-ink); font-weight: 700; }
.tonote { margin: 0; font-size: 11px; color: #444; }
.confirmbox { display: flex; flex-direction: column; gap: 10px; }
.confirmbox ul { margin: 0; padding-left: 18px; }
.compare td:first-child, .compare th:first-child { width: 110px; color: #555; }
.vieworder { width: 54px !important; }

/* New Lead hints: a prompt that pops up beside the box being filled in */
.field .hint { display: none; grid-column: 2; margin: 2px 0 0; padding: 4px 8px; border: 1px solid #C9A227; border-radius: 4px; background: #FFF6D6; color: #4D3800; font-size: 11px; white-space: pre-wrap; }
.field:focus-within .hint:not(:empty), .field.hintopen .hint:not(:empty) { display: block; }
.field.hashint > label::after, fieldset.field.hashint > legend::after { content: " \24D8"; color: #A07A00; font-weight: 400; }
@media (max-width: 760px) {
  .fields.two { grid-template-columns: minmax(0, 1fr); }
  .fields.labels-wide .field { grid-template-columns: 1fr; }
}
#planform.tabstrip .tabbtn, #planform.tabstrip .filter > summary { padding: 0 8px; letter-spacing: .03em; }
.panel-title .viewform select { max-width: 160px; }

/* Long text without spaces (a 100-character name, tag, e-mail or procedure) must not make a table wider than its card
   or push buttons off the screen. In tables the |breakable filter marks where such a run may break and .clip caps the
   cell; elsewhere the text may break anywhere. Ordinary data is narrower than these limits and looks as before. */
table.list .clip { display: inline-block; max-width: 230px; overflow-wrap: break-word; }      /* a cell's text that may wrap */
table.list .clip.c-city { max-width: 130px; }
table.list .clip.c-state { max-width: 70px; }
.who-card .avatar, .pcard-top .avatar { flex: none; }
table.list td.ell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }  /* stays on one line */
table.list td.ell.c-phone { max-width: 130px; }
table.compare td { max-width: 330px; overflow-wrap: break-word; }
.who-card .who { min-width: 0; max-width: 100%; }
.who-card h1, .who-card .sub, .pcard-top .nm, .pcard-top > div, .facts dd, .field .static, .replybox, .confirmbox, .messages li,
.panel-title h1, .pagehead h1, .card > h2, .cardhead h2, .portalbox, .logreply { min-width: 0; overflow-wrap: anywhere; }
.taglist form { min-width: 0; max-width: 100%; }
.tagchip, .tagpick { max-width: 100%; overflow-wrap: anywhere; white-space: normal; text-align: left; }
.planbar select, .field select, .filter .pop label { max-width: 100%; }
.filter .pop label { overflow-wrap: anywhere; }

/* ---- Header additions ---- */
.hdr-icons .badge { position: absolute; top: 14px; right: 10px; min-width: 16px; padding: 0 4px; border-radius: 8px; background: #D0021B; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.hdr-icons .menu { display: flex; flex-direction: column; gap: 6px; }
.hdr-icons .menu .btn { justify-content: flex-start; }
