/* Additions to the original stylesheet (board.css), loaded after it.
 * 1. Classes that replace the original's inline style="" attributes (the site CSP forbids them).
 * 2. Rules for classes the original emitted without any CSS.
 * 3. Small pieces the cloud version needs (sign-in screen, accessibility helpers, people admin). */

/* 1. inline style replacements */
.hdr-left{display:flex;align-items:center;gap:14px}
.hdr-right{display:flex;align-items:center;gap:16px}
.finding.pass{border-left-color:var(--ok)}
.cm.cm-d0{margin-left:0}.cm.cm-d1{margin-left:18px}.cm.cm-d2{margin-left:36px}.cm.cm-d3{margin-left:54px}
.cm.cm-d4{margin-left:72px}.cm.cm-d5{margin-left:90px}.cm.cm-d6{margin-left:108px}

/* 2. classes used by the original markup that had no rule */
.pill.unk{background:var(--unk-bg);color:var(--unk);border-color:var(--unk-line)}
.lsel{font:inherit;font-size:12.5px;padding:7px 12px;border-radius:999px;border:1px solid var(--line);
  background:var(--panel2);color:var(--text);max-width:220px;cursor:pointer}
.lbtns{display:flex;gap:8px;margin:10px 0}
.sostate.yes{color:var(--ok)}

