/* styles.css: the one stylesheet for the whole Test Manager UI (index.html). Plain CSS, no build step.
   Colors and fonts are tokens in :root. Sections run roughly top to bottom as the app does:
   layout, buttons, forms, tables, dashboard, test cases, plans, runs, settings. */
/* Come and See brand: New Life teal, Deep Space navy, Natural Grain. Soft corners and round pills (Daphne, 4 Nov). */
/* ---- Design tokens: brand colors, status colors, fonts ---- */
:root {
  /* Brand constants (Come and See) */
  --teal: #00B9AD; --navy: #002556; --grain: #F6F5EE; --deep-ocean: #00736C;
  --grass: #97B572; --dust: #AE8E75; --earth: #695040; --sunup: #EC9823; --firstlight: #FFCD73; --floral: #F2C9C1; --sky: #B8EBE8;
  --onAccent: #002556; /* text on teal fills, in every theme */
  --font: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --r-card: 14px; --r-ctl: 10px; /* soft corners: cards, then buttons and fields; pills are fully round */
  /* Theme colors. CAS (the default): navy menu on Natural Grain. */
  --bg: #F6F5EE; --text: #002556; --card: #FFFFFF; --soft: #FBFAF6; --input: #FFFFFF;
  --line: #E4E1D6; --inputLine: #CFCBBD; --muted: #56657A; --ocean: #00736C;
  --hover: #EEF8F7; --sel: #DFF5F3; --hero: #002556; --heroText: #FFFFFF;
  --side: #002556; --sideText: #FFFFFF; --sideMuted: #AEBBD0; --sideActive: rgba(0,185,173,.20); --sideActiveText: #FFFFFF; --sideLine: rgba(255,255,255,.14);
  --pass: #2E7D4F; --fail: #B3261E; --warn: #EC9823;
  --passBg: #E3F2E8; --passFg: #1E6B40; --failBg: #FBE5E3; --failFg: #9E2A21; --warnBg: #FDF0DB; --warnFg: #83490A;
  --neuBg: #EDEFF4; --neuFg: #36465C; --reviewBg: #FFE49E; --reviewFg: #5E4500; --chipBg: #E1F6F4; --chipFg: #00665F; --runBg: #DDF3F1; --runFg: #00615B;
  color-scheme: light;
}
/* Light: white menu on a cool off-white page */
:root[data-theme="light"] {
  --bg: #F4F6F9; --soft: #F8FAFC; --line: #E3E7EE; --inputLine: #CBD3DE;
  --side: #FFFFFF; --sideText: #002556; --sideMuted: #56657A; --sideActive: #E1F6F4; --sideActiveText: #00665F; --sideLine: #E3E7EE;
}
/* Dark: deep navy-black, lighter text and brighter status colors so everything stays readable */
:root[data-theme="dark"] {
  --bg: #0B1524; --text: #E6EDF5; --card: #111F33; --soft: #0E1A2C; --input: #0E1A2C;
  --line: #24354E; --inputLine: #34486A; --muted: #9FADBF; --ocean: #62E3DA;
  --hover: #16273F; --sel: rgba(0,185,173,.16); --hero: #0F2A45; --heroText: #E6EDF5;
  --side: #07101C; --sideText: #E6EDF5; --sideMuted: #8D9BAE; --sideActive: rgba(0,185,173,.16); --sideActiveText: #62E3DA; --sideLine: #1C2A3E;
  --pass: #4CC082; --fail: #F07468;
  --passBg: rgba(63,191,115,.16); --passFg: #86E0AA; --failBg: rgba(240,90,80,.17); --failFg: #FFA39B; --warnBg: rgba(236,152,35,.18); --warnFg: #F5C077;
  --neuBg: #1A2A41; --neuFg: #CBD5E3; --reviewBg: rgba(255,205,115,.24); --reviewFg: #FFD98C; --chipBg: rgba(0,185,173,.15); --chipFg: #62E3DA; --runBg: rgba(0,185,173,.17); --runFg: #62E3DA;
  color-scheme: dark;
}
/* ---- Base elements ---- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); }
a { color: var(--ocean); }
h1 { font-size: 24px; margin: 0 0 4px; font-weight: 700; }
h2 { font-size: 17px; margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 700; }
.kicker { font-family: var(--serif); font-style: italic; color: var(--ocean); font-size: 17px; margin: 0 0 18px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
pre { background: #0b1e3a; color: #e6f2f1; padding: 10px 12px; overflow-x: auto; margin: 6px 0; white-space: pre; }
pre .hl { background: rgba(236,152,35,.35); display: inline-block; width: 100%; }

/* ---- Left menu (brand, project, pages, appearance, my computer, signed-in person) ---- */
body { display: flex; min-height: 100vh; }
body.signedout .side { display: none; }
.side { position: sticky; top: 0; height: 100vh; flex: 0 0 248px; box-sizing: border-box; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding: 20px 14px 16px; background: var(--side); color: var(--sideText); border-right: 1px solid var(--sideLine); z-index: 10; }
.mainwrap { flex: 1; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 12px 20px; color: var(--sideText); text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap; }
.brand b { color: var(--teal); }
.mark { width: 18px; height: 18px; border-radius: 5px; background: var(--teal); display: inline-block; flex: none; }
.sidelbl { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--sideMuted); padding: 0 12px 6px; }
#projectPicker { margin: 0 4px 16px; width: auto; font: inherit; font-size: 13px; padding: 10px 12px; border-radius: var(--r-ctl); border: 1px solid var(--sideLine); background: transparent; color: var(--sideText); }
#projectPicker { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; cursor: pointer; }
#projectPicker > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#projectPicker:hover { border-color: var(--teal); }
#projectPicker:disabled { cursor: default; opacity: .7; }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-ctl); font-size: 14px; color: var(--sideMuted); text-decoration: none; }
#nav a svg { width: 19px; height: 19px; flex: none; }
#nav a:hover { color: var(--sideText); background: var(--sideActive); }
#nav a.on { background: var(--sideActive); color: var(--sideActiveText); font-weight: 600; }
.spacer { flex: 1; min-height: 24px; }
.appear { display: flex; padding: 3px; margin: 0 4px 12px; border-radius: var(--r-ctl); background: var(--sideLine); gap: 2px; }
.appear button { flex: 1; border: 0; background: transparent; color: var(--sideMuted); font: inherit; font-size: 12px; padding: 7px 4px; border-radius: 8px; cursor: pointer; }
.appear button.on { background: var(--side); color: var(--sideText); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.18); }
.mycomp { margin: 0 4px 12px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--sideActive); font-size: 12px; display: flex; align-items: center; gap: 8px; color: var(--sideText); text-decoration: none; }
#who { display: flex; align-items: center; gap: 10px; padding: 12px 8px 2px; border-top: 1px solid var(--sideLine); font-size: 13px; }
#who .avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: var(--onAccent); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
#who .wname { flex: 1; min-width: 0; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; }
#who .wrole { color: var(--sideMuted); font-size: 12px; text-transform: capitalize; }
#who .btn { background: transparent; color: var(--sideText); border-color: var(--sideLine); }
.role { display: inline-block; padding: 2px 9px; font-size: 11px; font-weight: 700; text-transform: capitalize; background: var(--teal); color: var(--onAccent); }
.role.qa { background: var(--sky); } .role.viewer { background: var(--firstlight); }
/* Narrower screens (see also "Responsive layout" at the end):
   1280+ the full menu; 900–1279 an icon-only menu (names pop out when pointed at); under 900 a slim top bar.
   Below 1280, ☰ (or the avatar on the icon menu) opens the full menu over the page. */
.mbtn { display: none; }

/* ---- Page layout, cards and KPI tiles ---- */
main { max-width: 1240px; margin: 0 auto; padding: 28px 32px 60px; }
main[aria-busy="true"] { opacity: .45; pointer-events: none; transition: opacity .15s .15s; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; margin-bottom: 14px; }
.kicker .st { font-family: var(--font); font-style: normal; margin-right: 6px; }
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); padding: 16px 18px; }
.kpi .n { font-size: 30px; font-weight: 700; line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.kpi.teal { background: var(--teal); border-color: var(--teal); color: var(--onAccent); } .kpi.teal .l { color: var(--text); }
.kpi.navy { background: var(--hero); border-color: var(--text); color: #fff; } .kpi.navy .l { color: var(--sky); }

/* ---- Buttons ---- */
.btn { font: inherit; font-weight: 600; padding: 8px 14px; border: 1px solid var(--inputLine); background: var(--card); color: var(--text); cursor: pointer; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: var(--onAccent); }
.btn.primary:hover { background: #00a79c; }
.btn.danger { border-color: var(--fail); color: var(--fail); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Form fields and chips ---- */
input[type=text], input[type=email], input[type=password], input[type=search], input:not([type]), select, textarea {
  font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--inputLine); padding: 7px 9px; width: 100%;
}
textarea { min-height: 120px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
label.f { display: block; font-weight: 600; font-size: 12px; margin: 10px 0 4px; text-transform: uppercase; letter-spacing: .04em; color: var(--text); }
.hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { display: flex; gap: 6px; align-items: center; font-weight: 500; }
.chip { display: inline-block; padding: 3px 10px; margin: 1px 3px 1px 0; font-size: 12px; font-weight: 600; background: var(--chipBg); color: var(--chipFg); white-space: nowrap; }
.chip.plat { background: var(--neuBg); color: var(--neuFg); }
.chip.btnchip { cursor: pointer; border: 1px solid var(--teal); background: var(--card); }
.chip.btnchip.on { background: var(--teal); color: var(--onAccent); }

/* ---- Tables ---- */
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--soft); }
td:first-child { white-space: nowrap; }
tr.group td { background: var(--soft); font-weight: 700; color: var(--ocean); }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--hover); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); }

/* ---- Status pills (run and result states, automation kind) ---- */
.st { font-weight: 600; font-size: 12px; text-transform: capitalize; padding: 3px 11px; display: inline-block; white-space: nowrap; }
.st.passed, .st.completed { background: var(--passBg); color: var(--passFg); }
.st.failed { background: var(--failBg); color: var(--failFg); }
.st.skipped, .st.blocked, .st.cancelled { background: var(--warnBg); color: var(--warnFg); }
.st.untested, .st.queued, .st.dispatched { background: var(--neuBg); color: var(--muted); }
.st.running { background: var(--runBg); color: var(--runFg); }
.st.automated { background: var(--teal); color: var(--onAccent); } .st.manual { background: var(--neuBg); color: var(--muted); }
/* Automation pipeline: Repo Ready (QA's queue) -> In Repo (waiting on engineering) -> Auto Dev (being scripted) -> Automated */
.st.update_needed { background: var(--warnBg); color: var(--warnFg); }
.scripthint { margin-top: 8px; padding: 8px 10px; border-radius: var(--r-ctl); background: var(--warnBg); color: var(--warnFg); font-size: 13px; }
.st.repo_ready { background: var(--neuBg); color: var(--neuFg); } /* gray: still Manual until it's in the repo */ .st.in_repo { background: var(--chipBg); color: var(--chipFg); } .st.auto_dev { background: var(--runBg); color: var(--runFg); box-shadow: inset 0 0 0 1px currentColor; }

