/* Autopsy and Overall Rolling Sign Rates (win_tab_autopsy.py). Same dark shell as the other tabs. Phone first:
   the Autopsy rows turn into cards at 720 px and below, the Sign Rates table scrolls inside its card, never the page. */
.au-root { display: grid; gap: 14px; min-width: 0; max-width: 100%; overflow-x: clip; }
.au-head { display: grid; gap: 8px; min-width: 0; }
.au-head h2 { font-size: 20px; }
.au-sub, .au-cap, .au-foot { margin: 0; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.au-foot { font-size: 12px; }
.au-warn { margin: 0; color: var(--amber); font-size: 12.5px; font-weight: 600; overflow-wrap: anywhere; }
.au-test { margin: 0; justify-self: start; background: rgba(251, 191, 36, .12); color: var(--amber);
  border: 1px solid rgba(251, 191, 36, .35); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; }
.au-empty { margin: 0; color: var(--muted); padding: 16px 4px; text-align: center; }
.au-ranges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-width: 0; }
.au-chips { display: flex; flex-wrap: wrap; gap: 4px; background: rgba(34, 38, 51, .5); border-radius: 8px; padding: 4px;
  min-width: 0; max-width: 100%; }
.au-chips button { border: 0; background: none; color: var(--muted); border-radius: 6px; padding: 6px 12px; font-size: 13px;
  font-weight: 500; cursor: pointer; white-space: nowrap; }
.au-chips button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
.au-filter { background: none; padding: 0; gap: 6px; }
.au-filter button { border: 1px solid var(--line); background: var(--secondary); border-radius: 999px; font-weight: 650; }
.au-filter button[aria-pressed="true"] { background: var(--secondary); color: var(--text); border-color: var(--gold); }
.au-custom { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; min-width: 0; }
.au-custom[hidden] { display: none; }
.au-custom input, .au-select, .au-other-in, .au-note-in, .au-phone-sort select { background: var(--secondary);
  color: var(--text); border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; padding: 7px 9px;
  min-width: 0; max-width: 100%; }
.au-apply, .au-save { border: 0; border-radius: 8px; background: var(--gold); color: var(--gold-ink); font: inherit;
  font-size: 13px; font-weight: 700; padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.au-save:disabled { opacity: .5; cursor: default; }
.au-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; min-width: 0; }
.au-tiles5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.au-tile { padding: 16px; }
.au-tile .v { font-size: 32px; }
.au-tlabel { color: var(--muted); font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.au-tone-buyer { --accent: var(--blue); }
.au-tone-seller { --accent: var(--purple); }
.au-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid;
  gap: 10px; min-width: 0; max-width: 100%; }