/* 3. cloud version */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.skip{position:absolute;left:-999px;top:0;z-index:30;background:var(--panel);color:var(--text);padding:8px 12px}
.skip:focus{left:8px}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.tabs .tab{background:none;border:none;font:inherit;cursor:pointer}
button.docfile{width:100%;text-align:left;font:inherit;cursor:pointer;background:none}
.who em.env{color:var(--teal);border-color:var(--teal)}
.envtag{font-family:Kanit;font-size:10px;letter-spacing:2px;text-transform:uppercase;color:var(--teal)}
.gate.open{display:flex}
.who .wbtn{margin-left:2px}
.pacts{display:flex;gap:6px;flex-wrap:wrap}
.proles{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:12px}
.proles label{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.pacting{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.pacting input{width:120px}
.pacting input[type="date"]{width:140px}
tr.poff td{opacity:.55}
.sobtn.clr{border-style:dashed}
.flash{animation:flash 1.2s var(--ease)}
@keyframes flash{0%{background:var(--ok-bg)}100%{background:transparent}}
.loading{padding:44px;text-align:center;color:var(--muted);letter-spacing:1px}
.revbar .first{margin-left:auto}
.dlist button.link{background:none;border:none;padding:0;font:inherit;color:inherit;text-decoration:underline;cursor:pointer;text-align:left}
.padd .proles{margin:10px 0 4px}
/* The original reused .who (header chip) and .stat (stat card) as table-cell classes on the
   sign-off table; keep the cells as plain cells. The header is navy in both themes. */
header.top .who{color:#D7E2EA}
.sotbl td.who{display:table-cell;font-size:inherit;color:inherit}
.sotbl td.stat{display:table-cell;background:none;border:0;border-top:1px solid var(--line);border-radius:0;
  box-shadow:none;transform:none;padding:10px 16px;overflow:visible}
.sotbl td.stat::before{content:none;display:none}
.sotbl td.stat:hover{transform:none}

/* ---------------------------------------------------------------- phones
 * The original's phone block (board.css, max-width 680px) restacks the page but leaves the
 * header crowded and the tables wider than the screen. On phones: a compact header that does
 * not stay pinned, and table rows shown as stacked cards labelled from their column headers
 * (data-label, set by autoLabelTables). */
@media (max-width:700px){
  body header.top{position:static;padding:12px 14px;gap:8px 10px;align-items:center}
  header.top .logo{height:22px}
  body header.top .sub,.gen{display:none}
  .hdr-left{gap:10px}
  .hdr-right{flex:1 1 100%;flex-wrap:wrap;gap:8px;justify-content:space-between}
  #whoami{display:flex;flex-wrap:wrap;gap:8px;align-items:center;flex:1 1 auto;min-width:0}
  .switch{margin-right:0}
  .switch button{padding:6px 12px;font-size:12px}
  .who{flex-wrap:wrap;gap:6px}
  .who em:not(.auth){display:none}
  .themebtn{padding:6px 12px}

  .main{padding:18px 14px 64px}
  .hero{font-size:clamp(28px,9vw,40px)}
  .backbtn{margin-bottom:14px}

  /* filter bars: full width, two controls per line */
  .lhead{gap:10px}
  .lfilts{width:100%;justify-content:flex-start;gap:8px}
  .lfilts .lsearch{flex:1 1 100%;max-width:none;width:100%}
  .lfilts .lsales-f,.lfilts .lsel{flex:1 1 calc(50% - 8px);max-width:none}
  .lfilts .lfilt{flex:1 1 auto}
  .lfilts .ndnew{flex:1 1 100%}
  .inboxhead{flex-wrap:wrap;gap:8px}

  /* tables with a header row become cards */
  .ltable,.sotbl,.audit{overflow:visible}
  .ltable table,.sotbl table,.audit table{min-width:0}
  .ltable table:has(thead),.sotbl table,.audit table:has(thead){display:block}
  .ltable table:has(thead) thead,.sotbl thead,.audit table:has(thead) thead{display:none}
  .ltable table:has(thead) tbody,.sotbl tbody,.audit table:has(thead) tbody{display:block}
  .ltable table:has(thead) tr,.sotbl tr,.audit table:has(thead) tr{display:block;padding:12px 14px;border-top:1px solid var(--line)}
  .ltable table:has(thead) tr:first-child,.sotbl tr:first-child,.audit table:has(thead) tr:first-child{border-top:0}
  .ltable table:has(thead) td,.sotbl td,.sotbl td.stat,.audit table:has(thead) td{display:flex;gap:12px;align-items:baseline;
    justify-content:space-between;padding:5px 0;border:0;text-align:right;white-space:normal}
  .ltable table:has(thead) td::before,.sotbl td::before,.audit table:has(thead) td::before{content:attr(data-label);flex:0 0 38%;
    text-align:left;font-size:10px;letter-spacing:1.5px;text-transform:uppercase;color:var(--muted);font-weight:500}
  .ltable td[data-label=""]::before,.sotbl td[data-label=""]::before,.audit td[data-label=""]::before{content:none}
  .ltable td.lact,.sotbl td.act,.sotbl td.req{justify-content:flex-end;flex-wrap:wrap}
  .ltable td.lact::before{content:none}
  .ltable td.lcust,.sotbl td.who{display:block;text-align:left;font-size:15px}
  .ltable td.lcust::before,.sotbl td.who::before{content:none}
  .ltable td .lfind{flex-direction:row;flex-wrap:wrap;justify-content:flex-end}
  .sotbl td.req select{max-width:60%}
  .sotbl td.stat::before{display:block;content:attr(data-label);position:static;width:auto;height:auto;background:none;inset:auto}
  .sotbl td.req,.sotbl td.act,.sotbl td.stat{flex-wrap:wrap;justify-content:flex-start;text-align:left;gap:6px 8px}
  .sotbl td.req::before,.sotbl td.act::before,.sotbl td.stat::before{flex:1 1 100%}
  .ltable table:has(thead) td::before,.sotbl td::before,.audit table:has(thead) td::before{font-family:var(--body)}
  .ltable td.lid{font-size:13px}
  /* header: logo and theme button on one line, the switch and who chip below */
  .hdr-right{display:contents}
  header.top .themebtn{order:1;margin-left:auto}
  #whoami{order:2;flex:1 1 100%}
  .ltable td.bk{width:auto}

  /* tables without a header row (request brief, history) just wrap */
  .ltable table:not(:has(thead)) td{white-space:normal;padding:10px 12px}

  .metrics{grid-template-columns:repeat(2,1fr)}
  .dbox{grid-template-columns:1fr}
  .ndrow{flex-wrap:wrap}
  .ndrow .rqwho,.ndrow .rqid{flex:1 1 100%;width:100%}
  .frm{grid-template-columns:1fr}
  .tiles{display:grid;grid-template-columns:repeat(3,1fr)}
  .docfilter{gap:6px}
  .donechip{margin-left:0}
  .paddrow{flex-direction:column;align-items:stretch}
  .pacting input,.pacting input[type="date"]{width:100%}
}