/* ---- Dashboard: result bars, daily trend, legends ---- */
.bar { display: flex; height: 10px; background: var(--neuBg); overflow: hidden; min-width: 80px; }
.bar span { display: block; height: 100%; }
.bar .p { background: var(--pass); } .bar .f { background: var(--fail); } .bar .o { background: var(--sunup); } .bar .u { background: var(--inputLine); } .bar .t { background: var(--teal); }
.trend { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 8px; }
.trend .col { flex: 1; display: flex; flex-direction: column-reverse; min-width: 6px; }
.trend .col span { display: block; }
.axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; border-top: 1px solid var(--line); padding-top: 3px; }
.card-sub { margin: -6px 0 12px; font-size: 12px; color: var(--muted); }
.explain { margin: 12px 0 0; font-size: 13px; }
.explain summary { cursor: pointer; color: var(--ocean); font-weight: 600; }
.explain ul { margin: 8px 0 0; padding-left: 20px; background: var(--card); border: 1px solid var(--line); padding: 10px 14px 10px 32px; }
.explain li { margin: 3px 0; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; }

/* ---------- Test cases: folder panel + contents (file-browser style) ---------- */
.cases-layout { display: grid; grid-template-columns: var(--fw, 290px) minmax(0, 1fr); gap: 0; align-items: start; background: var(--card); border: 1px solid var(--line); min-height: 560px; }
.cases-layout.tree-hidden { grid-template-columns: 0 minmax(0, 1fr); }
.cases-layout.tree-hidden .fpanel { visibility: hidden; overflow: hidden; border: 0; }
body.resizing, body.resizing * { cursor: col-resize !important; user-select: none !important; }

.fpanel { position: sticky; top: 16px; height: calc(100vh - 32px); border-radius: var(--r-card) 0 0 var(--r-card); min-height: 560px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--soft); }
.fpanel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 8px 14px; }
.fpanel-title { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ficons { display: flex; gap: 2px; }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 1px solid transparent; background: none; color: var(--text); cursor: pointer; }
.ibtn:hover { background: var(--neuBg); }
.ibtn.bordered { border-color: var(--text); width: 36px; height: 36px; }
.fsearch { display: flex; align-items: center; gap: 6px; margin: 0 10px 8px; padding: 0 8px; background: var(--card); border: 1px solid var(--inputLine); color: var(--muted); }
.fsearch:focus-within { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(0,185,173,.18); }
.fsearch input { border: 0 !important; padding: 7px 0 !important; outline: none; background: none; box-shadow: none; }
.fsearch.grow { flex: 2; min-width: 200px; margin: 0; }
.ftree { flex: 1; overflow: auto; padding: 2px 0 12px; outline: none; }
.fempty { color: var(--muted); font-size: 12px; padding: 8px 16px; }

