/* RxTech PSA. The six RxTech colors, same as the website; borders are a blend of Muted.
   Accent (royal blue, the Rx color since 2026-10-05) is only used for large things (buttons, logo,
   checkboxes, underlines), never small text: it's 3.8:1 on black, too low for small text. */

:root {
  --background: #0b0b0b; --surface: #171717; --text: #ededed; --muted: #a3a3a3; --accent: #2563eb; --on-accent: #ffffff;
  --danger: #f85149; /* the Settings Danger zone only (Kristine, 2026-10-09) */
  --line: color-mix(in srgb, var(--muted) 28%, var(--background));
  color-scheme: dark;
}
@font-face { font-family: 'Bruno Ace'; src: url(fonts/BrunoAce-Regular.woff2) format('woff2'); font-display: swap; }
/* Headings: numbers (and #) in Bruno Ace, words in Poppins (Kristine, 2026-10-11). */
@font-face { font-family: 'Bruno Ace Numbers'; src: url(fonts/BrunoAce-Regular.woff2) format('woff2'); font-display: swap; unicode-range: U+0023, U+0030-0039; }
/* Poppins: the words in headings (see h1). */
@font-face { font-family: 'Poppins'; src: url(fonts/Poppins-Regular.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url(fonts/Poppins-Medium.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url(fonts/Poppins-SemiBold.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Poppins'; src: url(fonts/Poppins-Bold.woff2) format('woff2'); font-weight: 700 800; font-display: swap; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); font-family: system-ui, -apple-system, 'Segoe UI', Ubuntu, sans-serif; line-height: 1.45; min-height: 100vh; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
button { font: inherit; cursor: pointer; color: inherit; }
button:disabled, input:disabled { opacity: .55; cursor: not-allowed; }
.primary { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); border: 0; border-radius: 10px; padding: 0 20px; font-weight: 600; min-height: 46px; text-decoration: none; }
.link { background: none; border: 0; padding: 4px 2px; color: var(--muted); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.link:hover { color: var(--text); }
.note { background: var(--surface); border: 2px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; }
.note[hidden] { display: none; }

/* Top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand .logo { height: 26px; width: auto; }
.brand span { font-family: 'Bruno Ace', sans-serif; color: var(--muted); font-size: .95rem; padding-top: 6px; }
.me { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--muted); font-size: .92rem; min-width: 0; }
.me button { white-space: nowrap; }
.me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who { color: var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who:hover, .me .who:focus-visible { color: var(--text); text-decoration: underline; }

main { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; }
header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
h1 { margin: 0; font-family: 'Bruno Ace Numbers', 'Poppins', sans-serif; font-weight: 600; font-size: clamp(1.9rem, 7vw, 2.6rem); line-height: 1.1; }
#left { color: var(--muted); text-align: right; white-space: nowrap; }
#left b { color: var(--text); font-size: 1.5rem; margin-right: 5px; }

/* Inputs */
input[type=text], input[type=search], input[type=date], select, textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: 0 12px; min-height: 46px; max-width: 100%;
}
input[type=text], input[type=search] { padding: 12px 14px; font-size: 1.02rem; }
textarea { padding: 10px 12px; width: 100%; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 0; border-color: var(--text); }

.add { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.add #new { flex: 1 1 100%; min-width: 0; }
.add > * { flex: 0 1 auto; }
.add #ticketNew { max-width: 260px; }

.who { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 2px solid var(--line); border-radius: 999px; padding: 3px 12px 3px 3px; color: var(--muted); font-size: .92rem; max-width: 100%; min-width: 0; }
.who .av { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-content: center; background: var(--text); color: var(--background); font-size: .72rem; font-weight: 700; }
.who .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px dashed var(--line); flex: none; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who.set { color: var(--text); }
.add .who { min-height: 46px; padding-right: 16px; }

.projects { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; }
.projects button { flex: none; background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: 6px 14px; font-weight: 600; color: var(--muted); }
.projects button[aria-pressed=true] { background: var(--text); border-color: var(--text); color: var(--background); }
.projects .newp { border-style: dashed; }

.filters { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.filters button { background: transparent; color: var(--muted); border: 2px solid transparent; border-radius: 999px; padding: 6px 14px; font-weight: 600; }
.filters button[aria-pressed=true] { color: var(--text); border-color: var(--text); }

/* The list */
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; overflow: hidden; }
.list > li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .body { flex: 1 1 14rem; min-width: 0; }
.list input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border: 2px solid var(--muted); border-radius: 7px; display: grid; place-content: center; cursor: pointer; }
.list input:checked { background: var(--accent); border-color: var(--accent); }
.list input:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--on-accent); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.t { background: none; border: 0; padding: 0; text-align: left; font-size: 1rem; color: var(--text); overflow-wrap: anywhere; position: relative; }
.t:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
li.done .t { color: var(--muted); text-decoration: line-through; }
.meta { font-size: .85rem; color: var(--muted); margin-top: 2px; }
a.ext { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
a.ext:hover { text-decoration-thickness: 2px; }
.hint { color: var(--muted); font-size: .8rem; }
input[type=url] { font: inherit; color: var(--text); background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 46px; width: 100%; margin-top: 4px; }
input[type=url]:focus-visible { outline: 0; border-color: var(--text); }
details.notes { font-size: .88rem; color: var(--muted); margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
details.notes summary { cursor: pointer; width: max-content; }
li.done details.notes { display: none; }
button.tog { background: none; border: 0; padding: 4px 0; margin-top: 2px; color: var(--muted); font-size: .88rem; font-weight: 600; }
button.tog:hover { color: var(--text); }
.side { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; max-width: 100%; }
select.pm { min-height: 34px; padding: 0 8px; border-radius: 999px; font-size: .88rem; color: var(--muted); max-width: 11rem; }
input.dd { min-height: 34px; padding: 0 8px; border-radius: 999px; font-size: .88rem; }
input.dd.none { color: var(--muted); border-style: dashed; }
input.dd.late { border-color: var(--accent); font-weight: 700; }
input.dd.dt { min-height: 34px; padding: 0 8px; border-radius: 999px; font-size: .88rem; width: 8.75rem; }
.list .who { min-height: 34px; }
.del { background: none; border: 0; color: var(--muted); font-size: 1.4rem; line-height: 1; padding: 4px 8px; border-radius: 8px; }
.del:hover { color: var(--text); background: var(--background); }
.empty { padding: 26px 16px; color: var(--muted); text-align: center; display: block; width: 100%; }
@media (max-width: 560px) {
  .list .body { flex-basis: calc(100% - 48px); }
  .side { flex: 1 1 100%; margin-left: 36px; justify-content: flex-start; }
  .side .del { margin-left: auto; }
}

/* Comments: outline bubble when empty, filled with a count when there are comments */
.cbtn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 2px solid transparent; border-radius: 999px; padding: 4px 8px; color: var(--muted); min-height: 34px; font-size: .88rem; font-weight: 700; }
.cbtn svg { width: 20px; height: 20px; }
.cbtn:hover { color: var(--text); }
.cbtn.has { color: var(--text); }
.cbtn.open { border-color: var(--line); background: var(--background); }
.thread { flex: 1 1 100%; margin-left: 36px; padding: 10px 12px; background: var(--background); border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.cmts { list-style: none; margin: 0 0 10px; padding: 0; }
.cmts > li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.cmts > li:last-child { border-bottom: 0; }
.chead { font-size: .85rem; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.ctext { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.cdel { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: .8rem; text-decoration: underline; text-underline-offset: 3px; padding: 0 2px; }
.cdel:hover { color: var(--text); }
.cform { display: flex; gap: 8px; align-items: flex-end; }
.cform textarea { flex: 1; min-height: 46px; }
.primary.small { min-height: 40px; padding: 0 14px; }
@media (max-width: 560px) { .thread { margin-left: 0; } .cform { flex-direction: column; align-items: stretch; } }

footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; min-height: 30px; }

/* Dialogs */
dialog { background: var(--surface); color: var(--text); border: 2px solid var(--line); border-radius: 14px; padding: 18px; width: min(92vw, 420px); }
dialog .plan h3 { margin: 12px 0 4px; font-size: .95rem; color: var(--text); }
dialog .plan ul { margin: 0; padding-left: 18px; max-height: min(55vh, 400px); overflow-y: auto; }
dialog .plan ul + div { margin-top: 6px; }
dialog .plan p { margin: 12px 0 0; }
dialog::backdrop { background: rgb(0 0 0 / .6); }
dialog h2 { margin: 0 0 12px; font-size: 1.15rem; }
dialog input[type=text], dialog input[type=search] { width: 100%; }
dialog label { display: block; color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
dialog label > input, dialog label > textarea, dialog label > select { margin-top: 4px; color: var(--text); }
dialog label[hidden] { display: none; }
#tTicket { width: 100%; }
.inline { display: flex; gap: 8px; margin-top: 4px; }
.inline button { background: var(--background); border: 2px solid var(--line); border-radius: 10px; padding: 0 16px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; }
#res { list-style: none; margin: 10px 0; padding: 0; max-height: 260px; overflow: auto; }
#res button { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; border-radius: 10px; padding: 8px; text-align: left; }
#res button:hover { background: var(--background); }
#res .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-content: center; background: var(--text); color: var(--background); font-size: .75rem; font-weight: 700; flex: none; }
#res small { color: var(--muted); }

/* Sign-in page */
.signin { display: grid; place-items: center; padding: 24px 16px; }
.signin-box { width: min(100%, 420px); text-align: center; }
.signin-box .logo { width: 100%; max-width: 300px; height: auto; margin-bottom: 18px; }
.signin-box h1 { margin-bottom: 24px; }
.dev { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 12px; }
.dev button { background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: 8px 14px; margin: 4px; }

/* Section links in the top bar */
.bar { flex-wrap: wrap; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; flex: 1 1 auto; min-width: 0; order: 0; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-weight: 600; white-space: nowrap; }
.nav a:hover { color: var(--text); }
.nav a[aria-current=page] { color: var(--text); background: var(--surface); box-shadow: inset 0 -2px 0 var(--accent); }
/* Menu groups: a button opens its pages below it (widget.js); the group of the page you're on is marked */
.navg { position: relative; }
.navgb { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; padding: 6px 10px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.navgb::after { content: ''; display: inline-block; margin-left: 6px; vertical-align: 2px; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; }
.navgb:hover, .navg.open .navgb { color: var(--text); }
.navg:has(a[aria-current=page]) .navgb { color: var(--text); background: var(--surface); box-shadow: inset 0 -2px 0 var(--accent); }
.navg:not(:has(.navm a:not([hidden]))) { display: none; } /* every page in it switched off (Settings → Features) */
.navm { display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 60; min-width: 180px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .45); }
.navm.flip { left: auto; right: 0; }
.navg.open .navm { display: flex; flex-direction: column; gap: 2px; }
.navm a { display: block; }
.navm a:hover, .navm a:focus-visible { background: var(--background); color: var(--text); outline: none; }
.navm a[aria-current=page] { box-shadow: inset 2px 0 0 var(--accent); background: var(--background); }
@media (max-width: 760px) { .nav { order: 3; flex-basis: 100%; } }

/* PSA pages (tickets, clients, assets, invoices) */
:where(#view) a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
main.wide { max-width: 1440px; padding-left: 24px; padding-right: 24px; } /* the PSA pages use most of a wide screen */
.narrow { max-width: 640px; }
/* Settings: cards side by side on wide screens, one column on phones; the Danger zone spans the full width */
.setgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 18px; align-items: start; margin-top: 18px; }
.setgrid > .card { margin: 0; min-width: 0; }
.setgrid > .dz { grid-column: 1 / -1; }
.setgrid > .dz .dzh, .setgrid .tosh { margin-top: 0; }
@media (min-width: 900px) { .setgrid > .setwide { grid-column: span 2; } } /* the Numbering table needs the room */
.vhead { margin-bottom: 18px; }
.back { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 6px; }
.back:hover { color: var(--text); }
.vtitle { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vtitle h1 { font-size: clamp(1.4rem, 5vw, 2rem); margin-right: auto; overflow-wrap: anywhere; min-width: 0; }
.count { color: var(--muted); }
.ghost { display: inline-flex; align-items: center; background: var(--surface); color: var(--text); border: 2px solid var(--line); border-radius: 10px; padding: 0 14px; min-height: 40px; font-weight: 600; text-decoration: none; }
.ghost:hover { border-color: var(--muted); }
.danger { text-decoration-color: var(--accent); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { flex: 1 1 14rem; min-width: 0; }
.toolbar select { min-height: 42px; }
.seg { display: inline-flex; background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: 2px; }
.seg button { background: none; border: 0; border-radius: 8px; padding: 6px 12px; color: var(--muted); font-weight: 600; }
.seg button[aria-pressed=true] { background: var(--text); color: var(--background); }
label.check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; }
input[type=checkbox] { accent-color: var(--accent); width: 18px; height: 18px; }

.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; overflow: hidden; }
.rows > li { border-bottom: 1px solid var(--line); }
.rows > li:last-child { border-bottom: 0; }
.rows > li.empty { padding: 20px 16px; }
.rowlink { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; width: 100%; padding: 12px 16px; color: var(--text); text-decoration: none; background: none; border: 0; text-align: left; }
.rowlink:hover { background: var(--background); }
.rmain { flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; }
.rside { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.num { color: var(--muted); font-variant-numeric: tabular-nums; }
.amt { font-variant-numeric: tabular-nums; font-weight: 600; }
.rside .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-content: center; background: var(--text); color: var(--background); font-size: .72rem; font-weight: 700; font-style: normal; }
.rside .dot { width: 28px; height: 28px; border-radius: 50%; border: 2px dashed var(--line); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.badge.quiet, .badge.closed, .badge.resolved, .badge.i-void { color: var(--muted); }
.badge.open, .badge.i-sent { border-color: var(--text); }
.badge.in_progress, .badge.i-draft { background: var(--text); color: var(--background); border-color: var(--text); }
.badge.waiting { border-style: dashed; border-color: var(--muted); }
.badge.p-low { color: var(--muted); }
.badge.p-high { border: 2px solid var(--accent); }
.badge.p-urgent, .badge.late { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.badge.p-critical { background: var(--text); color: var(--background); border-color: var(--text); text-transform: uppercase; letter-spacing: .04em; } /* above Urgent: needed to go live */
.badge.i-paid { border-color: var(--muted); }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 16px; align-items: start; }
.card { margin: 18px 0 0; }
.cols .card { margin: 0; }
.chd { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.chd h2 { font-size: 1.1rem; margin: 0 auto 0 0; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); margin: 0 0 8px; }
.addr { white-space: pre-line; color: var(--muted); margin: 0 0 8px; }
.desc { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px 14px; margin-bottom: 12px; }
.fld { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: .88rem; min-width: 0; }
.fld > span { font-weight: 600; }
.fld select, .fld input { width: 100%; min-height: 42px; }
.fld.wide { margin: 0 0 12px; }
.fld.check { flex-direction: row; align-items: center; align-self: end; min-height: 42px; }
.fld a, .fld.check { color: var(--text); }
.fld textarea { min-height: 70px; }
.fields .fld > a { min-height: 42px; display: flex; align-items: center; }
input[type=email], input[type=tel], input[type=number], input[type=time] { font: inherit; color: var(--text); background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: 0 12px; min-height: 46px; max-width: 100%; }
input[type=email]:focus-visible, input[type=tel]:focus-visible, input[type=number]:focus-visible, input[type=time]:focus-visible { outline: 0; border-color: var(--text); }
input[type=text], input[type=url] { max-width: 100%; }
.fld input[type=text] { padding: 0 12px; font-size: 1rem; }

.tablewrap { overflow-x: auto; border: 2px solid var(--line); border-radius: 12px; background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th, .tbl td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.fdview { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; white-space: nowrap; }
.tbl th { color: var(--muted); font-weight: 600; font-size: .82rem; }
.tbl .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl td.sub { padding-left: 34px; } /* an account under a parent account */
.badge.aside { margin-left: 6px; }
.tbl .c { text-align: center; }
.tbl td .del { font-size: 1.2rem; }
.lines input[type=text] { width: 100%; min-height: 40px; padding: 0 10px; font-size: .95rem; min-width: 12rem; }
.lines input.num { width: 6.5rem; min-width: 0; text-align: right; }
.linebar { margin: 10px 0; }
.timeform { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.timeform input[type=text] { padding: 0 12px; min-height: 42px; font-size: 1rem; }
.timeform input[placeholder="What was done"] { flex: 1 1 12rem; }
.timeform input[type=date] { min-height: 42px; }
.totals { margin: 12px 0 12px auto; border-collapse: collapse; min-width: 260px; font-variant-numeric: tabular-nums; }
.totals th { text-align: left; color: var(--muted); font-weight: 600; padding: 4px 16px 4px 0; }
.totals td { text-align: right; padding: 4px 0; }
.totals .grand th, .totals .grand td { color: var(--text); font-size: 1.15rem; font-weight: 700; border-top: 2px solid var(--line); padding-top: 8px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; color: var(--muted); }
.tile b { color: var(--text); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.tile.late { border-color: var(--accent); }

dialog select, dialog input[type=email], dialog input[type=tel], dialog input[type=date], dialog input[type=time], dialog input[type=number] { width: 100%; margin-top: 4px; }
dialog .inline input[type=date], dialog .inline input[type=time] { margin-top: 0; flex: 1 1 0; min-width: 0; }
dialog form { margin: 0; }
#fFields { max-height: min(62vh, 640px); overflow: auto; padding: 2px; }
dialog label.check { color: var(--text); margin-bottom: 12px; display: flex; }
.ferr { color: var(--text); border-left: 4px solid var(--accent); padding: 6px 10px; background: var(--background); border-radius: 6px; margin: 8px 0 0; }
.ferr[hidden] { display: none; }
main.wide .note .link { padding: 0; }

/* Printable invoice (/invoice): a white sheet on screen, just the sheet on paper. */
.print-page { background: var(--background); }
.print-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; max-width: 820px; margin: 0 auto; padding: 16px; }
.paper { --text: var(--background); --muted: var(--surface); color-scheme: light; position: relative; background: var(--on-accent); color: var(--text); max-width: 820px; margin: 0 auto 40px; padding: 48px 52px; border-radius: 6px; font-size: .95rem; }
.paper .p-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.paper .p-logo { width: 260px; max-width: 100%; height: auto; display: block; margin-bottom: 12px; }
.paper .p-from { margin: 0; line-height: 1.5; }
.paper h1 { font-family: 'Bruno Ace Numbers', 'Poppins', sans-serif; font-weight: 600; font-size: 2rem; margin: 0 0 8px; text-align: right; }
.paper .p-meta table { border-collapse: collapse; margin-left: auto; }
.paper .p-meta th { text-align: left; padding: 2px 16px 2px 0; font-weight: 600; }
.paper .p-meta td { text-align: right; }
.paper h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 4px; }
.paper .p-to p { margin: 0 0 24px; line-height: 1.5; }
.paper .p-lines { width: 100%; border-collapse: collapse; }
.paper .p-lines th { text-align: left; border-bottom: 2px solid var(--text); padding: 8px 6px; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.paper .p-lines td { border-bottom: 1px solid color-mix(in srgb, var(--surface) 25%, var(--on-accent)); padding: 9px 6px; vertical-align: top; }
.paper .n, .paper .p-lines th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.paper .p-tot { margin: 16px 0 0 auto; border-collapse: collapse; min-width: 280px; font-variant-numeric: tabular-nums; }
.paper .p-tot th { text-align: left; font-weight: 400; padding: 4px 20px 4px 0; }
.paper .p-tot td { text-align: right; padding: 4px 6px; }
.paper .p-tot .grand th, .paper .p-tot .grand td { font-weight: 700; font-size: 1.1rem; border-top: 2px solid var(--text); padding-top: 8px; }
.paper .p-notes { white-space: pre-line; margin: 28px 0 0; }
.paper .p-foot { margin: 28px 0 0; padding-top: 14px; border-top: 4px solid var(--accent); }
.paper .stamp { position: absolute; top: 18px; left: 50%; transform: translateX(-50%) rotate(-4deg); margin: 0; border: 4px solid var(--accent); color: var(--text); padding: 2px 18px; font-family: 'Bruno Ace', sans-serif; font-size: 1.5rem; text-transform: uppercase; }
@media (max-width: 600px) { .paper { padding: 24px 18px; } .paper h1 { text-align: left; } .paper .p-meta table { margin-left: 0; } }
@media print {
  @page { margin: 14mm; }
  .print-page { background: var(--on-accent); }
  .print-bar { display: none; }
  .paper { margin: 0; padding: 0; max-width: none; border-radius: 0; }
}

/* Bills and chart of accounts */
.blines select { min-width: 11rem; min-height: 40px; padding: 0 8px; font-size: .92rem; }
.blines input[type=text] { min-width: 10rem; }
.tbl tr.muted td { color: var(--muted); }
.tbl td.num { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td .link { padding: 0; text-align: left; color: var(--text); }
.card .primary { min-height: 40px; }

/* To-dos on a ticket */
.todos > li { display: flex; align-items: center; gap: 10px; padding: 9px 14px; flex-wrap: wrap; }
.todo { display: flex; align-items: center; gap: 10px; flex: 1 1 14rem; min-width: 0; cursor: pointer; overflow-wrap: anywhere; }
.todos li.done .todo span { color: var(--muted); text-decoration: line-through; }
.todos .rside { margin-left: auto; }
.timeform input[aria-label^="New to-do"] { flex: 1 1 14rem; }
.meta.lateTxt { color: var(--text); font-weight: 700; border-bottom: 2px solid var(--accent); }
/* Plan my days */
.filters #planBtn { margin-left: auto; border-radius: 10px; border-color: var(--line); color: var(--text); min-height: 36px; }
input.dd.fixed { border-style: solid; border-color: var(--text); }
.wklist { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 12px; font-size: .9rem; }
.wklist b { display: inline-block; width: 2.6em; }
/* Over capacity: the To do page note and the assignee picker */
.note.over { border-left-color: var(--text); }
#res .pinfo { display: flex; flex-direction: column; margin-left: auto; text-align: right; }
#res small.over { color: var(--text); font-weight: 700; }
#sOut ul { list-style: none; margin: 8px 0 0; padding: 0; max-height: 40vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
#sOut li { padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: .88rem; }
#sOut li:last-child { border-bottom: 0; }
#sOut p { margin: 10px 0 0; font-size: .9rem; }
/* Task priority badge, next to the task text */
.list .body > .badge, .todo .badge { margin-left: 8px; vertical-align: 1px; }
/* Ticket link on the To do list */
a.tkt { font-size: .85rem; color: var(--muted); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a.tkt:hover { color: var(--text); }

.lines select { min-width: 9rem; min-height: 40px; padding: 0 8px; font-size: .92rem; }

.rows > li.withact { display: flex; align-items: center; gap: 8px; padding-right: 14px; }
.withact .rowlink { flex: 1; min-width: 0; }

/* Timesheet */
.week { min-width: 12rem; text-align: center; }
.ts th.today { color: var(--text); box-shadow: inset 0 -3px 0 var(--accent); }
.ts tr.tot td { border-top: 2px solid var(--line); }
.ts td:first-child { min-width: 14rem; }

/* KBA library: the KBA's own page, shown locked down in a frame */
.kbframe { display: block; width: 100%; height: calc(100vh - 230px); min-height: 480px; border: 1px solid var(--line); border-radius: 12px; background: var(--background); }

/* Client page tabs */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin: 4px 0 18px; }
.tabs a { padding: 8px 14px; color: var(--muted); font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current=page] { color: var(--text); border-bottom-color: var(--accent); }
.cardtabs button { padding: 8px 14px; color: var(--muted); font: inherit; font-weight: 600; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; border-radius: 0; cursor: pointer; }
.cardtabs button:hover { color: var(--text); }
.cardtabs button[aria-selected=true] { color: var(--text); border-bottom-color: var(--accent); }
.tbl.kv th { width: 34%; font-weight: 600; }

/* Purchase order lines: seven columns, kept within the page */
.polines input[type=text] { min-width: 8rem; }
.polines select { min-width: 0; max-width: 11rem; }
.polines td:first-child select { max-width: 8rem; }

/* Timesheet widget (Today button in the top bar) and Work hours */
.me .tsbtn { color: var(--text); background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: 4px 12px; min-height: 36px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.me .tsbtn:hover { border-color: var(--muted); }
.me .tsbtn.on { border-color: var(--accent); }
.me .tsbtn.on::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text); margin-right: 8px; vertical-align: 1px; }
dialog.tsw, dialog.wkdlg { width: min(92vw, 560px); }
dialog#tdlg { width: min(94vw, 680px); } /* the task window: room for its long hints and lists (#10495) */
.tsday { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tsday label { margin: 0; }
.tsday input { width: 100%; }
.ghost.small { min-height: 32px; padding: 0 10px; margin-top: 6px; font-size: .85rem; }
.tsw .tiles { grid-template-columns: repeat(3, 1fr); margin: 14px 0 8px; }
.tsw .tile { padding: 8px 10px; }
.tsw .tile b { font-size: 1.1rem; }
.tslist { list-style: none; margin: 10px 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; max-height: 30vh; overflow: auto; }
.tslist li { display: flex; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.tslist li:last-child { border-bottom: 0; }
.tslist a { color: var(--text); }
.tslist b { margin-left: auto; white-space: nowrap; }
.tsadd { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.tsadd select { flex: 1 1 100%; }
.tsadd input[type=text] { width: auto; }
.tsadd input[size] { flex: 0 0 6.5rem; }
.tsadd input[maxlength] { flex: 1 1 10rem; }
.tsadd label.check { margin: 0; }
.wkdays { display: grid; grid-template-columns: 1fr; gap: 6px; }
.wkdays label { display: grid; grid-template-columns: 3em 1fr; align-items: center; margin: 0; }
.wkdays label > input { margin: 0; }
.wktwo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.wktwo input { width: 100%; }
.ts tr.daylog td { color: var(--muted); font-size: .88rem; }
.ts tr.tot + tr.daylog td { border-top: 2px solid var(--line); }
.ts tr.daylog .link { padding: 0; }
@media (max-width: 560px) { .tsday, .wktwo { grid-template-columns: 1fr; } .tsw .tiles { grid-template-columns: 1fr 1fr 1fr; } }
/* Day view (Today button) */
.tsnav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.tsnav h2 { margin: 0; flex: 1; text-align: center; }
.tsnav .ghost.small { margin: 0; min-width: 40px; justify-content: center; font-size: 1.1rem; }
.tsh { margin: 16px 0 6px; font-size: .95rem; }
.tsh .muted { font-weight: 400; font-size: .85rem; }
.tssched, .tsbook { list-style: none; margin: 0 0 6px; padding: 0; border: 1px solid var(--line); border-radius: 8px; }
.tssched li, .tsbook li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.tssched li:last-child, .tsbook li:last-child { border-bottom: 0; }
.tssched .tm { min-width: 10.5rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.tssched li.busy { border-left: 4px solid var(--text); }
.tssched li.work { border-left: 4px solid var(--accent); }
.tsbook a { color: var(--text); }
.tsbook b { margin-left: auto; white-space: nowrap; }
.tsbook label.check { margin: 0; flex: 1; color: var(--text); }
dialog .tsbook select { width: auto; flex: none; min-height: 32px; padding: 0 6px; margin: 0 0 0 auto; }
.tslist li { flex-wrap: wrap; }
.tslist li > a { flex: 1 1 100%; }
.tsedit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 100%; }
.tsedit input[type=text] { min-height: 34px; padding: 4px 8px; font-size: .9rem; }
.tsedit .tmin { width: 5rem; }
.tsedit .tnote { flex: 1 1 8rem; }
.tsedit label.check { margin: 0; color: var(--text); }
.tsedit .del { background: none; border: 0; color: var(--muted); font-size: 1.2rem; padding: 0 6px; }
.tsedit .del:hover { color: var(--text); }
/* Hours and minutes (ticket estimates) */
.hmbox { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.hmbox input { width: 5.5rem !important; }
.hmbox span { color: var(--muted); }
/* Small summary boxes (day view, timesheet) and the timesheet's day boxes */
.tiles.mini { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.tiles.mini .tile { padding: 8px 10px; font-size: .82rem; }
.tiles.mini .tile b { font-size: 1.05rem; }
.tile.over { border-color: var(--text); }
.dayboxes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; } /* the week in one row */
@media (max-width: 900px) { .dayboxes { grid-template-columns: 1fr; } } /* stacked on phones and small tablets */
.daybox { background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: .85rem; }
.daybox.today { border-color: var(--accent); }
.daybox h3 { margin: 0 0 2px; font-size: .95rem; }
.daybox .se { color: var(--muted); padding: 0; text-align: left; margin-bottom: 4px; font-size: .82rem; }
.daybox .dl { display: flex; justify-content: space-between; gap: 6px; color: var(--muted); }
.daybox .dl b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.daybox .dl.over b { font-weight: 800; }
.daybox .more { margin-top: auto; padding-top: 8px; align-self: flex-start; }
/* The day in time order */
.tssched li.brk { border-left: 4px dashed var(--muted); }
.tssched li.day { border-left: 4px solid var(--muted); color: var(--muted); }
.tssched li.entry { border-left: 4px solid var(--on-accent); }
.tssched li .dur { margin-left: auto; font-size: .82rem; }
.tssched button.entry { background: none; border: 0; padding: 0; text-align: left; color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; flex: 1; }
.tssched li > b { margin-left: auto; white-space: nowrap; }
dialog.tmdlg { width: min(92vw, 480px); }
#tmTicketName { margin: 0 0 12px; }
/* Projects: the ticket tree */
.rows li.tree { display: flex; align-items: stretch; }
.rows li.tree > .rowlink { flex: 1; min-width: 0; }
.sortctl { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
span.kids { width: 40px; flex: none; border-right: 1px solid var(--line); }
button.kids { background: none; border: 0; border-right: 1px solid var(--line); color: var(--text); font-size: 1.2rem; width: 40px; flex: none; }
button.kids:hover { background: var(--background); }
/* Task timer and Claim on the task list */
.side .timer { background: var(--surface); border: 2px solid var(--line); border-radius: 999px; min-height: 34px; min-width: 34px; padding: 0 10px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.side .timer.on { border-color: var(--accent); font-weight: 700; }
.side .claim { background: none; border: 2px solid var(--line); border-radius: 999px; min-height: 34px; padding: 0 12px; font-size: .85rem; font-weight: 600; }
.side .claim:hover, .side .timer:hover { border-color: var(--muted); }
dialog.cldlg { width: min(92vw, 440px); }
.row.szquick { justify-content: flex-start; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
#clName, #rsName, #szName { font-weight: 600; margin: 0 0 10px; }
#clWho, #rsWho, #szInfo { margin: 0 0 12px; }
/* Email templates */
.fieldhelp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 12px; }
button.chipb { background: var(--background); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .8rem; font-family: ui-monospace, Menlo, Consolas, monospace; }
button.chipb:hover { border-color: var(--muted); }
.emaillog summary { cursor: pointer; list-style: none; }
.emaillog .desc { margin: 8px 0 0; }
.fieldtables { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 0 16px; }
@media (max-width: 520px) { .fieldtables { grid-template-columns: 1fr; } }
.fieldtables code { font-size: .85rem; white-space: nowrap; }
.p-for { margin: 6px 0 0; }
/* Next / previous page under a long list (KBAs) */
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.pager .ghost.small { margin: 0; }
/* Due-date filters and counts (To do, Tickets) */
.filters .fsep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.dueinfo { margin: 0 0 10px; }
/* My week */
.weekboxes .daybox { min-height: 160px; }
.wklist { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wkitem { display: flex; gap: 6px; align-items: baseline; font-size: .84rem; line-height: 1.3; }
.wkitem .badge { flex: none; font-size: .68rem; }
.wktext { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.wktext a { color: var(--text); }
.wkitem .amt { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; }
.wkitem.late .wktext a { text-decoration-color: var(--text); }
.lateflag { color: var(--text); }
.kbused { margin: 0 0 12px; } .kbused summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.kblist { list-style: none; margin: -4px 0 12px; padding: 0; } .kblist li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.kblist a { color: var(--text); text-underline-offset: 3px; }

/* Settings → Danger zone */
.dz .dzh { color: var(--danger); font-size: 1.4rem; margin: 28px 0 10px; }
.dzbox { border: 1px solid var(--danger); border-radius: 10px; }
.dzrow { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.dzrow + .dzrow { border-top: 1px solid var(--line); }
.dzrow > div { flex: 1; min-width: 0; }
.dzrow .meta { margin: 2px 0 0; }
.dzbtn { flex: none; background: var(--surface); color: var(--danger); border: 2px solid var(--line); border-radius: 10px; padding: 0 14px; min-height: 40px; font-weight: 600; cursor: pointer; }
.dzbtn:hover, .dzbtn:focus-visible { border-color: var(--danger); }
.dzbtn:disabled { color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.scanbtn { display: inline-flex; align-items: center; gap: 10px; }
.dropping { outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: 12px; } /* Bills page: files dragged over it (Scan bills) */
.drophint { margin: -4px 0 12px; }
.packs { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.pack { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; min-width: 150px; }
.packs > .meta { flex-basis: 100%; margin: 0; }
.dzgate { background: var(--surface); border-radius: 10px 10px 0 0; }
@media (max-width: 600px) { .dzrow { flex-direction: column; align-items: stretch; } }
.primary.dzgo { background: var(--danger); color: var(--background); }

/* Settings → Terms of Service; the accept banner under the top bar */
.tosh { font-size: 1.4rem; margin: 28px 0 10px; }
.tosbox { display: flex; align-items: flex-start; gap: 14px; border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.tosbox > div { flex: 1; min-width: 0; }
.tosbox .meta { margin: 4px 0 6px; }
.tosmark { flex: none; width: 24px; height: 24px; margin-top: 1px; color: var(--accent); }
.termsbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.termsbar span { flex: 1; min-width: 240px; }
.termsbar a { color: var(--text); }

/* No estimate page: the row's link on the left, its estimate box on the right */
.nerow { display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.nerow .rmain { flex: 1 1 16rem; min-width: 0; color: inherit; text-decoration: none; }
.nerow .rmain:hover > span:first-child { text-decoration: underline; }
.nerow .hmbox { margin-top: 0; }
.nerow select { min-height: 38px; }

/* Project page: "Pick a ticket" list and its Add button side by side */
.addpick { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.addpick { max-width: 100%; }
.addpick select { max-width: min(28rem, 100%); min-width: 0; }
.chd { flex-wrap: wrap; } /* tabs, counts and buttons wrap on a phone */

/* Kanban boards: columns side by side, scrolling sideways inside the board (never the page) */
.kanban { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 10px; max-width: 100%; min-width: 0; }
.kcol { flex: 1 0 260px; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 10px; }
.kcol.over { border-color: var(--text); }
.khd { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 4px; }
.khd h3 { margin: 0; font-size: .98rem; }
.kcards { display: flex; flex-direction: column; gap: 8px; min-height: 48px; }
.kempty { color: var(--muted); font-size: .85rem; margin: 6px 4px; }
.kcard { background: var(--background); border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: grab; display: flex; flex-direction: column; gap: 6px; }
.kcard.dragging { opacity: .5; }
.kcard.late { border-color: var(--accent); }
.kcard .ktitle { background: none; border: 0; padding: 0; text-align: left; color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; overflow-wrap: anywhere; }
.kcard .ktitle:hover { text-decoration: underline; }
.kbadges { display: flex; gap: 6px; flex-wrap: wrap; }
.kfoot { display: flex; align-items: center; gap: 8px; }
.kfoot .meta { flex: 1; min-width: 0; font-size: .8rem; }
.kfoot select.kmove { min-height: 30px; padding: 0 6px; font-size: .78rem; border-radius: 8px; max-width: 7.5rem; }
.kfoot .av { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-content: center; background: var(--text); color: var(--background); font-size: .7rem; font-weight: 700; font-style: normal; }
.boardbar { display: flex; justify-content: flex-end; margin: 0 0 10px; }
/* Settings → Statuses */
.stgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 16px; }
.stlist h3 { margin: 6px 0; font-size: 1rem; }
.strows { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.strows li { display: flex; gap: 6px; align-items: center; }
.strows input[type=text] { flex: 1 1 8rem; min-width: 0; padding: 0 10px; min-height: 38px; font-size: .92rem; }
.strows select { flex: 0 1 9.5rem; min-width: 0; min-height: 38px; font-size: .85rem; padding: 0 6px; }
.strows button.small { padding: 4px 8px; }
.badge.st-waiting { border-style: dashed; border-color: var(--muted); }
.badge.st-closed { color: var(--muted); }
.setgrid > .dz-wide { grid-column: 1 / -1; }
.strows button.small { margin: 0; }
#modeBox { margin-left: auto; }
.filters #modeBox .seg button { border: 0; border-radius: 8px; padding: 6px 12px; }
.filters #modeBox .seg button[aria-pressed=true] { background: var(--text); color: var(--background); }
.kfoot { flex-wrap: wrap; }
.kfoot .meta { flex: 1 1 100%; }
.kfoot select.kmove { margin-right: auto; }
/* A page showing a board uses the whole screen width; the columns share it */
main.wide:has(.kanban:not([hidden])), main.wide:has(#board:not([hidden])) { max-width: none; }
main.wide.full { max-width: none; } /* the To do page: list and board use the whole screen */
/* Ideas */
.ideaadd { margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ideaadd input, .ideaadd textarea { width: 100%; min-width: 0; }
input.ideatitle { width: 100%; font-size: 1.4rem; font-weight: 700; padding: 10px 14px; margin: 4px 0 6px; }
textarea.ideadetails { margin: 12px 0 18px; }
.rows li.cm { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 14px; }
.nav a[hidden] { display: none; } /* parts switched off in Settings → Features */
.setgrid > .card:not(.dz) { border: 1px solid var(--text); border-radius: 10px; padding: 14px 16px; } /* each Settings group boxed, like the Danger zone */
/* HTML email preview (template editor, email window, email log): sandboxed, light like an email client */
.prevrow { margin: -4px 0 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
iframe.htmlprev { width: 100%; min-height: 320px; border: 1px solid var(--line); border-radius: 10px; background: var(--on-accent); }
.prevrow[hidden], iframe.htmlprev[hidden] { display: none; }
/* Settings groups (Accounting, Statuses): the heading outside one white box; the parts inside split by thin lines */
.setgrid > .sgroup { grid-column: 1 / -1; min-width: 0; }
.sghd { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.sgh { font-size: 1.4rem; margin: 0 auto 0 0; }
.sgbox { border: 1px solid var(--text); border-radius: 10px; overflow: hidden; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.sgbox > * { min-width: 0; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); } /* thin lines between the parts; an empty spot stays plain */
.sgbox > .card { margin: 0; padding: 14px 16px; border: 0; border-radius: 0; }
@media (min-width: 900px) { .sgbox > .setwide { grid-column: span 2; } }
.sgbox.one { display: block; padding: 14px 16px; background: var(--background); }
.sgbox.one > * { box-shadow: none; }
.rows li.inactive .rmain > span { color: var(--muted); }
.rows li.more { padding: 8px 14px; }
.noadmin .recdel { display: none !important; } /* deleting records: admins only */
/* List / Board switch and the board's options next to it */
.modesw { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.modesw select.boardby { min-height: 38px; padding: 0 8px; font-size: .88rem; }
.modesw .hideclosed { font-size: .88rem; white-space: nowrap; margin: 0; }
.kcard .kdetail { margin: 0; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
/* Drop-down lists drawn inside the page (Chrome's customizable select), not as a separate system window: on Ubuntu's
   Wayland with display scaling Chrome cuts those windows off. Browsers without it keep their usual drop-downs. */
@supports (appearance: base-select) {
  select, select::picker(select) { appearance: base-select; }
  select { display: inline-flex; align-items: center; justify-content: space-between; gap: 6px; cursor: pointer; }
  select::picker-icon { color: var(--muted); font-size: .8em; }
  select::picker(select) {
    background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 4px;
    max-height: min(60vh, 420px); overflow-y: auto; box-shadow: 0 10px 30px color-mix(in srgb, var(--background) 70%, transparent);
  }
  select option { padding: 7px 10px; border-radius: 7px; font-size: .92rem; white-space: normal; }
  select option:hover, select option:focus-visible { background: var(--background); outline: none; }
  select option:checked { font-weight: 700; }
  select option::checkmark { color: var(--text); }
  select option:disabled { color: var(--muted); }
}
/* Report a bug */
.bugdlg { width: min(560px, calc(100vw - 32px)); }
.bgdetails summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.bgtbl { width: 100%; border-collapse: collapse; font-size: .82rem; margin-top: 6px; }
.bgtbl th { text-align: left; color: var(--muted); font-weight: 600; padding: 3px 10px 3px 0; vertical-align: top; white-space: nowrap; }
.bgtbl td { padding: 3px 0; overflow-wrap: anywhere; }
/* Ticket page: the work on the left, the Details card on the right (each setting as text; click to change) */
.tlayout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.tmain { min-width: 0; }
.tside { position: sticky; top: 12px; min-width: 0; }
.tside > .card { margin-top: 18px; }
.dlist { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.drow { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 10px; align-items: center; padding: 9px 12px; }
.drow + .drow { border-top: 1px solid var(--line); }
.drow dt { color: var(--muted); font-size: .85rem; }
.drow dd { margin: 0; overflow-wrap: anywhere; }
.drow.can { cursor: pointer; }
.drow.can:hover, .drow.can:focus-visible { background: var(--surface); outline: none; }
.drow.editing { grid-template-columns: 1fr; background: var(--surface); }
.drow.editing dd { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.drow.editing dd > select, .drow.editing .dedit input { width: 100%; }
.drow.editing dd > button { align-self: flex-start; }
.dedit { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 900px) { .tlayout { grid-template-columns: 1fr; } .tside { position: static; order: -1; } }
@media (max-width: 560px) { .bugbtn { font-size: 0; } .bugbtn::after { content: 'Bug'; font-size: .85rem; } } /* room for your name in the top bar */
/* Project page: settings across the top as "Label: value" (click to change), then a row with the estimate and the times */
.dfields { display: flex; flex-wrap: wrap; gap: 6px 26px; align-items: center; }
.dcell { flex-direction: row; align-items: center; gap: 8px; border-radius: 8px; padding: 4px 8px; margin: 0 -8px; }
.dcell .dval { color: var(--text); font-size: 1rem; min-height: 30px; display: flex; align-items: center; overflow-wrap: anywhere; }
.dcell.can { cursor: pointer; }
.dcell.can:hover, .dcell.can:focus-visible { background: var(--surface); outline: none; }
.dcell.editing { background: var(--surface); }
.dcell.editing select, .dcell.editing input { width: auto; min-width: 180px; }
.dcell.editing input[type=number] { width: 4.5rem; min-width: 0; }
.dfields + .dfields { padding-top: 10px; border-top: 1px solid var(--line); margin-bottom: 18px; }
.wklist .wksub { list-style: none; color: var(--muted); font-size: .8rem; font-weight: 600; margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); }
/* Email templates and emails: a wide, tall window with a big message box */
dialog.wide { width: min(96vw, 1000px); max-height: 94vh; }
dialog.wide #fFields { max-height: calc(94vh - 150px); }
dialog.wide textarea[name=body] { min-height: 36vh; resize: vertical; }
/* A list you can type in (combo() in crm.js): parent ticket, Link a ticket, Waiting on… */
.combo { position: relative; display: block; min-width: min(100%, 18rem); }
.combo .cbin { width: 100%; }
.cblist { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  max-height: min(50vh, 320px); overflow-y: auto; box-shadow: 0 10px 30px color-mix(in srgb, var(--background) 70%, transparent); }
.cblist li { padding: 7px 10px; border-radius: 7px; font-size: .92rem; cursor: pointer; overflow-wrap: anywhere; }
.cblist li.act, .cblist li:hover { background: var(--background); }
.cblist li[aria-selected=true] { font-weight: 700; }
.cblist li.none { color: var(--muted); cursor: default; }
dialog .cblist { position: static; margin-top: 4px; max-height: min(40vh, 280px); box-shadow: none; } /* in a window: part of the form, so the window grows instead of cutting it off */
.toolbar .combo { display: inline-block; width: 15rem; min-width: 0; max-width: 100%; }
.cbbox { position: relative; display: block; }
.cbbox .cbin { padding-right: 30px; }
.cbcaret { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .8em; pointer-events: none; }
/* Task text on ticket and project pages: opens the task's window (crm.js taskForm) */
button.tlink { background: none; border: 0; padding: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; overflow-wrap: anywhere; }
button.tlink:hover { text-decoration-color: var(--muted); }
.todos li.done button.tlink { color: var(--muted); text-decoration: line-through; }
.topen { min-width: 0; }
.topen .muted { font-size: .85rem; }
.todos details.tnotes { order: 3; flex-basis: 100%; margin: -4px 0 0 34px; font-size: .9rem; }
.todos details.tnotes summary { color: var(--muted); cursor: pointer; width: max-content; }
.todos details.tnotes .ctext { white-space: pre-wrap; margin-top: 4px; }
.tcmts { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.tcmts h3 { margin: 0 0 6px; font-size: 1rem; }
.tcmts .cform { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.tcmts .cform textarea { flex: 1; }
.folderbtns { display: inline-flex; align-items: center; gap: 6px; }

/* Additional agents: outlined avatars after the lead's; the editor's chips */
.av.ag { background: transparent !important; color: var(--text) !important; box-shadow: inset 0 0 0 1.5px var(--muted); margin-left: -4px; }
.agents { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.agents .agent { border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: .9rem; cursor: pointer; }
.agents .agent:hover { border-color: var(--muted); }
.agents select { width: auto; min-width: 12em; }
dialog .plabel { display: block; color: var(--muted); font-size: .9rem; margin-bottom: 12px; } dialog .plabel .agents { margin-top: 4px; color: var(--text); }
.side .av.ag { width: 24px; height: 24px; border-radius: 50%; display: grid; place-content: center; font-size: .68rem; font-weight: 700; font-style: normal; flex: none; }
.signin-box.oauth-box { width: min(100%, 480px); text-align: left; } .oauth-box .logo { display: block; margin: 0 auto 18px; }
.oauth-box h1 { text-align: center; }
.oauth-can { margin: 8px 0 14px; padding-left: 20px; } .oauth-can li { margin: 4px 0; }
.oauth-act { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* ---- Filter bar (To do, Tickets, Projects: PSAW.filterBar in widget.js) ---- */
.hacts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.hacts .ghost { min-height: 40px; }
.fbox { margin-bottom: 12px; }
.fbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 6px; }
.fbar .fsearch { flex: 1 1 14rem; min-width: 0; min-height: 36px; height: 36px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--background); }
.fgrow { flex: 1; }
.fmenu { position: relative; }
.fmb, .fdir { min-height: 36px; background: transparent; border: 1.5px solid transparent; border-radius: 8px; padding: 0 10px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.fmb b { color: var(--text); font-weight: 600; }
.fmb::after { content: ' ▾'; font-size: .8em; }
.fmb:hover, .fdir:hover, .fmenu.open .fmb { background: var(--background); border-color: var(--line); }
.fmb.set { border-color: var(--accent); color: var(--text); }
.fdir { font-size: .88rem; }
.fpop { display: none; position: absolute; top: calc(100% + 4px); left: 0; min-width: 12rem; max-width: min(22rem, calc(100vw - 32px)); max-height: 60vh; overflow-y: auto; background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: 4px; z-index: 30; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); }
.fpop.right { left: auto; right: 0; }
.fmenu.open .fpop { display: block; }
.fopt { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 6px; padding: 7px 10px 7px 26px; color: var(--muted); font-weight: 600; }
.fopt[aria-checked=true] { color: var(--text); }
.fopt[aria-checked=true]::before { content: '✓'; position: absolute; margin-left: -18px; }
.fopt:hover, .fopt:focus-visible { background: var(--background); color: var(--text); }
.fpop .ffind { width: 100%; min-height: 36px; margin-bottom: 4px; padding: 0 10px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--background); }
.fbar .modesw .seg { background: transparent; border: 0; padding: 0; }
.fbar .modesw .seg button { min-height: 36px; border: 0; border-radius: 8px; padding: 0 12px; }
.fbar .modesw .seg button[aria-pressed=true] { background: var(--text); color: var(--background); }
.fbar .modesw select.boardby { min-height: 36px; }
.fbar .fclear { font-size: .85rem; align-self: center; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.fchip { display: inline-flex; align-items: center; font-size: .85rem; border: 1px solid var(--line); border-radius: 999px; padding: 2px 2px 2px 10px; color: var(--muted); }
.fchip button { background: none; border: 0; color: var(--muted); padding: 0 8px; font-size: 1rem; line-height: 1; }
.fchip button:hover { color: var(--text); }
.fchips .link { font-size: .85rem; }
@media (max-width: 640px) { .fgrow { display: none; } .fbar .fsearch { flex-basis: 100%; } }
.fbar .modesw { flex-wrap: nowrap; margin-left: auto; } /* List / Nested / Board stays at the right end, board options before it */
.dephelp { margin: 8px 0 0; }

/* Filter bar looks (Your account → Filter bar; #10425): .fs-c is the default above; a = segmented boxes, b = chips with labels */
.fbreak { display: none; }
.fs-a .fbar, .fs-b .fbar { background: none; border: 0; padding: 0; gap: 8px; }
.fs-a .fbreak, .fs-b .fbreak { display: block; flex-basis: 100%; height: 0; }
.fs-a .fmb, .fs-b .fmb, .fs-a .fdir, .fs-b .fdir { border-color: var(--line); }
.fs-a .fbar .modesw .seg, .fs-a .fseg { display: inline-flex; gap: 2px; border: 1.5px solid var(--line); border-radius: 10px; padding: 3px; }
.fs-a .fseg button, .fs-a .fbar .modesw .seg button { min-height: 30px; border: 0; border-radius: 7px; padding: 0 12px; background: transparent; color: var(--muted); font-weight: 600; }
.fs-a .fseg button[aria-pressed=true], .fs-a .fbar .modesw .seg button[aria-pressed=true] { background: var(--text); color: var(--background); }
.fs-b .fseg { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-right: 10px; margin-right: 2px; border-right: 1px solid var(--line); }
.fs-b .fseg:has(+ .fbreak) { border-right: 0; }
.fseglab { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.fs-b .fseg button, .fs-b .fbar .modesw .seg button { min-height: 32px; border: 1.5px solid var(--line); border-radius: 999px; padding: 0 14px; background: transparent; color: var(--muted); font-weight: 600; }
.fs-b .fbar .modesw .seg { display: inline-flex; gap: 6px; }
.fs-b .fseg button[aria-pressed=true], .fs-b .fbar .modesw .seg button[aria-pressed=true] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); }
.fs-a .fseg button:hover, .fs-b .fseg button:hover { color: var(--text); }
.stylepick { display: grid; gap: 10px; margin-top: 8px; }

/* Tickets switched off (Settings → Features, #10271): the To do page's ticket pickers hide */
.notickets #ticketNew, .notickets #tTicketRow, .notickets #tmTicketRow { display: none; }

/* Change history window (PSAW.history; #10362) */
dialog.hdlg { width: min(94vw, 620px); }
.hdlg .hbody { max-height: 65vh; overflow-y: auto; }
.hlist { list-style: none; margin: 0; padding: 0; }
.hentry { padding: 10px 0; border-bottom: 1px solid var(--line); }
.hentry:last-child { border-bottom: 0; }
.hhead { color: var(--muted); font-size: .88rem; margin-bottom: 4px; }
.hhead b { color: var(--text); }
.hline { font-size: .92rem; overflow-wrap: anywhere; }
.hfield { color: var(--muted); }
.hdlg .actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.fbar .addpick { flex-wrap: nowrap; } /* project page: pick a ticket + Add, inside the filter bar */
.fbar .addpick > *:first-child { min-width: 12rem; }
.fbar .addpick button, .fbar > button { min-height: 36px; }
.fbar a.ghost { min-height: 36px; }
/* Project and client pages: each section (Tickets, tasks, contacts…) is one box: title and count, its filter bar under a line, then the list */
.boxpage .card { margin-top: 32px; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 14px; min-width: 0; }
.boxpage .cols { margin-top: 32px; }
.boxpage .cols .card { margin: 0; }
.boxpage .card .fbox { margin-bottom: 0; }
.boxpage .card .fbox .fbar { background: none; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; }
.boxpage .card .rows { border: 0; border-radius: 0; background: none; }
.frow { flex-basis: 100%; height: 0; } /* a filter bar's second row (To do) */
/* To do rows: one line each, like the project page */
.list > li.crow { padding: 9px 14px; flex-wrap: nowrap; }
.crow .cline { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.crow .cline .tkt.meta { font-size: .85rem; }
.crow .side { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.crow .side .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-content: center; background: var(--text); color: var(--background); font-size: .72rem; font-weight: 700; font-style: normal; }
.crow .body { flex: 1 1 0; min-width: 0; }
.list > li.crow:has(> .thread) { flex-wrap: wrap; } /* comments open: the thread goes under the task, not beside it (#10496) */
.crow > .thread { margin-left: 36px; }
@media (max-width: 640px) { .list > li.crow { flex-wrap: wrap; } .crow .side { flex-basis: 100%; justify-content: flex-end; flex-wrap: wrap; } } /* phone: the details go under the task */
.kbchip { display: inline-block; max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; font-size: .78rem; font-weight: 600; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; text-decoration: none; }
a.kbchip:hover { border-color: var(--text); }
.tbl.words input { width: 100%; min-width: 8rem; min-height: 38px; padding: 0 10px; }
/* Top bar: Today and Report a bug alike, then your picture (a circle) that opens Your account / Sign out */
.mymenu .meav { padding: 0; border-radius: 50%; width: 38px; height: 38px; display: grid; place-content: center; border: 2px solid var(--line); background: var(--surface); }
.mymenu .meav::after { display: none; }
.mymenu .meav:hover, .mymenu.open .meav { border-color: var(--text); }
.avi { width: 34px; height: 34px; border-radius: 50%; display: grid; place-content: center; overflow: hidden; background: var(--text); color: var(--background); font-size: .8rem; font-weight: 700; }
.avi img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avi svg { width: 20px; height: 20px; }
.mymenu .navm { min-width: 220px; }
.mmwho { display: flex; flex-direction: column; padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; color: var(--text); }
.mmwho span { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; }
.mymenu .navm a, .mymenu .mmout { display: block; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 600; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.mymenu .navm a:hover, .mymenu .mmout:hover { background: var(--background); color: var(--text); }
/* Your account → Your picture */
.avpick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0; }
.avpick button.avopt { padding: 2px; border-radius: 50%; border: 2px solid var(--line); background: none; cursor: pointer; }
.avpick button.avopt[aria-pressed=true] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.avpick .avi { width: 32px; height: 32px; }
.avbar { align-items: center; gap: 10px; }
.avshape { display: flex; align-items: center; gap: 8px; }
.avshape select { width: auto; }
/* Your account → Buttons: rounded (a, default), pill (b) or square (c), on buttons everywhere */
.bs-b .primary, .bs-b .ghost, .bs-b .me .tsbtn, .bs-b .dzbtn, .bs-b .inline button, .bs-b .seg, .bs-b .fmb, .bs-b .fdir, .bs-b .dev button { border-radius: 999px; }
.bs-b .seg button { border-radius: 999px; }
.bs-c .primary, .bs-c .ghost, .bs-c .me .tsbtn, .bs-c .dzbtn, .bs-c .inline button, .bs-c .seg, .bs-c .seg button, .bs-c .fmb, .bs-c .fdir, .bs-c .dev button { border-radius: 3px; }
.mmsep { display: block; height: 1px; background: var(--line); margin: 4px 0; }
.tcolors { display: grid; gap: 8px; margin: 10px 0; }
.trow { display: flex; align-items: center; gap: 10px; }
.trow input[type=color] { width: 46px; height: 34px; padding: 2px; border: 2px solid var(--line); border-radius: 8px; background: var(--surface); flex: none; }
/* Picture shape (Profile): the top-bar picture and the choices on Profile. The outline is the button's own background showing round the edge. */
.sh-hexagon .mymenu .meav, .sh-hexagon .avpick .avopt, .sh-hexagon .avi { clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); border-radius: 0; }
.sh-octagon .mymenu .meav, .sh-octagon .avpick .avopt, .sh-octagon .avi { clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%); border-radius: 0; }
.sh-square .mymenu .meav, .sh-square .avpick .avopt, .sh-square .avi { border-radius: 9px; }
.sh-hexagon .mymenu .meav, .sh-octagon .mymenu .meav, .sh-hexagon .avpick .avopt, .sh-octagon .avpick .avopt { border: 0; background: var(--line); padding: 2px; }
.sh-hexagon .avpick .avopt[aria-pressed=true], .sh-octagon .avpick .avopt[aria-pressed=true] { background: var(--accent); box-shadow: none; }
.sh-hexagon .mymenu .meav:hover, .sh-octagon .mymenu .meav:hover, .sh-hexagon .mymenu.open .meav, .sh-octagon .mymenu.open .meav { background: var(--text); }
.sh-hexagon .mymenu .meav:focus-visible, .sh-octagon .mymenu .meav:focus-visible { background: var(--text); } /* the clipped shape hides the usual focus ring */
.avi.rx { background: var(--accent); color: var(--on-accent); } /* RxTech figures */
.avi.rx svg { width: 26px; height: 26px; margin-top: 4px; }
.avpick .avi.rx svg { width: 26px; height: 26px; }
.avi.emo { background: var(--surface); font-size: 1.25rem; line-height: 1; } /* animals */
.avpick .avi.emo { font-size: 1.2rem; }

/* Training (picture menu → Training, the ? in the top bar) */
.me .helpbtn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-width: 36px; padding: 4px 8px; }
.trainbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 20px; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--muted); }
.trainbar a { color: var(--text); }
.tprog { height: 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; margin: 6px 0 14px; }
.tprog span { display: block; height: 100%; background: var(--accent); }
details.lesson { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin: 8px 0; }
details.lesson > summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; font-weight: 600; list-style: none; }
details.lesson > summary::-webkit-details-marker { display: none; }
details.lesson > summary .ltitle { flex: 1; }
.ltick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; }
details.lesson.done .ltick { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.lbody { padding: 0 16px 14px 46px; }
.lbody ol { margin: 6px 0 12px; padding-left: 1.2rem; }
.lbody li { margin: 4px 0; }
a.btnlink { display: inline-flex; align-items: center; text-decoration: none; color: var(--text); border: 2px solid var(--line); border-radius: 10px; padding: 6px 14px; font-weight: 600; min-height: 40px; }
@media (max-width: 560px) { .lbody { padding-left: 16px; } }
/* Email To / Cc: type to search addresses (addrSuggest in crm.js); drawn inside the window */
.addrsug { position: absolute; left: 0; right: 0; z-index: 30; margin: 2px 0 0; padding: 4px; list-style: none; background: var(--background); border: 2px solid var(--line); border-radius: 10px; max-height: 260px; overflow: auto; }
.addrsug li { padding: 6px 10px; border-radius: 6px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addrsug li:hover, .addrsug li.on { background: var(--surface); }

/* Search past the filters (PSAW.scope): "N more match outside your filters · Show all" under a filter bar */
.searchmore { margin: 8px 2px 0; }
.scopenote .searchmore { margin: -4px 2px 12px; }
/* Training walkthroughs (Show me): a ring round the step's button and a bubble with the step (widget.js) */
.tourring { position: fixed; z-index: 90; border: 3px solid var(--accent); border-radius: 10px; pointer-events: none; box-shadow: 0 0 0 9999px color-mix(in srgb, var(--background) 45%, transparent); transition: left .2s, top .2s, width .2s, height .2s; }
.tourbub { position: fixed; z-index: 91; background: var(--surface); color: var(--text); border: 2px solid var(--accent); border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 28px color-mix(in srgb, var(--background) 70%, transparent); }
.tourbub p { margin: 6px 0; }
.tourbub .tstep { color: var(--muted); font-size: .85em; }
.tourbub .trow { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; }
.tourbub .trow > span { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.trgroup { margin: 18px 0 4px; font-size: 1rem; color: var(--muted); }
.tourbub a { color: var(--text); }
/* Reports (#10536): the choices in one wrapping row; numbers right-aligned; totals row bold */
.reportbar { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin: 4px 0 16px; }
.reportbar .fld { min-width: 160px; }
.tbl.report th.n, .tbl.report td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl.report tfoot th { border-top: 1px solid var(--line); font-weight: 600; }
