/* Same palette as the dental registry and the outreach trackers, so Chris's
   tools and the dentist's page look like one family.  This one is calmer: a
   dentist sees it a few times a month, not daily, and there is nothing on it to
   operate.

   Taken from dental-asaro-cloud's inline <style>, moved to a file because this
   app serves several pages from it and because a separate stylesheet lets the
   CSP drop 'unsafe-inline' for styles as well as scripts. */
:root {
  --paper: #f3f6f6; --card: #ffffff; --ink: #101418; --muted: #586169; --line: #d9e0e1;
  --teal: #007f7a; --chip: #e7eded; --win: #1d7f46; --warn: #9a5c00; --stop: #b3261e;
  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #0d1113; --card: #151b1e; --ink: #e6ecee; --muted: #9aa5ac; --line: #263035;
  --teal: #43d4cf; --chip: #1e2629; --win: #58c584; --warn: #e2a64a; --stop: #f17d75;
  color-scheme: dark } }
:root[data-theme="dark"] {
  --paper: #0d1113; --card: #151b1e; --ink: #e6ecee; --muted: #9aa5ac; --line: #263035;
  --teal: #43d4cf; --chip: #1e2629; --win: #58c584; --warn: #e2a64a; --stop: #f17d75;
  color-scheme: dark }

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--display);
       font-size: 15px; line-height: 1.55; -webkit-text-size-adjust: 100%; }
body.mid { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.wrap { max-width: 720px; margin: 0 auto; padding: 32px 16px 64px; }

h1 { font-size: 24px; margin: 0 0 2px; font-weight: 700; letter-spacing: -0.01em; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 22px; }

/* The sign-in form. */
.signin { background: var(--card); border: 1px solid var(--line); border-radius: 14px;
          padding: 26px 24px; width: 100%; max-width: 340px; }
.signin h1 { font-size: 18px; margin: 0 0 4px; }
.signin .sub { margin: 0 0 18px; }
.signin label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em;
                text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.signin input { font: inherit; width: 100%; padding: 11px 12px; border: 1px solid var(--line);
                border-radius: 9px; background: transparent; color: var(--ink); margin-bottom: 16px; }
.signin input:focus { outline: none; border-color: var(--teal); }
.signin button { font: inherit; font-weight: 600; width: 100%; padding: 11px; border: 0;
                 border-radius: 9px; background: var(--teal); color: #fff; cursor: pointer; }
.note { color: var(--stop); font-size: 13px; margin: 0 0 14px; }

.codebar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center;
           margin: 0 0 20px; font-size: 13px; color: var(--muted); }
.code { font-family: var(--mono); font-size: 16px; font-weight: 600; color: var(--teal);
        background: var(--chip); padding: 3px 10px; border-radius: 6px; letter-spacing: .02em; }

/* Two stat tiles.  Two numbers is not a chart, and at these volumes a chart
   would dress up a single digit as a trend. */
.tiles { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 0 0 22px; }
@media (min-width: 560px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 20px 20px 18px; }
.tile .k { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
           color: var(--muted); margin: 0 0 10px; }
.tile .n { font-size: 46px; font-weight: 700; line-height: 1; letter-spacing: -0.03em;
           font-variant-numeric: tabular-nums; }
.tile .n.zero { color: var(--muted); font-weight: 500; }
.tile .after { font-size: 13px; color: var(--muted); margin: 9px 0 0; }

.ever { font-size: 13px; color: var(--muted); margin: -8px 0 22px; }
.days { margin: 0 0 22px; }
.days h2 { font-size: 13px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
           color: var(--muted); margin: 0 0 8px; }
.days ul { list-style: none; margin: 0; padding: 0; background: var(--card);
           border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.days li { display: flex; justify-content: space-between; gap: 16px;
           padding: 9px 16px; font-size: 14px; border-top: 1px solid var(--line); }
.days li:first-child { border-top: 0; }
.days li .d { color: var(--muted); }
.days li .v { font-variant-numeric: tabular-nums; font-weight: 600; }

.howto { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--teal);
         border-radius: 10px; padding: 15px 17px; margin: 0 0 18px; font-size: 13.5px; }
.howto h2 { font-size: 13px; font-weight: 700; margin: 0 0 8px; letter-spacing: .02em; }
.howto p { margin: 0 0 8px; color: var(--muted); }
.howto p:last-child { margin-bottom: 0; }
.howto b { color: var(--ink); font-weight: 600; }

.foot { color: var(--muted); font-size: 12.5px; border-top: 1px solid var(--line);
        padding-top: 14px; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: space-between; }
.foot a { color: var(--teal); }
.err { border: 1px solid var(--line); border-left: 3px solid var(--warn); background: var(--card);
       border-radius: 10px; padding: 13px 16px; font-size: 14px; }
.loading { color: var(--muted); font-size: 14px; }
.bare { color: var(--muted); font-size: 14px; text-align: center; max-width: 320px; }

/* ---- Chris's all-offices page ------------------------------------------- */
.wrap.wide { max-width: 940px; }

.tbl { width: 100%; border-collapse: collapse; background: var(--card);
       border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0 0 18px; }
.tbl th, .tbl td { text-align: left; padding: 11px 14px; border-top: 1px solid var(--line);
                   font-size: 14px; vertical-align: middle; }
.tbl thead th { border-top: 0; font-size: 11px; font-weight: 600; letter-spacing: .07em;
                text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tbl td.n { font-weight: 600; }
.tbl td.n.zero { color: var(--muted); font-weight: 400; }
.tbl tbody tr:hover { background: var(--chip); }
.tbl .who { font-weight: 600; }
.tbl .mono { font-family: var(--mono); font-size: 12.5px; color: var(--teal); }
.tbl .quiet { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.tbl tfoot td { border-top: 2px solid var(--line); font-weight: 700; }
.tbl a.go { color: var(--teal); font-weight: 600; text-decoration: none; white-space: nowrap; }
.tbl a.go:hover { text-decoration: underline; }
.tbl .nogo { color: var(--muted); font-size: 12.5px; }

/* The table is the wrong shape for a narrow screen, so below 700px each office
   becomes a stacked block with its own labels instead of being scrolled
   sideways.  A dentist never sees this page, but Chris reads it on a phone. */
@media (max-width: 700px) {
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl thead, .tbl tfoot { display: none; }
  .tbl tr { border-top: 1px solid var(--line); padding: 6px 0; }
  .tbl tr:first-child { border-top: 0; }
  .tbl td { border: 0; padding: 3px 14px; text-align: left; }
  .tbl td.n { text-align: left; }
  .tbl td[data-l]::before { content: attr(data-l) "  "; color: var(--muted);
                            font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
}

.pillrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.tag { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
       padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.warn { color: var(--warn); border-color: var(--warn); }
.tag.off { color: var(--muted); border-style: dashed; }