/* ---- Folder tree nodes ---- */
.fnode { position: relative; display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 6px 0 10px; cursor: pointer; color: var(--text); user-select: none; outline: none; }
.fnode:hover { background: var(--hover); }
.fnode:focus-visible { box-shadow: inset 0 0 0 2px var(--teal); }
.fnode.on { background: var(--sel); font-weight: 600; }
.fnode.on::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; background: var(--teal); }
.fnode.drop { background: var(--chipBg); box-shadow: inset 0 0 0 2px var(--teal); }
.fnode.dragging { opacity: .45; }
.fnode.special { font-weight: 600; }
.fnode.special + .fnode:not(.special), .fnode.special[data-folder="none"] { margin-top: 2px; }
.fnode.special[data-folder="none"] { border-top: 1px solid var(--line); margin-top: 8px; }
.ind { flex: none; width: 16px; align-self: stretch; position: relative; }
.ind::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.chev { flex: none; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; padding: 0; color: var(--muted); cursor: pointer; transition: transform .15s ease; }
.chev svg { width: 14px; height: 14px; }
.chev.open { transform: rotate(90deg); }
.chev:hover { color: var(--text); }
.ficon { flex: none; display: inline-flex; color: var(--ocean); }
.fnode.on .ficon { color: var(--teal); }
.ficon.big svg { width: 26px; height: 26px; }
.ficon.huge svg { width: 44px; height: 44px; }
.fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 4px; }
.fname mark { background: var(--warnBg); color: inherit; }
.fcount { flex: none; font-size: 11px; font-weight: 600; color: var(--muted); min-width: 20px; text-align: right; }
.kebab { flex: none; display: none; width: 24px; height: 24px; border: 0; background: none; color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
.kebab:hover { background: var(--sel); }
.fnode:hover .kebab, .fnode:focus-within .kebab, .fnode.on .kebab { display: inline-flex; }
.fnode:hover .fcount, .fnode.on .fcount { display: none; }
.fnode.special .fcount { display: inline !important; }
.finput { flex: 1; min-width: 0; height: 24px; padding: 2px 6px !important; border: 1px solid var(--teal) !important; font: inherit; font-weight: 500; box-shadow: 0 0 0 2px rgba(0,185,173,.2); }
.fnode.editing { background: var(--hover); }
.fresize { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; cursor: col-resize; z-index: 2; }
.fresize:hover { background: linear-gradient(to right, transparent 3px, var(--teal) 3px, var(--teal) 5px, transparent 5px); }

/* ---- Context menu ---- */
.menu { position: fixed; z-index: 80; min-width: 200px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,37,86,.18); padding: 4px; }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; text-align: left; }
.menu button:hover, .menu button:focus { background: var(--hover); outline: none; }
.menu button.danger { color: var(--fail); }
.menu kbd { margin-left: auto; font: 11px var(--font); color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* ---- Folder contents: breadcrumbs, header, filter bar ---- */
.fcontent { min-width: 0; padding: 18px 22px 28px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px; font-size: 12px; margin-bottom: 6px; }
.crumbs a { color: var(--ocean); cursor: pointer; text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.crumbs .sep { color: var(--muted); }
.fhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fhead h2 { margin: 0; font-size: 20px; }
.fhead .btn { display: inline-flex; align-items: center; gap: 6px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle span { width: 32px; height: 18px; background: var(--inputLine); position: relative; transition: background .15s; }
.toggle span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: var(--card); transition: transform .15s; }
.toggle input:checked + span { background: var(--teal); }
.toggle input:checked + span::after { transform: translateX(14px); }
.toggle input:focus-visible + span { box-shadow: 0 0 0 2px var(--ocean); }
.fbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.fbar > input, .fbar > select { width: auto; flex: 1; min-width: 130px; }

/* ---- Test case table, quick add and bulk bar ---- */
.ctable { border: 1px solid var(--line); }
.ctable thead th { position: sticky; top: 0; z-index: 1; }
.ctable td { padding: 9px 10px; vertical-align: middle; }
.cbox { width: 34px; }
.cid { white-space: nowrap; font-weight: 700; color: var(--ocean); font-size: 13px; }
.ctitle { min-width: 200px; } .ctitle .ctags { margin-top: 3px; }
.cplat { white-space: nowrap; }
.chip.more { background: var(--card); border: 1px solid var(--line); }
.cpri { white-space: nowrap; text-transform: capitalize; font-size: 13px; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; vertical-align: 1px; }
.pill { font-size: 11px; font-weight: 600; text-transform: capitalize; padding: 2px 8px; white-space: nowrap; background: var(--neuBg); color: var(--muted); margin-left: 4px; }
.crow { cursor: pointer; }
.crow:hover td { background: var(--hover); }
.crow.picked td { background: var(--sel); }
.crow[data-dim] td { color: var(--muted); }
.crow.just-added td { background: var(--warnBg); }
tr[draggable="true"] { cursor: grab; }
.ghead td { background: var(--soft); font-weight: 600; cursor: pointer; padding: 6px 10px; }
.ghead td > * { vertical-align: middle; }
.ghead .chev { display: inline-flex; margin-right: 2px; }
.ghead .gname { margin: 0 8px 0 6px; }
.ghead:hover td { background: var(--hover); }
.quickadd td { padding: 4px 10px; background: var(--card); }
.qa-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--ocean); font: inherit; font-weight: 600; padding: 6px 4px; cursor: pointer; }
.qa-btn:hover { color: var(--text); }
.qa-row { display: flex; align-items: center; gap: 8px; color: var(--ocean); }
.qa-input { border: 0 !important; border-bottom: 2px solid var(--teal) !important; padding: 6px 2px !important; outline: none; }
.fblank { text-align: center; padding: 56px 20px; border: 1px dashed var(--inputLine); color: var(--text); }
.fblank .ficon { color: var(--teal); margin-bottom: 8px; }
.fblank h3 { font-size: 16px; margin: 6px 0 4px; }
.bulk { position: sticky; bottom: 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; width: fit-content; margin: 14px auto 0; background: var(--hero); color: #fff; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,37,86,.25); z-index: 5; }
.bulk select { width: auto; }
.bulk .muted { color: #b8c6d8; }
.btn.ghost { background: transparent; color: #fff; border-color: #50678a; }
.dragghost { position: absolute; top: -1000px; padding: 6px 12px; background: var(--hero); color: #fff; font: 600 13px var(--font); }
select[multiple] { padding: 4px; }
/* grouped platform checkboxes */
.pgroups { display: grid; gap: 8px; }
.pgroup { border: 1px solid var(--line); background: var(--card); padding: 8px 12px; }
.pghead { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text); margin-bottom: 4px; }
.pghead .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.bsep { width: 1px; align-self: stretch; background: #50678a; }
.bulk .btn svg, .fhead .btn svg { width: 14px; height: 14px; vertical-align: -2px; }
.fnode.special.archived { border-top: 0; margin-top: 0; color: var(--muted); }
.fnode.special.archived.on { color: var(--text); }
@media (max-width: 760px) {
  .cases-layout { grid-template-columns: 1fr; }
  .fpanel { position: static; height: auto; max-height: 50vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .fresize { display: none; }
}
/* ---- Failure details and screenshots ---- */
.fail-box { border-left: 4px solid var(--fail); background: var(--failBg); padding: 10px 14px; margin: 6px 0 4px; }
.fail-box .why { font-weight: 600; }
.shots { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.shots img { max-height: 220px; border: 1px solid var(--line); cursor: zoom-in; }
.shots video { max-height: 260px; background: #000; }

/* ---- Modal, toast, login and tabs ---- */
.modal { position: fixed; inset: 0; background: rgba(0,37,86,.55); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 50; overflow-y: auto; }
.modal-card { background: var(--card); width: min(820px, 100%); padding: 22px 24px; border-top: 6px solid var(--teal); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--hero); color: #fff; padding: 10px 18px; z-index: 60; max-width: 90vw; }
.toast.err { background: var(--fail); cursor: pointer; user-select: text; }
.login { max-width: 460px; margin: 60px auto; }
.login button { width: 100%; text-align: left; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
/* Email + password sign-in and set-password forms: a normal, centered primary button */
form.login .fld { margin-bottom: 12px; }
form.login button[type=submit] { justify-content: center; text-align: center; margin-top: 4px; }
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 8px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a.on { color: var(--text); border-bottom-color: var(--teal); }
.token { background: var(--warnBg); color: var(--text); padding: 10px; font-family: monospace; word-break: break-all; }
/* ---- Active-filter banner and run warning boxes ---- */
.factive { margin: -4px 0 10px; padding: 8px 12px; background: var(--warnBg); font-size: 12px; color: var(--text); }
.waitbox { border-left: 4px solid var(--sunup); background: var(--warnBg); padding: 10px 14px; margin: 0 0 14px; }
.waitbox .why { font-weight: 600; margin: 0 0 4px; }
#execWarn { margin: 8px 0 0; }
/* case editor / viewer */
.modal-card.wide { width: min(980px, 100%); }
.opt { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 11px; }
textarea.plain { font-family: var(--font); font-size: 14px; min-height: 0; }
.seg { display: inline-flex; border: 1px solid var(--inputLine); }
.seg button { font: 600 13px var(--font); padding: 6px 12px; border: 0; background: var(--card); color: var(--text); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--inputLine); }
.seg button.on { background: var(--hero); color: #fff; }
.seg { margin: 4px 0 8px; }
.steps-edit td { padding: 4px; vertical-align: top; }
.steps-edit td.num, .steps-table td.num { width: 28px; color: var(--muted); font-weight: 700; text-align: right; padding-top: 10px; }
.steps-edit textarea, .steps-edit input { font-family: var(--font); font-size: 13px; min-height: 0; resize: vertical; padding: 6px 8px; }
.steps-edit th:nth-child(4), .steps-edit td:nth-child(4) { width: 18%; }
.rowacts { white-space: nowrap; width: 84px; }
.rowacts button { width: 24px; height: 26px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; padding: 0; }
.rowacts button:hover:not(:disabled) { border-color: var(--teal); background: var(--chipBg); }
.rowacts button:disabled { opacity: .35; cursor: default; }
.genhead { margin: 14px 0 4px; font-size: 13px; }
.warnline { display: inline-block; background: var(--warnBg); border-left: 3px solid var(--sunup); padding: 4px 8px; margin-top: 4px; }
.linkbtn { border: 0; background: none; color: var(--ocean); font: inherit; font-weight: 600; cursor: pointer; padding: 0 4px; text-decoration: underline; }
.linkbtn.danger { color: var(--fail); }
.steps-table { margin: 4px 0; } .steps-table td { vertical-align: top; }
.prewrap { white-space: pre-wrap; }
/* ---- Case comments ---- */
.comments { margin-top: 14px; }
.comment { border: 1px solid var(--line); background: var(--soft); padding: 8px 12px; margin-bottom: 8px; }
.chead { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cacts { margin-left: auto; }
.cbody { margin-top: 4px; }
.cnew { display: flex; gap: 8px; align-items: flex-start; }
.cnew textarea { font-family: var(--font); font-size: 14px; min-height: 0; }

/* ---------- Test plans ---------- */
.pgroup-h { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 14px 4px; }
.ptag { color: var(--muted); font-weight: 500; font-size: 11px; margin-left: 6px; }
.fnode.pnode.sys .fcount { display: inline !important; }
.pdesc { margin: -4px 0 14px; max-width: 72ch; }
.fhead h2 .chip { vertical-align: 3px; font-size: 12px; }
.chip.planchip { font: inherit; font-size: 12px; font-weight: 600; padding: 3px 10px; margin: 0 6px 6px 0; color: var(--text); }
.chip.planchip .muted { font-weight: 500; margin-left: 2px; }
.chip.planchip.on .muted { color: var(--text); }
.picker { display: grid; grid-template-columns: 250px minmax(0, 1fr); border: 1px solid var(--line); height: min(60vh, 560px); }
.picker-tree { overflow: auto; border-right: 1px solid var(--line); background: var(--soft); padding: 6px 0; }
.pk-node { display: flex; align-items: center; gap: 6px; height: 32px; padding-right: 10px; cursor: pointer; }
.pk-node:hover { background: var(--hover); }
.pk-node.on { background: var(--sel); font-weight: 600; }
.pk-node input, .pk-row input { width: auto; margin: 0; accent-color: var(--teal); }
.picker-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 10px; } /* min-height: 0 lets the list scroll inside the fixed-height picker */
.picker-main .fbar { margin-bottom: 8px; }
.picker-list { flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--line); }
.pk-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pk-row:hover { background: var(--hover); }
.pk-row.on { background: var(--sel); }
.pk-headrow { background: var(--soft); font-size: 12px; font-weight: 600; color: var(--muted); position: sticky; top: 0; z-index: 1; }
.pk-title { flex: 1; min-width: 0; }
.pk-where { display: block; }
.picker-foot { margin-top: 12px; }
@media (max-width: 760px) {
  .picker { grid-template-columns: 1fr; height: auto; }
  .picker-tree { max-height: 180px; border-right: 0; border-bottom: 1px solid var(--line); }
  .picker-list { max-height: 50vh; }
}

/* Test runs list */
.livebox { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-left: 4px solid var(--teal); background: var(--card); padding: 12px 16px; margin: 0 0 10px; cursor: pointer; }
.livebox:hover { background: var(--hover); }
.runfilters { margin: 6px 0 4px; gap: 8px; }
.runfilters select { width: auto; }
.runfilters input { width: auto; flex: 1; min-width: 160px; }
.runday { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 6px; }
.runrows { background: var(--card); border: 1px solid var(--line); }
.runrow { display: grid; grid-template-columns: 130px minmax(0, 1fr) 170px; gap: 14px; align-items: center; padding: 10px 14px; cursor: pointer; }
.runrow + .runrow { border-top: 1px solid var(--line); }
.runrow:hover { background: var(--hover); }
.runwhat { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.runkinds { margin-left: auto; padding-left: 8px; display: flex; gap: 4px; }
.runwhat .chip { margin-right: 4px; }
.chip.env { background: var(--hero); color: #fff; }
.chip.plan { background: var(--chipBg); }
@media (max-width: 640px) { .runrow { grid-template-columns: 1fr; gap: 6px; } .runrow > div:last-child { text-align: left !important; } }
.pk-row.off { cursor: default; opacity: .55; }
.pk-row.off:hover { background: none; }

/* New run */
.newrun { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.req { color: var(--fail); }
input.bad, select.bad, textarea.bad { border-color: var(--fail); }
#e_platbox.bad, #rowsBody.bad { outline: 2px solid var(--fail); outline-offset: 3px; border-radius: var(--r-ctl); }
.sellist { border: 1px solid var(--line); max-height: 320px; overflow: auto; }
.selrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 10px; font-size: 13px; }
.selrow + .selrow { border-top: 1px solid var(--line); }
.selrow svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--ocean); }
.sellist > p { padding: 0 10px; }
.moreopts { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.moreopts summary { cursor: pointer; font-weight: 600; color: var(--ocean); font-size: 13px; }
.runbar { position: sticky; bottom: 0; z-index: 5; margin-top: 16px; background: var(--hero); color: #fff; padding: 12px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.runbar .warnline { color: var(--firstlight); }
@media (max-width: 860px) { .newrun { grid-template-columns: 1fr; } }

/* Test case view */
.casehead { align-items: flex-start; gap: 12px; }
.casetop { position: relative; flex: none; align-items: center; gap: 8px; }
.menudanger { display: inline-flex; align-items: center; gap: 8px; color: var(--fail); font-weight: 600; }
.menudanger svg { width: 15px; height: 15px; }
.xbtn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; background: none; border: 1px solid transparent; color: var(--text); cursor: pointer; }
.xbtn:hover { background: var(--soft); border-color: var(--line); }
.xbtn:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
details.hist { margin-top: 16px; border: 1px solid var(--line); background: var(--card); }
details.hist > summary { cursor: pointer; padding: 10px 12px; list-style-position: inside; }
details.hist[open] > summary { border-bottom: 1px solid var(--line); }
details.hist > div { padding: 8px 12px 12px; }
details.hist .pager { margin-top: 10px; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 10px; }
.pager .small { margin-right: 6px; }
.pgbtn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; }
.pgbtn:hover:not(:disabled) { border-color: var(--teal); color: var(--ocean); background: var(--soft); }
.pgbtn:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.pgbtn:disabled { color: var(--line); cursor: default; }

/* Dashboard: Progress by platform (one small chart per platform) */
.pg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.pg { border: 1px solid var(--line); padding: 12px; background: var(--card); }
.pg-head { font-size: 15px; }
.pg-now { font-size: 13px; color: var(--muted); margin: 2px 0 10px; } .pg-now b { font-size: 22px; color: var(--text); }
.pg-wrap { position: relative; padding-left: 22px; }
.pg-y { position: absolute; left: 0; font-size: 11px; color: var(--muted); } .pg-y.top { top: -6px; } .pg-y.bot { bottom: -4px; }
.pg-chart { display: block; width: 100%; height: 90px; overflow: visible; }
.pg-line { fill: none; stroke: var(--teal); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.pg-area { fill: var(--teal); opacity: .12; }
.pg-all { stroke: var(--muted); stroke-dasharray: 3 3; stroke-width: 1; vector-effect: non-scaling-stroke; opacity: .6; }
.pg-base { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.pg-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; padding-left: 22px; }
.pg-change { font-size: 12px; color: var(--muted); margin-top: 6px; }
.pg-wrap.pct, .pg-axis.pct { padding-left: 34px; }
.cv-rows { display: grid; gap: 10px; }
.cv-row { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr auto; gap: 12px; align-items: center; font-size: 13px; }
.cv-bar { display: flex; height: 12px; background: var(--line); }
.cv-bar span { display: block; height: 100%; }
.cv-auto { background: var(--teal); } .cv-wait { background: #B8EBE8; } .cv-man { background: var(--line); }
.cv-num { white-space: nowrap; color: var(--muted); } .cv-num b { color: var(--text); }
.cv-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 12px; }
.cv-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--line); }
.pg-up { color: var(--pass); font-weight: 700; } .pg-down { color: var(--fail); font-weight: 700; }
/* ---- Dashboard: Test plan runs table ---- */
.pl-table th.num, .pl-table td.num { text-align: right; }
.pl-table tr.pl-sub td { font-size: 13px; color: var(--muted); padding-top: 5px; padding-bottom: 5px; }
.pl-table tr.pl-sub td:first-child { padding-left: 26px; }
.pl-table tr.pl-sub td:last-child { font-weight: 600; }
.pl-note { font-size: 12px; color: var(--muted); margin: 10px 0 0; }
/* ---- Dashboard: Pass rate chart, plus Settings (projects, users, tooltips) ---- */
label.switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; }
label.switch input { width: auto; margin: 0; accent-color: var(--teal); }
.pr-chart { display: block; width: 100%; height: auto; overflow: visible; }
.pr-grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 3; }
.pr-lab { fill: var(--muted); }
.pr-dot { fill: var(--teal); stroke: var(--card); stroke-width: 2; }
h2.sec { margin: 4px 0 10px; }
.projpick { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.projpick label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.projpick input { width: auto; margin: 0; accent-color: var(--teal); }
.btn.edit { border-color: var(--teal); color: var(--ocean); }
.usertable td { vertical-align: middle; }
.uacts { white-space: nowrap; text-align: right; }
.uacts .btn + .btn { margin-left: 6px; }
.fld { display: block; margin-top: 12px; }
.fld > span { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; }
.fld input:disabled, .fld select:disabled { opacity: .6; cursor: not-allowed; }
.usertable .uemail { overflow-wrap: anywhere; min-width: 150px; }
.tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 4px; border: 1px solid var(--ocean); color: var(--ocean); font-size: 10px; cursor: help; vertical-align: 1px; }
.tip > b { font-family: 'EB Garamond', serif; font-style: italic; font-size: 12px; line-height: 1; }
.tipbox { display: none; position: absolute; left: 22px; top: -6px; z-index: 20; width: 300px; padding: 10px 12px; background: var(--hero); color: #fff; font-size: 12px; font-weight: 400; line-height: 1.5; box-shadow: 0 6px 18px rgba(0,37,86,.25); }
.tipbox b { color: var(--teal); }
.tip:hover .tipbox, .tip:focus .tipbox { display: block; }
/* A tip on a form label (e.g. Automation, at the right edge): opens below, leaning left, in normal case. */
label.f .tipbox { left: auto; right: -8px; top: 22px; width: 260px; text-transform: none; letter-spacing: normal; }
details.revoked { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
details.revoked summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); }
details.revoked table { margin-top: 6px; }

/* Priority and Status pills on a test case (click to change, QA). Same shape as the .st pills. */
.casepills { align-items: center; }
.vpill { position: relative; display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12px; font-weight: 600; text-transform: capitalize; padding: 3px 11px; border: 1px solid transparent; white-space: nowrap; cursor: pointer; line-height: 1.4; }
.vpill:disabled { cursor: default; }
.vpill:not(:disabled):hover { border-color: currentColor; }
.vpill:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.vpill svg { flex: none; }
.vpill .dot { margin: 0; }
.vpill .vchev { margin-left: 1px; opacity: .8; }
.pri-critical { background: var(--failBg); color: var(--failFg); }
.pri-high { background: var(--warnBg); color: var(--warnFg); }
.pri-medium { background: var(--chipBg); color: var(--ocean); }
.pri-low { background: var(--passBg); color: var(--passFg); }
.stat-ready { background: var(--passBg); color: var(--passFg); }
.stat-draft { background: var(--neuBg); color: var(--muted); }
.stat-needs_review { background: var(--reviewBg); color: var(--reviewFg); } /* yellow (First Light) */
.stat-archived { background: var(--warnBg); color: var(--warnFg); }
.pmenu { position: absolute; z-index: 50; margin-top: 4px; min-width: 150px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 37, 86, .12); padding: 4px 0; }
.casepills { position: relative; }
.pmenu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 12px; background: none; border: 0; font: inherit; font-size: 13px; color: var(--text); text-align: left; cursor: pointer; }
.pmenu button svg:last-child:not(:first-child) { margin-left: auto; color: var(--ocean); }
.pmenu button:hover, .pmenu button:focus-visible { background: var(--soft); outline: none; }
.pmenu .dot { margin: 0; }
/* Test case header: one labeled row per kind of pill (State / Execution / Tags). */
.casefacts { margin: 4px 0 8px; }
.factrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid var(--line); }
.factrow:first-child { border-top: 0; }
.factlbl { flex: 0 0 96px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
@media (max-width: 520px) { .factlbl { flex-basis: 100%; } }
.pmenu button svg:first-child { width: 15px; height: 15px; flex: none; }
/* Edit test case: Save / Cancel at the top right, pinned while the form scrolls. */
.edithead { position: sticky; top: -40px; z-index: 5; align-items: center; gap: 12px; background: var(--card); margin: -22px -24px 8px; padding: 14px 24px 10px; border-bottom: 1px solid var(--line); }
.edithead h2 { margin: 0; }

/* Settings › My Computer */
ol.connect { padding-left: 20px; margin: 12px 0 0; }
ol.connect > li { margin-bottom: 16px; }
.cmdbox { display: flex; align-items: center; gap: 8px; background: var(--soft); border: 1px solid var(--line); padding: 8px 10px; margin-top: 6px; }
.cmdbox code { flex: 1; font-size: 12px; word-break: break-all; }
.cmdbox.pending code { color: var(--muted); }
.cmdbox.pending > span { flex: none; }
/* Device guide "Save it" form: type, name, IP address side by side; the command below fills itself in */
.devform { margin-top: 8px; }
.devform-row { display: flex; flex-wrap: wrap; gap: 10px; }
.devform-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 500; flex: 1 1 150px; min-width: 0; }
.devform-row label select, .devform-row label input { width: 100%; }
.okbox { border-left: 4px solid var(--pass); background: var(--passBg); padding: 10px 14px; margin-top: 8px; }
.pcrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }

/* Settings › Runners & Devices: one fold per computer (offline ones start folded) */
details.machine { border-top: 1px solid var(--line); padding: 10px 0; }
details.machine > summary { cursor: pointer; font-size: 15px; }
details.machine > table { margin-top: 8px; }

/* Online / offline dot for computers (Runners & Devices, My Computer) */
.sdot { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; border-radius: 50%; } /* round, like a status light */
.sdot.on { background: radial-gradient(circle at 35% 35%, #8fe0ae, var(--pass) 60%); box-shadow: 0 0 6px 2px rgba(46, 125, 79, .45); }
.sdot.off { background: radial-gradient(circle at 35% 35%, #dfe3e8, #a9b2be 60%); box-shadow: inset 0 0 0 1px rgba(0, 37, 86, .12); } /* a light that's switched off */
.st-on { color: var(--pass); }
.st-off { color: var(--muted); }

/* Runner Tokens: let the long "whose computer · last used" line wrap so Revoke stays inside the card */
table.tokens td:first-child { white-space: normal; }

/* My Computer › Takes runs On / Off switch */
.tswitch { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; color: var(--text); cursor: pointer; }
.tswitch > span { position: relative; width: 38px; height: 20px; background: var(--inputLine); transition: background .15s; }
.tswitch > span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: var(--card); transition: left .15s; }
.tswitch[aria-checked="true"] > span { background: var(--teal); }
.tswitch[aria-checked="true"] > span::after { left: 21px; }
.tswitch > b { min-width: 24px; font-size: 13px; text-align: left; }
.tswitch:focus-visible { outline: 2px solid var(--ocean); outline-offset: 2px; }
.st-paused { color: var(--warnFg); } /* Rare Earth: readable on white */

/* Runners & Devices: Admin's On / Off switch sits at the right of each computer's line */
details.machine > summary { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; list-style: none; }
details.machine > summary::-webkit-details-marker { display: none; }
details.machine > summary::before { content: '\25B8'; color: var(--text); }
details.machine[open] > summary::before { content: '\25BE'; }
.machine-sw { margin-left: auto; gap: 6px; }

/* Switched Off but running: an amber light (Sunup) */
.sdot.paused { background: radial-gradient(circle at 35% 35%, #FFCD73, #EC9823 60%); box-shadow: 0 0 6px 2px rgba(236, 152, 35, .4); }
/* Machines: name + status on one line, "Last seen" under it */
.mname { display: flex; flex-direction: column; gap: 2px; }
details.machine > summary { align-items: flex-start; }
details.machine > summary > .sdot { margin-top: 3px; }
details.machine > summary::before { line-height: 20px; }

/* ---- Soft corners and round pills (Daphne, 4 Nov) ---- */
.card, .tablewrap, .runrows, .cases-layout, .picker, .modal-card, .pg, .pgroup, details.hist, .comment, .livebox, .explain ul, .sellist, .ctable, .fblank, .login { border-radius: var(--r-card); }
.tablewrap, .runrows, .sellist, .picker, details.hist { overflow: hidden; }
.tablewrap { overflow-x: auto; }
.btn, .seg, .ibtn, .xbtn, .pgbtn, .kebab, .fsearch, .menu, .pmenu, .toast, .cmdbox, .okbox, .waitbox, .fail-box, .warnline, .factive, .token, .bulk, .runbar, .rowacts button, .fnode, .pk-node, .tabs a, .dragghost, .tipbox, .menu button, .pmenu button, .tip,
input[type=text], input[type=email], input[type=password], input[type=search], input:not([type]), select, textarea { border-radius: var(--r-ctl); }
.seg button:first-child { border-radius: 9px 0 0 9px; } .seg button:last-child { border-radius: 0 9px 9px 0; }
.st, .vpill, .chip, .role, .pill, .dot, .tswitch > span, .tswitch > span::after, .toggle span, .toggle span::after, .bar, .cv-bar { border-radius: 999px; }
.tip { border-radius: 50%; }
.btn { border-color: var(--inputLine); }
.btn:hover { background: var(--hover); }
.btn.primary:hover { background: #00a79c; }
.tabs { gap: 6px; border-bottom: 0; padding: 4px; border-radius: 12px; background: var(--neuBg); width: fit-content; max-width: 100%; }
.tabs a { border-bottom: 0; margin-bottom: 0; padding: 8px 14px; }
.tabs a.on { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.modal-card { border-top-width: 5px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
th { background: var(--soft); }
/* Run page: an opened result (failure reason, code, raw error, screenshots) wraps inside the table instead of widening it.
   The detail row's cell is a first-child cell, which tables otherwise keep on one line. */
tr[data-detail] > td { white-space: normal; max-width: 0; }
tr[data-detail] pre { white-space: pre-wrap; overflow-wrap: anywhere; }
tr[data-detail] code, tr[data-detail] .why { overflow-wrap: anywhere; }
tr[data-detail] .shots img, tr[data-detail] .shots video { max-width: 100%; height: auto; }
/* Run page results: Result first and color-coded; the dropdown QA use takes the result's colors. */
table.results select.res { width: auto; border-radius: 999px; font-weight: 600; font-size: 12px; padding: 5px 28px 5px 12px; border-width: 1px; cursor: pointer; }
select.res-passed { background-color: var(--passBg); color: var(--passFg); border-color: transparent; }
select.res-failed { background-color: var(--failBg); color: var(--failFg); border-color: transparent; }
select.res-skipped, select.res-blocked { background-color: var(--warnBg); color: var(--warnFg); border-color: transparent; }
select.res-untested { background-color: var(--neuBg); color: var(--neuFg); border-color: transparent; }
select.res option { background: var(--card); color: var(--text); }
table.results tr.row-failed > td { background: var(--failBg); }
table.results tr.row-failed > td { background: color-mix(in srgb, var(--failBg) 45%, transparent); }
table.results tr.row-failed.click:hover > td { background: var(--failBg); }
table.results tr[data-rid] > td:nth-child(2) { white-space: nowrap; } /* case number on one line (not the opened detail row) */
table.results tr[data-rid] > td:last-child { white-space: nowrap; } /* time on one line */
/* Runs list: result | name + environment/plan | platforms | Automated/Manual | time */
.runrow { grid-template-columns: 130px minmax(0, 1fr) minmax(0, 190px) 100px 170px; }
.runplats, .runtype { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.runplats .chip { margin: 0; }
/* With build variants: result | name | platforms | variants | type | time */
.runrows.vars .runrow { grid-template-columns: 130px minmax(0, 1fr) minmax(0, 170px) minmax(0, 130px) 100px 170px; }
/* Narrower windows: the variants sit under the platforms instead of in their own column. */
.runvars-in { display: none; width: 100%; }
@media (max-width: 1280px) { .runrows.vars .runrow { grid-template-columns: 130px minmax(0, 1fr) minmax(0, 190px) 100px 170px; } .runrows.vars .runvars { display: none; } .runvars-in { display: flex; flex-wrap: wrap; gap: 4px; } }
@media (max-width: 640px) { .runrows.vars .runrow { grid-template-columns: 1fr; } }
.pill.var { background: var(--chipBg); color: var(--chipFg); text-transform: none; margin-left: 0; font-weight: 500; }
/* Category pill on the case page (Functional, Design, ...) */
.pill.cat { background: var(--chipBg); color: var(--chipFg); text-transform: none; }
/* Settings › Projects › Build variants: name, its platforms, Remove */
.varrow { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.varrow input[type=text] { width: 160px; flex: none; }
.varrow .checks { flex: 1; min-width: 0; }
/* Running strip: progress bar with "x of y done" and the run's type underneath */
.liveprog { width: 240px; flex: none; }
.liveunder { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
@media (max-width: 900px) { .runrow { grid-template-columns: 1fr; gap: 6px; } .runrow > div:last-child { text-align: left !important; } .liveprog { width: 100%; } .livebox { flex-wrap: wrap; } }
/* Test Runs filters: chips that open a tick-list, on one line with the search box */
.runfilters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 4px; }
.fchips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fchipwrap { position: relative; display: inline-flex; align-items: center; }
.fchip { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--inputLine); background: var(--card); color: var(--text); cursor: pointer; white-space: nowrap; }
.fchip:hover { background: var(--hover); }
.fchip.act { background: var(--chipBg); border-color: var(--teal); color: var(--chipFg); font-weight: 600; padding-right: 32px; }
.fchipx { position: absolute; right: 6px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--chipFg); font-size: 16px; line-height: 1; cursor: pointer; }
.fchipx:hover { background: var(--sel); }
.fmenu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 190px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-ctl); box-shadow: 0 8px 24px rgba(0,37,86,.16); display: flex; flex-direction: column; }
.fmenu label { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.fmenu label:hover { background: var(--hover); }
.fmenu input { width: auto; margin: 0; accent-color: var(--teal); }
.fsearchbox { flex: 1 1 220px; min-width: 200px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--inputLine); background: var(--input); color: var(--muted); border-radius: 999px; padding: 0 14px; }
.fsearchbox:focus-within { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(0,185,173,.18); }
.fsearchbox input { border: 0 !important; background: transparent; padding: 8px 0 !important; outline: none; box-shadow: none; flex: 1; min-width: 0; }
.runfilters .fmenu input { flex: none; min-width: 0; width: auto; }
.runfilters .fsearchbox input { width: auto; min-width: 0; }
/* Active runs on the Test Runs list: a little space before the filters */
.liveruns:not(:empty) { margin-bottom: 22px; }
.liveruns .pager { margin-top: 4px; }
/* Active area placeholder: a dotted outline the same height as one active run */
.livebox { min-height: 64px; box-sizing: border-box; }
.liveempty { min-height: 64px; box-sizing: border-box; margin: 0 0 10px; display: flex; align-items: center; justify-content: center; gap: 10px; border: 1.5px dashed var(--inputLine); border-radius: var(--r-card); color: var(--muted); font-size: 13px; }
.liveempty a { color: var(--ocean); font-weight: 600; }
/* Menu: my computer card (light, name, status, On / Off switch) above the signed-in person */
.mycomp { justify-content: space-between; gap: 10px; }
.mycomp-link { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--sideText); text-decoration: none; }
.mycomp-name { font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mycomp-st { font-size: 11px; font-weight: 400; color: var(--sideMuted); }
.mycomp .tswitch > span { background: var(--sideLine); }
.mycomp .tswitch[aria-checked="true"] > span { background: var(--teal); }
.mycomp-st { display: block; white-space: normal; }
/* My Computer: the devices on each computer, folded under it */
details.mydevices { padding: 4px 0 12px; border-bottom: 1px solid var(--line); }
details.mydevices > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ocean); padding: 4px 0; }
details.mydevices > table { margin-top: 6px; }
.pcrow:has(+ details.mydevices) { border-bottom: 0; }
.menuitem { display: inline-flex; align-items: center; gap: 8px; }
.menuitem svg { width: 15px; height: 15px; }
.pmenu button { white-space: nowrap; }
/* Menu: the Test Manager logo (and, on the icon-only menu, the icon). White + teal on the navy CAS and Dark menus,
   navy + teal on the white Light menu (public/test-manager-logo-*.png, test-manager-icon-*.png). */
.brandlogo { display: block; width: 196px; height: auto; }
.brandicon { display: none; width: 40px; height: auto; }
.brand .onLight { display: none; }
:root[data-theme="light"] .brand .onDark { display: none; }
:root[data-theme="light"] .brand .brandlogo.onLight { display: block; }

/* Set up your devices (My Computer): one fold-out guide per kind of device, with what the computer found */
.devsetup { margin-top: 16px; }
details.ds { border: 1px solid var(--line); border-radius: var(--r-ctl); margin-top: 8px; background: var(--card); }
details.ds > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
details.ds > summary::-webkit-details-marker { display: none; }
details.ds > summary::after { content: '▾'; color: var(--muted); margin-left: 4px; }
details.ds[open] > summary::after { content: '▴'; }
.ds-t { flex: 1; font-weight: 600; font-size: 14px; }
.ds-body { border-top: 1px solid var(--line); padding: 10px 14px 12px; font-size: 13px; }
.ds-steps { margin: 6px 0 0; padding-left: 20px; line-height: 1.6; }
.ds-steps > li { margin-bottom: 8px; }
.ds-row { padding: 4px 0; }
.ds-row b { margin: 0 6px; }
.ds-ic { display: inline-flex; width: 18px; height: 18px; border-radius: 999px; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.ds-ic.ok { background: var(--passBg); color: var(--passFg); }
.ds-ic.bad { background: var(--warnBg); color: var(--warnFg); }
.ds-fix { margin: 2px 0 4px 30px; color: var(--text); }
.ds-found { margin-top: 6px; color: var(--muted); }
.pill.pass { background: var(--passBg); color: var(--passFg); }
.pill.warn { background: var(--warnBg); color: var(--warnFg); }
.pill.neu { background: var(--neuBg); color: var(--neuFg); }
.devsetup .pill { text-transform: none; font-size: 12px; border-radius: 999px; padding: 2px 10px; white-space: nowrap; }
.devsetup .tip { border-bottom: 1px dotted var(--muted); cursor: help; color: var(--muted); font-size: 12px; white-space: nowrap; margin-left: 6px; display: inline-block; }

/* My Computer: status card, device tiles with a guide panel, folded connect steps */
.mycomp-status .pcname { font-size: 15px; }
.dtiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
@media (max-width: 900px) { .dtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dtile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); color: var(--text); cursor: pointer; font: inherit; }
.dtile:hover { border-color: var(--muted); }
.dtile b { font-size: 14px; }
.dtile .pill { margin: 6px 0 0; }
.dtile.needsfix { border: 2px solid var(--warnFg); }
.dtile.on { border: 2px solid var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent); }
.dpanel { margin-top: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-ctl); font-size: 13px; }
.dpanel h3 { margin: 0 0 6px; font-size: 15px; }
details.connect-more { margin-top: 16px; }
details.connect-more > summary { cursor: pointer; font-weight: 600; color: var(--ocean); }
details.connect-more[open] > summary { margin-bottom: 4px; }

/* ---- Jira: ticket pills, the ticket field in Edit Test Case, the run picker's ticket strip, Settings › Jira ---- */
.pill.tix { display: inline-flex; align-items: center; gap: 6px; background: var(--chipBg); color: var(--chipFg); text-transform: none; margin: 2px 6px 2px 0; padding: 3px 10px; font-weight: 500; max-width: 100%; }
.pill.tix a, .pill.tix > span { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; min-width: 0; }
.pill.tix a:hover b { text-decoration: underline; }
.pill.tix svg { width: 13px; height: 13px; flex: none; }
.tix-sum { font-weight: 400; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.tix-st { font-size: 10px; font-weight: 600; padding: 1px 7px; background: var(--neuBg); color: var(--neuFg); white-space: nowrap; }
.tix-st.done { background: var(--passBg); color: var(--passFg); }
.tix-x { border: 0; background: none; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 0 0 2px; }
.tixbox { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px 8px; background: var(--input); border: 1px solid var(--inputLine); min-height: 38px; }
.tixbox:focus-within { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(0,185,173,.18); }
.tixbox input { flex: 1; min-width: 200px; border: 0 !important; padding: 5px 2px !important; outline: none; background: none; box-shadow: none !important; }
.tixsug { border: 1px solid var(--line); background: var(--card); margin-top: 4px; max-height: 220px; overflow-y: auto; }
.tixsug button { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--text); font: inherit; font-size: 13px; padding: 7px 10px; cursor: pointer; }
.tixsug button.on, .tixsug button:hover { background: var(--hover); }
.jtype { vertical-align: -2px; margin-right: 6px; flex: none; }
.tixstrip { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px; margin: 0 0 8px; background: var(--sel); font-size: 13px; }
.jiratable { margin-top: 14px; }
.jiratable td { vertical-align: middle; }
.jiratable .needpick { border-color: var(--sunup); }
.jiratable th:last-child, .jiratable td.acts { width: 1%; text-align: right; white-space: nowrap; }
.jiratable tr.editing td { background: var(--soft); }
.jiratable tr.editing select, .jiratable tr.editing input { width: 100%; min-width: 150px; }
.jiratable #jAdd { margin-top: 6px; }
.jiratable .stack { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.jiratable .notset { color: var(--warnFg); font-weight: 600; }
.tixbox, .tixsug, .tixstrip, .tix-st { border-radius: var(--r-ctl); }
.tix-st { border-radius: 999px; }
.jirapreview { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-ctl); color: var(--ocean); font-size: 13px; }
.jirapreview svg { flex: none; }
.jirasent { margin: -10px 0 8px; color: var(--muted); line-height: 1.6; }
.jirasent svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 3px; }
/* Run page header: buttons stay top right however tall the title side gets. */
.runhead { align-items: flex-start; flex-wrap: nowrap; }
.runhead-main { flex: 1 1 auto; min-width: 0; }
.runback { margin: 0 0 6px; }
.runhead h1 { margin-top: 2px; }
.runhead > .row { flex: none; justify-content: flex-end; }
@media (max-width: 900px) { .runhead { flex-wrap: wrap; } }
.jirasent a { color: var(--ocean); text-decoration: none; }
.nowrap { white-space: nowrap; }
.runleft { margin: -6px 0 8px; color: var(--warnFg); font-weight: 600; }
/* Ghost buttons sit on the navy run bar: keep their white text readable on hover. */
.btn.ghost:hover { background: rgba(255,255,255,.14); color: #fff; border-color: #fff; }

/* Bugs to Jira: the bug icon on a runs-list row, the "EMP-512" pill on a result, and the description preview in the Report Bug form. */
.runbug { display: inline-flex; vertical-align: -2px; margin-left: 4px; color: var(--fail); }
.bugpill svg { width: 12px; height: 12px; vertical-align: -1px; }
.bugpill { display: inline-block; padding: 1px 9px; border-radius: 999px; background: var(--failBg); color: var(--failFg); font-weight: 600; text-decoration: none; white-space: nowrap; }
.bugpreview { white-space: pre-wrap; max-height: 260px; overflow: auto; font: 12px/1.5 var(--font); color: var(--text); background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 12px; }
.waitbox .checks { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

/* Settings › Jira › Bug Fields: one row per Jira field, its kind or why it can't be picked underneath. */
.bugflist { display: grid; gap: 6px; max-height: 420px; overflow: auto; }
.bugf { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); cursor: pointer; font-weight: 400; }
.bugf > span { display: flex; flex-direction: column; gap: 2px; }
.bugf.off { cursor: default; background: var(--soft); }
.bugf input { margin-top: 3px; }
.optl { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: normal; }
/* Expanded result: what failed on the left, the bug (Report Bug or "Bug EMP-512") at the top right. */
.detailhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.detailhead-l { min-width: 0; }
.detailhead-r { flex: none; }
.detailhead-r .btn { background: var(--card); }
.bugtag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--fail); color: var(--card); font: 600 13px var(--font); text-decoration: none; white-space: nowrap; }
.bugtag:hover { filter: brightness(.95); }