.au-card h3 { margin: 0; font-size: 16px; }
.au-scroll { overflow-x: auto; max-width: 100%; min-width: 0; -webkit-overflow-scrolling: touch; }
.au-table, .au-rtable { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.au-table th, .au-table td, .au-rtable th, .au-rtable td { padding: 8px; border-bottom: 1px solid var(--line);
  text-align: left; vertical-align: top; }
.au-table thead th, .au-rtable thead th { color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.au-rtable .num, .au-rtable th.num { text-align: right; }
.au-sort { border: 0; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 700; padding: 0;
  cursor: pointer; text-align: inherit; white-space: nowrap; }
.au-sort.on, .au-sort:hover { color: var(--text); }
.au-arrow { color: var(--gold); }
.au-link { color: #93c5fd; text-decoration: none; overflow-wrap: anywhere; }
.au-link:hover { text-decoration: underline; }
.au-pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.au-pill.au-buyer { background: rgba(96, 165, 250, .15); color: var(--blue); }
.au-pill.au-seller { background: rgba(192, 132, 252, .15); color: #c084fc; }
.au-pill.au-none { background: rgba(139, 147, 167, .12); color: var(--muted); }
.au-good { color: var(--green); }
.au-warm { color: var(--amber); }
.au-bad { color: var(--red); }
.au-mu { color: var(--muted); }
.au-held { white-space: nowrap; }
.au-phone { white-space: nowrap; }
.au-reason { white-space: pre-line; overflow-wrap: anywhere; max-width: 260px; }
.au-action { min-width: 200px; }
.au-select { width: 100%; }
/* Pick Next Action: Confirm on its own line under the select, left edges lined up (Jacob 11-11); a staged pick glows
   gold until confirmed */
.au-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.au-pick .au-select { align-self: stretch; min-width: 0; }
.au-pick.au-staged .au-select { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(233, 185, 58, .3); }
.au-confirm { min-width: 120px; min-height: 36px; box-shadow: 0 0 0 2px rgba(233, 185, 58, .3); }
.au-confirm[hidden] { display: none; }
.au-confirm.au-idle { background: var(--secondary); color: var(--muted); border: 1px solid var(--line); box-shadow: none; }
.au-pick + .au-said:not(:empty), .au-other + .au-said:not(:empty) { margin-top: 4px; }
.au-other { display: flex; gap: 6px; margin-top: 6px; }
.au-other[hidden] { display: none; }
.au-other-in { flex: 1 1 auto; }
.au-notes { min-width: 240px; }
.au-note-in { width: 100%; resize: vertical; min-height: 38px; }
.au-note-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.au-said { color: var(--muted); font-size: 12px; min-height: 0; }
.au-history { margin-top: 6px; }
.au-hlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.au-hlist.au-folded .au-more { display: none; }
.au-hmeta { color: var(--muted); font-size: 11.5px; }
.au-htext { white-space: pre-line; overflow-wrap: anywhere; font-size: 13px; }
.au-show { border: 0; background: none; color: var(--gold); font: inherit; font-size: 12px; padding: 4px 0; cursor: pointer; }
.au-phone-sort { display: none; }
.au-rtable .au-rname { text-align: left; min-width: 150px; }
.au-rtable td.au-rname { position: sticky; left: 0; background: var(--card); z-index: 1; }
.au-osa { border: 0; background: none; color: var(--text); font: inherit; font-weight: 700; padding: 0; cursor: pointer;
  text-align: left; border-bottom: 1px dashed var(--muted); }
.au-osa:hover { color: var(--gold); border-color: var(--gold); }
.au-rate { font-weight: 800; }
.au-side { white-space: nowrap; }
.au-rtable tr.au-gray td { opacity: .5; }
.au-rtable tr.au-gray td.au-rname { opacity: 1; }
.au-rtable tr.au-gray .au-osa { color: var(--muted); }
.au-modal .au-mcount { margin: 0; padding: 10px 20px 0; color: var(--muted); font-size: 12.5px; }
.au-mscroll { overflow-x: auto; padding: 8px 12px 16px; }
.au-mtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.au-mtable th, .au-mtable td { padding: 8px; border-bottom: 1px solid rgba(255, 255, 255, .08); text-align: left; }
.au-mtable th { color: var(--muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.au-mclient { overflow-wrap: anywhere; }
/* Appointment Type (ask 377): written out as in Billions; a long one wraps between words, never widens the modal */
.au-mtable .au-mappt { white-space: normal; overflow-wrap: break-word; }
/* Call scripts (Jacob ask 413): a button on Autopsy's top bar opens a panel on the right on a computer, a sheet from
   the bottom on a phone (720 px and below). The list underneath stays as it was. */
.au-sc-open { margin-left: auto; border: 1px solid var(--line); background: var(--secondary); color: var(--text);
  border-radius: 8px; font: inherit; font-size: 13px; font-weight: 650; padding: 6px 12px; cursor: pointer;
  white-space: nowrap; }
.au-sc-open:hover, .au-sc-open[aria-expanded="true"] { border-color: var(--gold); }
.au-sc-back { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .45); display: flex;
  justify-content: flex-end; align-items: stretch; }
/* a drag on the dim area or the panel's heading never scrolls the list behind it, the scripts still scroll on their own */
.au-sc-back { touch-action: pinch-zoom; }
.au-sc-panel { width: min(440px, 100%); height: 100%; display: flex; flex-direction: column; overflow: hidden;
  background: #12141a; border-left: 1px solid rgba(234, 179, 8, .25); box-shadow: -24px 0 60px rgba(0, 0, 0, .45); }
.au-sc-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08); background: rgba(234, 179, 8, .04); }
.au-sc-head > div { min-width: 0; flex: 1 1 auto; }
.au-sc-head h2 { margin: 0; font-size: 16px; font-weight: 700; }
.au-sc-sub { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.au-sc-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 20px 20px;
  -webkit-overflow-scrolling: touch; }
.au-sc-sec { border-top: 1px solid rgba(255, 255, 255, .06); padding: 14px 0 2px; }
.au-sc-sec:first-child { border-top: 0; }
.au-sc-sec h3 { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: var(--gold); }
.au-sc-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: start;
  margin-bottom: 12px; }
.au-sc-label { grid-column: 1 / -1; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; }
.au-sc-text { margin: 0; font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; -webkit-user-select: text;
  user-select: text; }
.au-sc-blank { background: rgba(212, 175, 55, .18); color: #fde047; border-radius: 4px; padding: 0 3px; font-weight: 700; }
.au-sc-copy { border: 0; border-radius: 8px; background: var(--gold); color: var(--gold-ink); font: inherit;
  font-size: 13px; font-weight: 700; padding: 7px 12px; min-width: 86px; cursor: pointer; white-space: nowrap; }
.au-sc-live { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; }
@media (max-width: 1100px) {
  .au-tiles5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .au-tiles, .au-tiles5 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .au-atiles > .au-tile:last-child { grid-column: 1 / -1; }   /* Autopsy's five tiles: 2 + 2 + held across */
  .au-tile { padding: 12px; }
  .au-tile .v { font-size: 26px; }
  .au-card { padding: 10px; border-radius: 12px; }
  .au-phone-sort { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
  .au-phone-sort select { flex: 1 1 auto; }
  /* Autopsy rows as cards: one client per card, the inputs full width */
  .au-table, .au-table tbody, .au-table tr, .au-table td { display: block; width: 100%; }
  .au-table thead { display: none; }
  .au-table tr.au-row { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; margin-bottom: 10px;
    background: rgba(34, 38, 51, .35); }
  .au-table td { border: 0; padding: 4px 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; }
  .au-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; }
  .au-table td.au-action, .au-table td.au-notes { grid-template-columns: 1fr; min-width: 0; }
  .au-reason { max-width: none; }
  .au-rtable { min-width: 640px; }
  .au-select, .au-other-in, .au-note-in { font-size: 16px; }   /* no zoom on focus */
  .au-pick .au-select, .au-confirm { min-height: 44px; }   /* a thumb-sized Confirm, full width under the select */
  .au-confirm { align-self: stretch; }
  .au-modal .au-mcount { padding: 10px 14px 0; }
  .au-mscroll { padding: 8px 6px 16px; }
  .au-mtable th, .au-mtable td { padding: 7px 5px; font-size: 13px; }
  /* with Appointment Type the drill-down can be wider than a phone: it scrolls in .au-mscroll, names break between words */
  .au-mtable .au-mclient, .au-mtable .au-mclient > * { overflow-wrap: break-word; }
  /* Call scripts: a sheet from the bottom over the list */
  .au-sc-back { align-items: flex-end; }
  .au-sc-panel { width: 100%; height: auto; max-height: 88vh; max-height: 88dvh; border-left: 0;
    border-top: 1px solid rgba(234, 179, 8, .25); border-radius: 16px 16px 0 0;
    box-shadow: 0 -24px 60px rgba(0, 0, 0, .45); padding-bottom: env(safe-area-inset-bottom); }
  .au-sc-head { padding: 14px 16px; }
  .au-sc-body { padding: 4px 16px 16px; }
  .au-sc-text { font-size: 15px; }
}
