:root{--bg:#f6f8fb; --card:#fff; --ink:#0f172a; --muted:#475569; --line:#e2e8f0; --brand:#075985; --brand-deep:#0c4a6e; --bad:#b91c1c; --ok:#047857; --amber:#92400e; font-family:Jost, system-ui, sans-serif}
@media (prefers-color-scheme:dark){ :root{--bg:#0b1220; --card:#111a2c; --ink:#e2e8f0; --muted:#94a3b8; --line:#1e293b; --brand:#38bdf8; --brand-deep:#0369a1; --bad:#f87171; --ok:#34d399; --amber:#fbbf24} .top img{background:#fff; border-radius:6px; padding:3px 5px} }
html,body{margin:0} body{background:var(--bg); color:var(--ink); font-size:16px; line-height:1.5}
.testbar{display:flex; align-items:center; justify-content:center; min-height:30px; padding:4px 16px; background:#fef3c7; color:#78350f; font-size:13px; font-weight:600; text-align:center; border-bottom:1px solid #fcd34d}
.top{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:14px 16px; max-width:1600px; margin:0 auto}
main{max-width:1600px; margin:0 auto; padding:0 16px 48px}
h1{font-size:24px; margin:8px 0 4px} h2{font-size:19px; margin:24px 0 8px}
.muted{color:var(--muted)} .small{font-size:14px}
.card{background:var(--card); border:1px solid var(--line); border-radius:12px; padding:16px; margin:12px 0}
.people{display:grid; gap:10px; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); margin-top:12px}
button,.btn{font:inherit; min-height:44px; padding:8px 14px; border-radius:10px; border:1px solid var(--line); background:var(--card); color:var(--ink); cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center; gap:6px}
button.primary,.btn.primary{background:var(--brand-deep); border-color:var(--brand-deep); color:#fff}
button.person{flex-direction:column; align-items:flex-start; text-align:left; padding:12px 16px}
button.person small{color:var(--muted)}
nav.tabs{display:flex; gap:6px; flex-wrap:wrap; margin:8px 0 4px} nav.tabs button[aria-pressed="true"]{background:var(--brand-deep); color:#fff; border-color:var(--brand-deep)}
.tablewrap{overflow-x:auto; background:var(--card); border:1px solid var(--line); border-radius:12px}
table{border-collapse:collapse; width:100%; font-size:15px} th,td{text-align:left; padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:top} th{font-size:13px; color:var(--muted); font-weight:600; white-space:nowrap}
tr:last-child td{border-bottom:0}
.st{font-weight:600; white-space:nowrap} .st.done{color:var(--ok)} .st.bad{color:var(--bad)} .st.wait{color:var(--amber)}
.linkbox{display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:8px} .linkbox code{flex:1 1 280px; word-break:break-all; font-size:13px; background:var(--bg); border:1px solid var(--line); border-radius:8px; padding:8px}
.err{color:var(--bad); font-weight:600}
.acts{display:flex; gap:6px; flex-wrap:wrap}
select{font:inherit; min-height:44px; padding:0 10px; border:1px solid var(--line); border-radius:10px; background:var(--card); color:var(--ink); max-width:100%}
.msg pre{white-space:pre-wrap; word-break:break-word; font:15px/1.5 inherit; font-family:inherit; background:var(--bg); border:1px solid var(--line); border-radius:10px; padding:12px; margin:10px 0 0}
tr.hl td{background:color-mix(in srgb, var(--brand) 14%, transparent)}
a{color:var(--brand)}
.caseform .grid2{display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:10px; margin-top:10px}
.fld{display:flex; flex-direction:column; gap:4px; font-size:14px} .fld span{color:var(--muted)}
.fld input,.fld textarea{font:inherit; min-height:44px; padding:8px 10px; border:1px solid var(--line); border-radius:10px; background:var(--card); color:var(--ink)}
.testnote{margin:-16px -16px 12px; padding:8px 16px; background:#fef3c7; color:#78350f; font-weight:600; font-size:14px; border-radius:12px 12px 0 0}

/* team tab: someone who has left FCMB */
tr.left td{color:var(--muted)} .lefttag{display:inline-block;margin-left:6px;padding:1px 8px;border-radius:999px;border:1px solid currentColor;font-size:12px;white-space:nowrap}

/* a field that could not be saved: red border, red message under it (24 Nov 2026) */
.fld .err, .fld .fielderr{color:var(--bad); font-weight:600}
.fld [aria-invalid="true"]{border:2px solid var(--bad)}
.saveerr{flex:1 1 200px}
button[disabled]{opacity:.6; cursor:default}
.fld [aria-invalid="true"]:focus{outline:2px solid var(--bad); outline-offset:1px}
.emailfix{margin-top:6px; background:none; border:1.5px solid var(--brand); color:var(--brand); border-radius:10px; padding:8px 12px; font:inherit; font-weight:600; min-height:44px; text-align:left; cursor:pointer}

/* =====================================================================
   Every team page tab fits the screen, with no scrolling left and right (Vishwa, 24 Nov 2026): long text wraps, tables use
   the page width, and on a narrow screen (under 1000 px) each row is a stacked card with every button still reachable.
   ===================================================================== */
.tablewrap{overflow-x:visible}
table{table-layout:auto} th{white-space:normal} .st{white-space:normal}
td, th, .card, p, li{overflow-wrap:break-word}   /* ordinary words stay whole */
td a, td code, td .small, td .muted, .linkbox code, pre, .note{overflow-wrap:anywhere}   /* long text without spaces (emails, links, file names, notes) may break */
.st, td .st{overflow-wrap:normal; word-break:normal}
td{min-width:4.5em}
td input, td select, td textarea, td button, .acts > *{max-width:100%}
td .acts{flex-wrap:wrap}
main img, main svg{max-width:100%; height:auto}
@media (max-width:1000px){
  .tablewrap{background:none; border:0}
  table, thead, tbody, tr, th, td{display:block; width:auto}
  thead{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0)}
  tbody tr{background:var(--card); border:1px solid var(--line); border-radius:12px; margin:10px 0; padding:6px 4px}
  td{border-bottom:0; padding:6px 12px}
  td[data-label]::before{content:attr(data-label); display:block; font-size:12px; color:var(--muted); font-weight:600; margin-bottom:2px}
  td[colspan]{padding:6px}
  .acts{gap:8px} .acts > button, .acts > select, .acts > a{flex:1 1 auto}
}
/* "Move to…" in the Documents panel: the list fits the space it has (its longest choice must not push the page wider) */
td .acts{display:flex !important; flex-wrap:wrap; max-width:100%}
.moveSel{width:100%; min-width:0; max-width:100%; flex:1 1 180px}