/* Build Hub: a card per platform, a row per environment with its colored tag. Tags use the brand's secondary colors. */
:root { --envQaBg: #B8EBE8; --envQaFg: #00736C; --envStageBg: #FFCD73; --envStageFg: #695040; --envProdBg: #00B9AD; --envProdFg: #002556; }
:root[data-theme="dark"] { --envQaBg: rgba(184,235,232,.18); --envQaFg: #B8EBE8; --envStageBg: rgba(255,205,115,.2); --envStageFg: #FFD98C; --envProdBg: rgba(0,185,173,.28); --envProdFg: #7FE3DC; }
.hubtabs { margin: 8px 0 16px; }
.hubgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .hubgrid { grid-template-columns: minmax(0, 1fr); } }
.hubcard { display: flex; flex-direction: column; gap: 10px; }
.hubtop { display: flex; align-items: center; gap: 10px; }
.hubicon { width: 36px; height: 36px; border-radius: var(--r-ctl); background: var(--soft); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ocean); flex: none; }
.hubname { font-weight: 700; font-size: 15px; }
.hubvar { margin: 0 0 0 auto; }
.hubvar button { padding: 4px 10px; font-size: 12px; }
.hubrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-ctl); background: var(--soft); border: 1px solid var(--line); }
.hubmeta { flex: 1; min-width: 0; font-size: 13px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; overflow-wrap: anywhere; }
.hubmeta > b { white-space: nowrap; }
.hubmeta .hubbad { white-space: normal; }
.hubbad { color: var(--fail); font-size: 12px; }
.hubwait { color: var(--warnFg); font-size: 12px; }
.envtag { flex: none; width: 74px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 3px 6px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.env-qa { background: var(--envQaBg); color: var(--envQaFg); }
.env-stage { background: var(--envStageBg); color: var(--envStageFg); }
.env-prod { background: var(--envProdBg); color: var(--envProdFg); }
.env-access { background: var(--hover); color: var(--text); }
.hubaccess { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ocean); text-decoration: none; }
.hubedit { display: flex; align-items: center; gap: 10px; }
.hubedit input { flex: 1; min-width: 0; }
.hubvarhead { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.hubfield { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hubcheck { font-size: 12px; display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.hubsrc { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); margin-right: 4px; white-space: nowrap; }
.hubseg { flex-wrap: wrap; }
#cellFound { margin-top: 12px; }
.hubedit { align-items: flex-start; }
.hubedit .envtag { margin-top: 9px; }
.env-dev { background: var(--neuBg); color: var(--neuFg); }
.hubdef { display: inline-flex; align-items: center; gap: 4px; font-weight: 400; text-transform: none; letter-spacing: normal; }
/* Build Hub page: project pills. Settings › Build Hub: the platform × environment table with clickable cells. */
.hubpills { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.hubpill { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--inputLine); background: var(--card); color: var(--text); font: 600 13px var(--font); text-decoration: none; }
.hubpill.on { background: var(--hero); border-color: var(--hero); color: var(--heroText); }
.hubbar { flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.hubbar select { width: auto; min-width: 200px; }
.hubtable { width: 100%; }
.hubtable th[scope="row"] { font: 400 13px var(--font); text-transform: none; letter-spacing: normal; color: var(--text); text-align: left; white-space: nowrap; vertical-align: top; padding: 10px 8px 4px 4px; }
.hubtable th[scope="row"] .small { text-transform: none; }
.hubtable td { padding: 4px; vertical-align: top; }
.hubcell { width: 100%; min-height: 48px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--card); color: var(--text); font: 13px var(--font); cursor: pointer; }
.hubcell:hover { border-color: var(--teal); background: var(--hover); }
.hubadd { color: var(--muted); }
.hubaddr { overflow-wrap: anywhere; }
.hubdeftag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; }
/* Settings › Build Hub: links grouped by platform, one row each with the full address. */
.hublinks { width: 100%; table-layout: fixed; }
.hublinks td { vertical-align: top; padding-top: 9px; padding-bottom: 9px; }
.hublinks tr.hubgroup td { padding-top: 16px; border-bottom: 1px solid var(--inputLine); font-size: 14px; }
.hublink { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }
.hublatest { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.hublinks .envtag { display: inline-block; }
.hubfold { all: unset; cursor: pointer; display: flex; align-items: center; gap: 6px; width: 100%; flex-wrap: wrap; }
.hubfold:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.hubchev { width: 14px; color: var(--muted); }
.hubdots { margin-left: auto; display: inline-flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); font-weight: 400; }
.hubdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.hubdot.ok { background: var(--teal); } .hubdot.bad { background: var(--fail); } .hubdot.none { background: var(--inputLine); } .hubdot.wait { background: var(--warn); }
.hubst { display: inline-flex; align-items: center; gap: 5px; } .hubst .hubdot { margin: 0; }
.tipdown .tipbox { left: -120px; top: 22px; width: 240px; } .tipbox a { color: var(--teal); }
.hubmeta .hubaddr { flex-basis: 100%; }
.hubdefault { margin-top: 4px; width: 74px; text-align: center; font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: .03em; }
/* Settings › GitHub › Automation Repos */
.ghsec { display: flex; align-items: center; gap: 8px; margin: 18px 0 4px; font-size: 16px; }
.ghgrid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 10px; }
@media (max-width: 760px) { .ghgrid { grid-template-columns: minmax(0, 1fr); } }
/* Settings › GitHub: each repo folds (Primary, Secondary). The heading shows its status pills and repo name when folded. */
details.ghrepo { border-top: 1px solid var(--line); margin-top: 14px; }
details.ghrepo > summary.ghsec { list-style: none; cursor: pointer; font-weight: 700; padding: 12px 0 4px; margin: 0; flex-wrap: wrap; }
details.ghrepo > summary::-webkit-details-marker { display: none; }
details.ghrepo > summary::before { content: '\203A'; display: inline-block; width: 14px; font-size: 18px; line-height: 1; color: var(--muted); transition: transform .15s; }
details.ghrepo[open] > summary::before { transform: rotate(90deg); }
details.ghrepo[open] > summary .ghsum, details.ghrepo[open] > summary #ghSumSetup { display: none; }
details.ghrepo > summary .ghsum { font-weight: 400; margin-left: 4px; }
details.ghrepo[open] { padding-bottom: 6px; }
/* The Primary repo table lets the Repo Rules header's tooltip show over its edge (it's narrow enough not to need scrolling on wide screens). */
@media (min-width: 760px) { .tablewrap.ghwrap { overflow: visible; } }
th .tipbox { text-transform: none; letter-spacing: normal; }
/* Repo Rules bar under the Primary table: only when there's something to do (Set Up Repo, Update Rules, an open PR). */
.setupbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 10px 14px; font-size: 13px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--soft); }
.setupbar.setup { border-color: var(--teal); }
.setupbar.update { border-color: var(--reviewBg); background: var(--warnBg); color: var(--warnFg); }
.setupbar .btn { flex: none; }
@media (max-width: 640px) { .setupbar { flex-direction: column; align-items: flex-start; } }
.ghstatus { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--soft); }
.ghhook { margin-top: 12px; } .ghhook summary { cursor: pointer; font-weight: 600; } .ghhook ul { padding-left: 18px; }
/* Case page: View in GitHub next to the Execution pill; Comments folded until opened. */
.ghlink { display: inline-flex; align-items: center; gap: 5px; margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--ocean); text-decoration: none; white-space: nowrap; }
.ghlink:hover { text-decoration: underline; }
.cfold { margin-top: 12px; } /* Activity: the same box as Recent Results (details.hist) */
/* The rule between the case's details and its Recent Results / Activity. */
.casesep { border: 0; border-top: 2px solid var(--line); margin: 20px 0 0; }
.cbody a { color: var(--ocean); font-weight: 600; }
.cbody b { font-weight: 600; }
.cbody code { font: 12px Menlo, ui-monospace, monospace; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
.cfold .cnew { margin: 0 0 12px; }

/* "Likely in the app" under a failed result (QA and Admins). */
.apphint { margin: 10px 0 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
.apphint code { font-size: 12px; }
/* App Code Repos editing: one repo per line with a remove button. */
.aclist { display: grid; gap: 4px; }
.acrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--soft); }
.acline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 0; }
.hintfiles { margin: 4px 0 4px; padding-left: 18px; }
.hintfiles li { margin: 2px 0; }

/* Failure details (run page): a short view for everyone, then Show More for the engineers' detail. */
.fb .fb-why { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.fb .fb-step { font-size: 13px; color: var(--muted); }
.fb .fb-step b { color: var(--text); }
.fb-cause { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; font-size: 13px; }
.fb-lb { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.st.fb-app { background: var(--reviewBg); color: var(--reviewFg); }
.st.fb-test { background: var(--chipBg); color: var(--chipFg); }
.st.fb-unsure { background: var(--neuBg); color: var(--neuFg); }
.fb-more { margin-top: 10px; padding: 0; font-size: 13px; }
.fb-detail { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.fb-dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px 14px; align-items: start; }
.fb-dl > .fb-lb { padding-top: 2px; }
.fb-steps { margin: 0; padding-left: 0; list-style: none; font-size: 13px; line-height: 1.7; }
.fb-steps .ok { color: var(--passFg); } .fb-steps .bad { color: var(--failFg); font-weight: 700; } .fb-steps .skip { color: var(--muted); }
.fb-dl .apphint { margin: 0; padding: 0; border: 0; }
@media (max-width: 640px) { .fb-dl { grid-template-columns: 1fr; gap: 4px; } .fb-dl > .fb-lb { margin-top: 8px; } }
.fb-thumbs { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.fb-thumb { height: 56px; width: auto; border: 1px solid var(--line); border-radius: 6px; cursor: zoom-in; background: var(--card); }
.fb-vid { display: inline-flex; align-items: center; height: 56px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); font: inherit; font-size: 12px; color: var(--text); cursor: pointer; }
.fb-detail > details { margin-top: 12px; }

/* New from Jira */
.splitbtn { display: inline-flex; }
.splitbtn #newCase:not(:only-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.splitbtn .splitarrow { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 1px solid var(--onAccent); padding-left: 8px; padding-right: 8px; }
.menuitem { display: flex; gap: 10px; align-items: flex-start; }
.menuitem > svg { margin-top: 2px; flex: none; }
.tkicon { display: inline-flex; vertical-align: -3px; margin-right: 5px; color: var(--ocean); }
.tkicon svg { width: 15px; height: 15px; }
.njbox { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 12px; margin: 8px 0; background: var(--hover); }
.njrow { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 12px; margin-bottom: 8px; }
.njrow .njtitle { font-weight: 600; }
.njplats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0; }
.chipcheck { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.njsteps summary { cursor: pointer; color: var(--ocean); margin-top: 4px; }
.njsteps textarea { margin-top: 6px; font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; }
.jirabar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: var(--r-ctl); background: var(--sel); color: var(--text); font-size: 13px; margin: 10px 0 6px; }
.jirabar > span { flex: 1; min-width: 200px; }
.jirabar > svg { color: var(--ocean); flex: none; }
.jirabar.changed { background: var(--warnBg); color: var(--warnFg); }
.jirabar.changed > svg { color: var(--warnFg); }
.cmpgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin: 10px 0; }
.cmpcode { font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; line-height: 1.6; background: var(--hover); border-radius: var(--r-ctl); padding: 8px 10px; white-space: pre-wrap; word-break: break-word; }
.cmpcode .diffdel { background: var(--failBg); color: var(--failFg); text-decoration: line-through; }
.cmpcode .diffadd { background: var(--passBg); color: var(--passFg); }
@media (max-width: 640px) { .cmpgrid { grid-template-columns: 1fr; } }

/* Test Manager Feedback: the floating button (bottom right), the thin tab that brings it back, and the "Added for you" box */
.rbug { position: fixed; right: 18px; bottom: 18px; z-index: 40; display: flex; align-items: center; }
.rbug-main { display: inline-flex; align-items: center; gap: 0; height: 40px; min-width: 40px; padding: 0 11px; border: 0; border-radius: 999px; background: var(--navy, #002556); color: #fff; opacity: .72; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 37, 86, .22); transition: opacity .15s, gap .15s; font: 600 13px var(--font); }
.rbug-main svg { width: 18px; height: 18px; flex: none; }
.rbug-label { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .2s; }
.rbug-x { display: none; margin-left: 6px; width: 22px; height: 22px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; }
.rbug:hover .rbug-main, .rbug:focus-within .rbug-main { opacity: 1; gap: 8px; }
.rbug:hover .rbug-label, .rbug:focus-within .rbug-label { max-width: 140px; }
.rbug:hover .rbug-x, .rbug:focus-within .rbug-x { display: inline-block; }
.rbug.hidden { right: 0; bottom: 70px; }
.rbug-tab { width: 14px; height: 44px; border: 0; border-radius: 8px 0 0 8px; background: var(--navy, #002556); color: #fff; opacity: .55; cursor: pointer; padding: 0; font-size: 13px; }
/* Help (0.9): the ? bubble, its Need Help? panel, ? tips and the Help page */
.rbug-main.helpq { width: 48px; height: 48px; padding: 0; justify-content: center; font: 700 22px var(--font); opacity: .85; }
.rbug:hover .rbug-main.helpq, .rbug:focus-within .rbug-main.helpq { gap: 0; }
#helpBubble { z-index: 55; } /* above popups (z 50), so help works while editing a case */
#helpBubble .rbug-x { position: absolute; top: -9px; right: -9px; margin: 0; } /* on the corner, so the ? never moves under the pointer */
.helppanel { position: fixed; right: 18px; bottom: 78px; z-index: 56; width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 110px); overflow: auto; box-sizing: border-box; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 18px 44px rgba(0, 37, 86, .25); padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.hp-head { display: flex; justify-content: space-between; align-items: center; padding-left: 4px; }
.hp-head b { font-size: 16px; }
.helppanel input[type=search] { width: 100%; box-sizing: border-box; }
.hp-lbl { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ocean); padding: 2px 10px 4px; }
.hrow { display: flex; width: 100%; box-sizing: border-box; padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--text); font: inherit; font-size: 14px; text-align: left; background: none; border: 0; cursor: pointer; }
.hrow:hover, .hrow:focus-visible { background: var(--hover); }
.hp-all { font-weight: 600; color: var(--ocean); }
.hp-none { margin: 4px 10px; }
.hp-fb { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.hp-fb > span { padding: 0 10px; }
.hp-send { font-weight: 600; }
.qtip { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-left: 4px; padding: 0; border-radius: 999px; border: 1.5px solid var(--ocean); background: var(--card); color: var(--ocean); font: 700 11px var(--font); line-height: 1; cursor: pointer; vertical-align: 1px; }
.qtip:hover, .qtip.open { background: var(--ocean); color: var(--card); }
.qpop { position: fixed; z-index: 1000; box-sizing: border-box; background: var(--hero); color: var(--heroText); border-radius: var(--r-card); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 12px 30px rgba(0, 37, 86, .25); font-size: 13px; line-height: 1.5; }
.qpop b { font-size: 14px; }
.qpop a { color: var(--sky); font-weight: 600; }
.hk { background: var(--neuBg); color: var(--neuFg); border-radius: 6px; padding: 1px 6px; font-weight: 600; white-space: nowrap; }
.helphome, .helpguide { max-width: 1120px; }
.hh-head h1 { margin: 0; }
.hh-head .kicker { margin: 2px 0 14px; }
.hh-search { width: 100%; max-width: 720px; box-sizing: border-box; font-size: 16px; padding: 13px 16px; border-radius: 12px; margin-bottom: 20px; }
.hh-body { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin-bottom: 14px; }
.hh-idx { flex: 0 1 200px; display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: var(--r-card); position: sticky; top: 16px; }
.hh-idx a { display: block; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: 14px; }
.hh-idx a:hover { background: var(--hover); }
.hh-lbl { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ocean); padding: 4px 10px 6px; }
.hh-groups { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.hh-group { border-radius: var(--r-card); padding: 12px 10px; display: flex; flex-direction: column; scroll-margin-top: 16px; }
.hh-group h2 { margin: 0; padding: 4px 12px 6px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ocean); }
.hh-g { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--text); }
.hh-g:hover { background: var(--hover); }
.hh-t { font-size: 15px; font-weight: 600; }
.hh-b { font-size: 13px; color: var(--muted); }
.hh-auto { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ocean); border: 1px solid var(--teal); border-radius: 999px; padding: 1px 7px; margin-left: 8px; vertical-align: 2px; }
.helpguide { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.hg-main { flex: 3 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.hg-main h1 { margin: 0; }
.hg-intro { margin: 0; font-size: 15px; line-height: 1.6; max-width: 680px; }
.hg-main .card { border-radius: var(--r-card); padding: 20px 22px; }
.hg-main h2 { margin: 0 0 10px; font-size: 16px; }
.hg-steps ol { list-style: none; counter-reset: hs; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hg-steps li { counter-increment: hs; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; line-height: 1.55; }
.hg-steps li::before { content: counter(hs); width: 28px; height: 28px; border-radius: 999px; background: var(--teal); color: var(--onAccent); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.hg-more p { margin: 0; line-height: 1.6; }
.hg-why { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.hg-shot { display: block; width: fit-content; margin-top: 10px; max-width: min(640px, 100%); }
.hg-shot img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-ctl); box-shadow: 0 4px 14px rgba(0, 37, 86, .08); }
.hg-more .hg-shot { margin-top: 12px; }
.hg-more ul { margin: 0; padding-left: 20px; line-height: 1.9; }
.helpguide code, .helppanel code, .qpop code { background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; }
.hg-ex { margin: 0; white-space: pre-wrap; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 12px 14px; font-size: 13px; line-height: 1.7; }
.hg-tips { background: var(--sel); border-radius: var(--r-card); padding: 16px 22px; }
.hg-tips h2 { font-size: 15px; margin: 0 0 6px; }
.hg-tips ul { margin: 0; padding-left: 20px; line-height: 1.6; font-size: 14px; }
.hg-rel { flex: 1 1 220px; border-radius: var(--r-card); display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; }
.hg-rel h2 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ocean); }
@media (max-width: 640px) { .hh-idx { display: none; } .helppanel { right: 16px; left: 16px; width: auto; } }
.rbug-tab:hover, .rbug-tab:focus { opacity: 1; width: 18px; }
:root[data-theme="dark"] .rbug-main, :root[data-theme="dark"] .rbug-tab { background: var(--teal, #00B9AD); color: var(--onAccent, #002556); }
@media print { .rbug { display: none; } }
.rbadded { margin-top: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl, 10px); background: var(--soft); }
.rbadded-h { font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; }
.rbadded dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: 12px; }
.rbadded dt { color: var(--muted); }
.rbadded dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }

/* Dashboard: Bugs Logged tile (clickable, one small button per environment) */
.kpiclick { cursor: pointer; } .kpiclick:hover, .kpiclick:focus-visible { border-color: var(--teal); }
.kpienvs { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.kpienv { font: inherit; background: none; border: 0; padding: 0; color: var(--text); cursor: pointer; }
.kpienv:hover b { text-decoration: underline; }
.kpienv.prod { color: #b86e0a; } :root[data-theme="dark"] .kpienv.prod { color: var(--sunup); }
.kpienv.muted { color: var(--muted); }

/* A required choice left empty (New Test Run's Environment) */
.seg.bad { outline: 2px solid var(--fail); outline-offset: 2px; }

/* New Test Run › Enter build #: one box per app / TV platform */
.bnumrow { margin: 0 0 6px; gap: 10px; } .bnumrow label { width: 170px; flex: none; } .bnumrow input { flex: 1; }

/* Run page: Bugs Filed list */
.bugsfiled { position: relative; }
.bugsbtn { display: inline-flex; align-items: center; gap: 6px; }
.bugsbtn svg { width: 14px; height: 14px; }
.bugspop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: min(380px, 86vw); padding: 12px 14px; box-shadow: 0 10px 30px rgba(0, 37, 86, .18); }
.bugslist { display: grid; gap: 10px; font-size: 13px; max-height: 320px; overflow-y: auto; }

/* Dashboard: metric tiles (same height; details under a thin line at the bottom) and two cards per row */
.dkpis .kpi { display: flex; flex-direction: column; min-height: 150px; padding: 18px 20px 16px; }
.dkpis .kpi .l { font-size: 11px; letter-spacing: .08em; line-height: 1.35; min-height: 30px; }
.dkpis .kpi .n { font-size: 36px; line-height: 1; margin: 8px 0 14px; }
.kfoot { margin-top: auto; padding-top: 12px; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); font-size: 12px; line-height: 1.5; }
.kchips { display: flex; flex-wrap: wrap; gap: 6px; }
.kchip { display: inline-flex; gap: 5px; align-items: baseline; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, currentColor 12%, transparent); white-space: nowrap; }
.kchip b { font-weight: 700; }
.kbar { height: 6px; border-radius: 999px; background: color-mix(in srgb, currentColor 22%, transparent); overflow: hidden; margin-bottom: 6px; }
.kbar i { display: block; height: 100%; background: currentColor; border-radius: 999px; }
.dkpis .kpienvs { gap: 6px; }
.dkpis .kpienv { padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, currentColor 8%, transparent); }
.dgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 12px; align-items: start; }
.dgrid > .card { min-width: 0; }
.dgrid > .card h2 { display: flex; align-items: center; gap: 6px; }
@media (max-width: 1100px) { .dgrid { grid-template-columns: minmax(0, 1fr); } }
.dhelp b { font-size: 10px; }

/* ---- Responsive layout ---- */
.mbtn { align-items: center; justify-content: center; width: 38px; height: 38px; flex: none; border-radius: var(--r-ctl); border: 1px solid var(--sideLine); background: transparent; color: var(--sideText); cursor: pointer; }
.mbtn svg { width: 20px; height: 20px; }
.mfolder, .mfilters { display: none; }
.cplat-names { display: none; }

/* Icon-only menu (900–1279) */
@media (min-width: 900px) and (max-width: 1279px) {
  body:not(.menu-open) .side { flex: 0 0 76px; padding: 14px 10px; align-items: center; overflow: visible; }
  body:not(.menu-open) .mbtn { display: inline-flex; margin-bottom: 8px; }
  body:not(.menu-open) .brand { padding: 0 0 12px; }
  body:not(.menu-open) .sidelbl, body:not(.menu-open) #nav a span, body:not(.menu-open) #sidefoot, body:not(.menu-open) .wname, body:not(.menu-open) #who .btn { display: none; }
  body:not(.menu-open) #projectPicker { width: 48px; height: 40px; padding: 0; margin: 0 0 14px; justify-content: center; }
  body:not(.menu-open) #projectPicker > span, body:not(.menu-open) #projectPicker .vchev { display: none; }
  body:not(.menu-open) #projectPicker { position: relative; }
  body:not(.menu-open) #projectPicker .ppicon { display: block; }
  body:not(.menu-open) #projectPicker:hover::after, body:not(.menu-open) #projectPicker:focus-visible::after { content: attr(data-label); position: absolute; left: 56px; top: 50%; transform: translateY(-50%); background: var(--side); color: var(--sideText); border: 1px solid var(--sideLine); padding: 6px 10px; border-radius: var(--r-ctl); font-size: 13px; font-weight: 600; white-space: nowrap; z-index: 20; }
  body:not(.menu-open) #nav a { justify-content: center; padding: 11px; position: relative; }
  body:not(.menu-open) #nav a:hover::after, body:not(.menu-open) #nav a:focus-visible::after { content: attr(data-label); position: absolute; left: 54px; top: 50%; transform: translateY(-50%); background: var(--side); color: var(--sideText); border: 1px solid var(--sideLine); padding: 6px 10px; border-radius: var(--r-ctl); font-size: 13px; font-weight: 600; white-space: nowrap; z-index: 20; }
  body:not(.menu-open) #who { border-top: 0; padding: 8px 0 0; justify-content: center; cursor: pointer; }
  body.menu-open .mainwrap { margin-left: 76px; }
}

/* Slim top bar (under 900) */
@media (max-width: 899px) {
  body { display: block; }
  body:not(.menu-open) .side { position: fixed; inset: 0 0 auto 0; height: 56px; flex-direction: row; align-items: center; gap: 10px; padding: 0 14px; overflow: visible; }
  body:not(.menu-open) .mbtn { display: inline-flex; }
  body:not(.menu-open) .brand { padding: 0; }
  body:not(.menu-open) .brandlogo { width: 120px; }
  body:not(.menu-open) .sidelbl, body:not(.menu-open) .spacer, body:not(.menu-open) #nav, body:not(.menu-open) #sidefoot, body:not(.menu-open) .wname, body:not(.menu-open) #who .btn { display: none; }
  body:not(.menu-open) #projectPicker { margin: 0 0 0 auto; max-width: 200px; padding: 8px 10px; }
  body:not(.menu-open) #who { border: 0; padding: 0; cursor: pointer; }
  .mainwrap { padding-top: 56px; }
  body.signedout .mainwrap { padding-top: 0; }
  main { padding: 20px 18px 60px; }
}
@media (max-width: 639px) {
  body:not(.menu-open) .brandlogo { width: 104px; }
  body:not(.menu-open) #projectPicker { max-width: 150px; font-size: 12px; }
  main { padding: 16px 14px 80px; }
}

/* The full menu over the page (under 1280, when opened) */
@media (max-width: 1279px) {
  body.menu-open .side { position: fixed; top: 0; left: 0; bottom: 0; height: auto; width: 264px; z-index: 40; box-shadow: 0 10px 40px rgba(0, 20, 50, .35); }
  body.menu-open .mbtn { display: inline-flex; align-self: flex-end; margin-bottom: -30px; }
  body.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 20, 50, .45); z-index: 35; }
}

/* Test Cases on tablets and phones: cases as cards (phones: a compact list) */
@media (max-width: 899px) {
  .tc-page.cases-layout { --fw: 220px !important; }
  .tc-page .ctable { border: 0; background: transparent; overflow: visible; }
  .tc-page .ctable table, .tc-page .ctable tbody { display: block; }
  .tc-page .ctable thead, .tc-page .ctable tr:first-child:has(th) { display: none; }
  .tc-page .ctable tr.ghead { display: block; padding: 12px 2px 4px; }
  .tc-page .ctable tr.ghead td { display: block; border: 0; padding: 0; background: transparent; font-size: 12px; }
  .tc-page .ctable tr.crow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 10px; box-sizing: border-box; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px 14px; margin-bottom: 8px; }
  .tc-page .ctable tr.crow td { border: 0; padding: 0; display: block; min-width: 0; }
  .tc-page .ctable tr.crow td.cbox { display: none; }
  .tc-page .ctable tr.crow td.cid { grid-row: 1; grid-column: 1; font-weight: 700; }
  .tc-page .ctable tr.crow td.ctitle { grid-row: 1; grid-column: 2 / 4; }
  .tc-page .ctable tr.crow td.cplat { grid-row: 2; grid-column: 1 / 4; display: flex; flex-wrap: wrap; gap: 4px; white-space: normal; }
  .tc-page .ctable tr.crow td.cauto { grid-row: 3; grid-column: 3; justify-self: end; }
  .tc-page .ctable tr.crow td.cpri { grid-row: 3; grid-column: 1 / 3; align-self: center; font-size: 12px; }
}
@media (max-width: 639px) {
  .tc-page.cases-layout { display: block !important; }
  .tc-page.cases-layout > .fpanel { display: none !important; }
  .mfolder { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; box-sizing: border-box; margin-bottom: 10px; padding: 9px 12px; border: 1px solid var(--inputLine); border-radius: var(--r-ctl); background: var(--card); font: inherit; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; }
  .mfolder span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tc-page .fhead .ficon.big, #fmeta, .tc-page .fhead h2, #listActions, #folderActions { display: none; }
  .tc-page .fhead .row { margin-left: 0 !important; width: 100%; }
  .tc-page .fhead .splitbtn { flex: 1; } .fhead .splitbtn #newCase { flex: 1; justify-content: center; }
  .tc-page .fbar { flex-wrap: wrap; gap: 8px; }
  .tc-page .fbar > .fsearch { flex: 1 1 0; min-width: 0; }
  .tc-page .fbar:not(.open) > *:not(.fsearch):not(.mfilters) { display: none !important; }
  .tc-page .fbar.open > *:not(.fsearch):not(.mfilters) { flex: 1 1 100%; }
  .mfilters { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; min-height: 38px; border: 1px solid var(--inputLine); border-radius: var(--r-ctl); background: var(--card); font: inherit; font-size: 13px; color: var(--text); white-space: nowrap; cursor: pointer; }
  .tc-page .ctable { background: var(--card); border: 1px solid var(--line) !important; border-radius: var(--r-card); overflow: hidden; }
  .tc-page .ctable tr.ghead { padding: 8px 14px 6px; background: var(--bg); border-top: 1px solid var(--line); }
  .tc-page .ctable tr.ghead:first-child { border-top: 0; }
  .tc-page .ctable tr.ghead td { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
  .tc-page .ctable tr.ghead .chev, .tc-page .ctable tr.ghead .ficon { display: none; }
  .tc-page .ctable tr.crow { grid-template-columns: 44px auto minmax(0, 1fr) auto; gap: 4px 8px; border: 0; border-top: 1px solid var(--line); border-radius: 0; margin: 0; padding: 11px 14px; background: transparent; }
  .tc-page .ctable tr.ghead + tr.crow { border-top: 0; }
  .tc-page .ctable tr.crow td.cid { font-size: 12px; padding-top: 2px; }
  .tc-page .ctable tr.crow td.ctitle { grid-row: 1; grid-column: 2 / 5; font-size: 14px; font-weight: 600; line-height: 1.35; }
  .tc-page .ctable tr.crow td.ctitle .ctags { display: none; }
  .tc-page .ctable tr.crow td.cpri { grid-row: 2; grid-column: 2; color: var(--muted); white-space: nowrap; }
  .tc-page .ctable tr.crow td.cplat { grid-row: 3; grid-column: 2 / 5; display: block; font-size: 12px; color: var(--muted); }
  .tc-page .ctable tr.crow td.cplat .chip { display: none; }
  .tc-page .ctable tr.crow td.cplat .cplat-names { display: inline; }
  .tc-page .ctable tr.crow td.cauto { grid-row: 2; grid-column: 4; justify-self: end; }
  .tc-page .ctable tr.crow td.cauto .st { font-size: 10px; padding: 2px 8px; }
}
.dkpis + h2.sec, .dgrid + h2.sec { margin-top: 28px; }

/* Icon-only menu: the logo shows its magnifier-and-checkmark (from the same image), the menu button sits above it */
@media (min-width: 900px) and (max-width: 1279px) {
  body:not(.menu-open) .brand { padding: 0; margin-bottom: 12px; }
  body:not(.menu-open) .brand .brandlogo { display: none !important; }
  body:not(.menu-open) .brand .brandicon.onDark { display: block; }
  :root[data-theme="light"] body:not(.menu-open) .brand .brandicon.onDark { display: none; }
  :root[data-theme="light"] body:not(.menu-open) .brand .brandicon.onLight { display: block; }
}
/* The open menu's ☰ sits above the logo so it can be clicked to close the menu */
body.menu-open .mbtn { position: relative; z-index: 2; }
/* Dashboard cards are all the same size; longer content scrolls inside its card */
.dgrid > .card { height: 400px; display: flex; flex-direction: column; overflow: hidden; }
.dgrid > .card > :not(h2):not(.row) { min-height: 0; }
.dgrid > .card > :last-child { flex: 1; overflow: auto; }
@media (max-width: 1100px) { .dgrid > .card { height: auto; min-height: 0; } .dgrid > .card > :last-child { overflow: visible; } }

/* Dashboard: list cards (Most Failing Cases, Latest Test Runs) share one row layout */
#dashFailing table, #dashRuns table { width: 100%; }
#dashFailing td:first-child, #dashRuns td:first-child { white-space: nowrap; width: 64px; }

/* Run page: room between the run details (Ran By, Bugs Filed…) and the results bar */
.rundetails { gap: 18px 28px; align-items: flex-start; }
.runbar-sum { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }

/* Project picker icon: only on the icon-only menu */
.ppicon { display: none; width: 20px; height: 20px; flex: none; }

/* Users & Roles: archived projects keep their names, in gray */
.chip.projarch { background: var(--soft); color: var(--muted); border: 1px dashed var(--line); }
.projarch-l { color: var(--muted); }
.projarch-row td { color: var(--muted); }
.projarch-head td { padding-top: 18px; border-bottom: 1px solid var(--inputLine); }

/* My Computer › My Test Devices table (version0.8) and the runner version line */
.devtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.devtable th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.devtable td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.devtable td.acts { text-align: right; white-space: nowrap; }
.devtable .ds-fix { margin: 4px 0 0; }
.okline { color: var(--passFg); }
.devsum { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); margin-bottom: 10px; }
/* Settings › GitHub cards that fold (App Code Repos, Automation Features Visibility) */
details.cardfold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
details.cardfold > summary::-webkit-details-marker { display: none; }
details.cardfold > summary::before { content: '\203A'; display: inline-block; width: 14px; font-size: 20px; line-height: 1; color: var(--muted); transition: transform .15s; }
details.cardfold[open] > summary::before { transform: rotate(90deg); }
details.cardfold > summary h2 { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
details.cardfold[open] > summary .foldsum { display: none; }
details.cardfold[open] > summary { margin-bottom: 8px; }
.plattable .grouprow td { background: var(--hover); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 6px 8px; }

/* Record a Web Test (0.9): site and layout choices, the Recorded pill and what the recording found */
.recopts { display: flex; flex-wrap: wrap; gap: 8px; }
.recopt { flex: 1 1 150px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--inputLine); border-radius: var(--r-ctl); padding: 10px 12px; background: var(--card); cursor: pointer; font-size: 14px; }
.recopt > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.recopt:has(input:checked) { border-color: var(--teal, #00B9AD); background: var(--sel); }
.recopt.off { opacity: .55; cursor: not-allowed; }
.recopt input { margin-top: 3px; }
.pill.recpill { background: var(--sel); color: var(--ocean); text-transform: none; font-size: 12px; vertical-align: middle; }
.recfound { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 14px; margin-top: 12px; }
.recfound summary { cursor: pointer; }
.recfound ul { margin: 8px 0 0; padding-left: 20px; font-size: 13px; line-height: 1.8; }
.recfound code { font: 12px Menlo, monospace; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }
