/* joeOS application styling.
   A working tool, not a brochure: dense type, quiet surfaces, one accent doing
   one job. The JOE yellow lives in the masthead and on the active tab; the
   workspace itself stays neutral so status colour is the thing that reads. */

*, *::before, *::after { box-sizing: border-box; }

/* A `display` rule on an element beats the hidden attribute, so state it once. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 13.5px/1.5 var(--ui);
  letter-spacing: -.003em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; text-wrap: balance; font-weight: 600; letter-spacing: -.015em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.wrap { max-width: 1440px; margin: 0 auto; padding-inline: 22px; }
.wrap.narrow { max-width: 1120px; }
.dim { color: var(--text-3); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.spacer { flex: 1; }

/* ================================================================= shell
   A left rail and a content pane. No coloured bar across the top — the brand
   sits in the wordmark and in the marker on the active link, and everything
   else stays out of the way of the work. */

.shell { display: flex; height: 100vh; overflow: hidden; }

.side-nav {
  flex: 0 0 234px; min-width: 0;
  background: var(--sidebar); border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}

.sn-brand { padding: 16px 14px 12px 16px; display: flex; align-items: flex-start; gap: 8px; }
.sn-brand .logo { flex: 1; min-width: 0; }
.logo {
  font-family: var(--display); font-size: 25px; line-height: 1;
  color: var(--text); letter-spacing: .02em; display: block;
}
.logo:hover { text-decoration: none; }
.logo span {
  display: block; margin-top: 3px;
  font: 500 8.5px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--text-3);
}

.sn-search { position: relative; margin: 0 12px 14px; }
.sn-search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.sn-search input {
  width: 100%; height: 32px; font: 400 13px var(--ui);
  padding: 0 30px 0 28px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--text);
}
.sn-search input::placeholder { color: var(--text-3); }
.sn-search kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font: 500 10px/1 var(--mono); color: var(--text-3);
  background: var(--raised); border: 1px solid var(--line); border-radius: 3px; padding: 3px 5px;
}

.sn-links { flex: 1; min-height: 0; overflow-y: auto; padding: 0 8px; display: grid; gap: 1px; align-content: start; }
.sn-links a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r);
  font: 500 13.5px/1 var(--ui); color: var(--text-2);
}
.sn-links a:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.sn-links a svg { flex: none; opacity: .72; }
.sn-links a[aria-current="page"] {
  background: var(--raised); color: var(--text); font-weight: 600;
  box-shadow: inset 2px 0 0 var(--joe-yellow);
}
.sn-links a[aria-current="page"] svg { opacity: 1; }
.sn-count {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--joe-magenta); color: #fff; border-radius: 9px;
  font: 600 10px/18px var(--ui); text-align: center;
}
.sn-group {
  font: 600 10px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); padding: 16px 10px 6px;
}

.sn-foot { border-top: 1px solid var(--line); padding: 10px 12px; }
.sn-user { display: flex; align-items: center; gap: 9px; }
.sn-who { flex: 1; min-width: 0; }
.sn-who .nm { font: 600 12.5px/1.3 var(--ui); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-who .rl { font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-out {
  border: none; background: none; cursor: pointer; color: var(--text-3);
  width: 26px; height: 26px; border-radius: 4px; display: grid; place-items: center;
}
.sn-out:hover { background: var(--raised); color: var(--text); }

/* content pane */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.main > .wrap {
  flex: 1; min-height: 0; overflow-y: auto;
  max-width: none; margin: 0; padding: 26px 26px 48px;
}
/* Reading views keep a comfortable measure; tables and boards use the pane. */
.main > .wrap.narrow { max-width: 1180px; }
.main > .wrap.wide { max-width: none; }

.avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--text); color: var(--bg);
  font: 600 10.5px/1 var(--ui);
}
.avatar.sm { width: 22px; height: 22px; font-size: 9px; }
.avatar.lg { width: 32px; height: 32px; font-size: 12px; }
.avatar.muted { background: var(--line-2); color: var(--text-2); }

@media (max-width: 820px) {
  .shell { flex-direction: column; height: auto; overflow: visible; }
  .side-nav { flex: none; width: 100%; border-right: none; border-bottom: 1px solid var(--line); }
  .sn-links { display: flex; overflow-x: auto; padding: 0 8px 8px; gap: 2px; }
  .sn-links a { white-space: nowrap; }
  .sn-group { display: none; }
  .main { overflow: visible; }
}

/* ================================================================= bits */

.btn {
  font: 600 12.5px/1 var(--ui); padding: 8px 12px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
}
.btn:hover { background: var(--raised); text-decoration: none; }
/* One solid action per screen, in ink. Magenta is now reserved for the unread
   badge, where a single spot of colour actually earns its place. */
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.primary:hover { background: var(--text); filter: brightness(1.25); }
.btn.ghost { border-color: transparent; background: none; color: var(--text-3); }
.btn.ghost:hover { background: var(--raised); color: var(--text); }
.btn.sm { padding: 6px 9px; font-size: 11.5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.pill {
  display: inline-block; font: 700 10px/1 var(--ui); letter-spacing: .06em;
  text-transform: uppercase; padding: 5px 8px; border-radius: 3px;
  border: 1px solid transparent; white-space: nowrap;
}
.pill-neutral { background: var(--n-200); color: var(--n-700); }
.pill-info    { background: var(--info-bg); color: var(--info); }
.pill-accent  { background: var(--joe-yellow); color: var(--joe-ink); }
.pill-warn    { background: var(--warn-bg); color: var(--warn); }
.pill-bad     { background: var(--bad-bg);  color: var(--bad); }
.pill-ok      { background: var(--ok-bg);   color: var(--ok); }
.pill-muted   { background: var(--raised);  color: var(--text-3); border-color: var(--line); }

.tag {
  font: 600 10.5px/1 var(--ui); padding: 4px 7px; border-radius: 3px;
  background: var(--raised); color: var(--text-2); border: 1px solid var(--line); white-space: nowrap;
}
.tag.page { background: transparent; border-color: var(--line-2); color: var(--text-2); }
.vkey { font: 600 11.5px/1 var(--mono); color: var(--text-3); letter-spacing: .01em; }

/* Match every text-ish input, including ones written without a type attribute —
   `input[type="text"]` does not match `<input id="x">`, which is easy to miss.
   The exclusions sit inside :where() so this stays at the specificity of a bare
   element selector and component styles can still override it. */
input:where(:not([type="checkbox"], [type="radio"], [type="file"], [type="submit"], [type="button"])),
textarea, select {
  font: 400 13.5px/1.5 var(--ui); padding: 8px 10px;
  border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); color: var(--text); width: 100%;
}
textarea { resize: vertical; min-height: 74px; }
input:focus, textarea:focus, select:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }

/* Labels sit above their field. Every label in a .field gets this, so a missing
   class cannot silently put one inline beside its input. */
label.fl, .field > label {
  display: block; font: 500 12.5px/1.4 var(--ui); color: var(--text); margin-bottom: 6px;
}
.field { min-width: 0; }
.field + .field { margin-top: 0; }

/* ================================================================= board */

.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-block: 0 16px;
}
.toolbar h1 { font-size: 21px; letter-spacing: -.02em; }
.toolbar .counts {
  display: flex; align-items: center; font-size: 12.5px; color: var(--text-3);
  padding-left: 4px; gap: 0;
}
.toolbar .counts span { display: inline-flex; align-items: baseline; gap: 4px; padding-inline: 9px; }
.toolbar .counts span + span { border-left: 1px solid var(--line); }
.toolbar .counts span:first-child { padding-left: 0; }
.toolbar .counts b {
  color: var(--text); font-weight: 600; font-size: 13px;
  font-variant-numeric: tabular-nums; font-family: var(--mono);
}
.toolbar .counts .warn b { color: var(--warn); }
/* Filters read as one designed cluster rather than three OS dropdowns. */
.filters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.filters select {
  width: auto; height: 30px; font: 500 12.5px/1 var(--ui);
  padding: 0 26px 0 10px; border-radius: var(--r);
  border: 1px solid var(--line-2); background-color: var(--surface); color: var(--text-2);
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238A9496' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  max-width: 190px; text-overflow: ellipsis;
}
.filters select:hover { background-color: var(--raised); color: var(--text); }
/* A filter that is actually doing something says so. */
.filters select.on {
  background-color: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23F7C74E' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
}
.filters .clear {
  height: 30px; display: inline-flex; align-items: center; padding: 0 9px;
  font: 500 12.5px/1 var(--ui); color: var(--text-3); border-radius: var(--r);
}
.filters .clear:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.toggle {
  display: inline-flex; height: 30px; padding: 2px; gap: 2px;
  border: 1px solid var(--line-2); border-radius: var(--r); background: var(--raised);
}
.toggle a {
  display: inline-flex; align-items: center; gap: 5px;
  font: 500 12.5px/1 var(--ui); padding: 0 10px; color: var(--text-3); border-radius: 4px;
}
.toggle a:hover { color: var(--text); text-decoration: none; }
.toggle a[aria-current="page"] {
  background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 2px rgba(23,36,40,.08);
}
.toggle svg { flex: none; }

.lede { font-size: 13.5px; color: var(--text-2); max-width: 72ch; margin: -6px 0 20px; line-height: 1.6; }

.board { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 40px; align-items: flex-start; }
.col { flex: 0 0 262px; background: var(--raised); border-radius: 5px; }
.col > header {
  display: flex; align-items: center; gap: 7px; padding: 9px 10px 8px 12px;
}
.col h2 { font: 600 11px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.col .n {
  margin-left: auto; font: 500 11px/1 var(--mono); color: var(--text-3);
  background: var(--surface); border-radius: 9px; padding: 3px 7px;
}
.col-add {
  width: 22px; height: 22px; border-radius: 4px; display: grid; place-items: center;
  color: var(--text-3); font-size: 16px; line-height: 1; flex: none;
}
.col-add:hover { background: var(--text); color: var(--bg); text-decoration: none; }
.col .cards { display: grid; gap: 7px; padding: 0 8px 10px; min-height: 30px; }
.col .empty { color: var(--text-3); font-size: 12px; padding: 12px 4px; text-align: center; }

.tcard {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: 4px; padding: 10px 11px; color: var(--text);
}
.tcard:hover { border-color: var(--line-2); box-shadow: var(--shadow); text-decoration: none; }
.tcard .top { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.tcard .title { font: 600 13px/1.35 var(--ui); word-break: break-word; margin-bottom: 9px; }
.tcard .foot { display: flex; align-items: center; gap: 6px; }
.tcard .foot .spacer { flex: 1; }

/* list view */
.tbl-wrap { border: 1px solid var(--line); border-radius: 5px; background: var(--surface); overflow-x: auto; margin-bottom: 40px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; font: 600 10.5px/1.3 var(--ui); letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  background: var(--raised);
}
td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--raised); }
tr.inactive { opacity: .45; }
td select { font-size: 12.5px; padding: 5px 7px; width: auto; }

/* ================================================================= ticket */

.crumbs { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); padding-block: 0 2px; }
.ticket { display: grid; grid-template-columns: minmax(0,1fr) 314px; gap: 28px; padding-block: 10px 20px; align-items: start; }
.t-title { font-size: 23px; line-height: 1.25; letter-spacing: -.01em; margin: 6px 0 14px; word-break: break-word; }
.t-title .plat { font: 600 10px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); vertical-align: middle; margin-left: 8px; }

.panel { border: 1px solid var(--line); border-radius: 5px; background: var(--surface); margin-bottom: 16px; }
.panel > header {
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  font: 700 11px/1 var(--ui); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3);
  display: flex; align-items: center; gap: 8px;
}
.panel .body { padding: 14px; }
.panel .body > :first-child { margin-top: 0; }
.panel .body > :last-child { margin-bottom: 0; }

/* status control — the thing everyone touches */
.status-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.status-now { display: flex; align-items: center; gap: 8px; }
.status-now .lbl { font: 600 11px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.move-menu { position: relative; }
.move-btn { background: var(--joe-ink); color: #fff; border-color: var(--joe-ink); font-weight: 700; }
.move-btn:hover { background: #0B1214; }
.move-list {
  position: absolute; top: calc(100% + 5px); left: 0; z-index: 40; min-width: 268px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 5px;
  box-shadow: 0 12px 34px -12px rgba(23,36,40,.45); overflow: hidden;
}
.move-list button {
  display: block; width: 100%; text-align: left; border: none; background: none;
  padding: 10px 13px; cursor: pointer; font: 600 13px/1.35 var(--ui); color: var(--text);
  border-bottom: 1px solid var(--line);
}
.move-list button:last-child { border-bottom: none; }
.move-list button:hover:not([disabled]) { background: var(--raised); }
.move-list button[disabled] { cursor: not-allowed; color: var(--text-3); font-weight: 400; }
.move-list .why { display: block; font: 400 11.5px/1.4 var(--ui); color: var(--text-3); margin-top: 3px; }

.move-form { border: 1px solid var(--focus); border-radius: 5px; padding: 14px; background: var(--surface); margin-bottom: 16px; }
.move-form h3 { font-size: 14px; margin-bottom: 4px; }
.move-form .hint { font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; }
.move-form .row { display: flex; gap: 8px; margin-top: 10px; }

.waiting {
  display: flex; align-items: center; gap: 9px; padding: 11px 13px;
  background: var(--info-bg); color: var(--info); border-radius: 5px; margin-bottom: 16px; font-size: 13px;
}
.waiting b { font-weight: 700; }

/* details sidebar */
.side .panel .body { padding: 4px 14px 14px; }
.frow { display: grid; grid-template-columns: 94px 1fr; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.frow:last-child { border-bottom: none; }
.frow dt { font: 600 11px/1.3 var(--ui); color: var(--text-3); }
.frow dd { margin: 0; font-size: 13px; min-width: 0; word-break: break-word; }
.frow dd a { word-break: break-all; }
.person { display: flex; align-items: center; gap: 7px; }
.frow select { font-size: 12.5px; padding: 5px 7px; }

/* versions */
.vlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vrow { display: flex; align-items: center; gap: 9px; font-size: 13px; flex-wrap: wrap; }
.vrow .who { color: var(--text-3); font-size: 12px; }

.copyblock {
  border-left: 3px solid var(--joe-yellow); background: var(--raised);
  padding: 11px 13px; border-radius: 0 4px 4px 0; margin-bottom: 10px;
}
.copyblock .meta { font: 600 10.5px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 7px; }
.copyblock p { margin: 0; white-space: pre-wrap; font-size: 13.5px; line-height: 1.6; }

/* activity: comments + history, tabbed */
.tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); padding: 0 14px; }
.tabs button {
  border: none; background: none; cursor: pointer; padding: 10px 11px;
  font: 600 12.5px/1 var(--ui); color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--joe-ink); }

.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 15px; }
.feed li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.fmeta { font-size: 12.5px; color: var(--text-3); margin-bottom: 3px; }
.fmeta b { color: var(--text); font-weight: 700; }
.fbody { font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.fchange { font-size: 13px; color: var(--text-2); }
.fchange .pill { vertical-align: middle; }

.comment-box { display: grid; grid-template-columns: 28px 1fr; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.comment-box .row { display: flex; gap: 8px; margin-top: 8px; }

/* ================================================================= misc */

.msg { padding: 56px 20px; text-align: center; max-width: 46ch; margin: 0 auto; }
.msg h1 { font-size: 19px; }
.msg p { color: var(--text-2); margin-top: 8px; }
.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: var(--joe-ink); color: #fff; padding: 11px 17px; border-radius: 5px;
  font-size: 13.5px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); z-index: 200; max-width: min(520px, 92vw);
}
.toast.bad { background: var(--bad); }

/* ------------------------------------------------------------ notifications
   The bell sits beside the wordmark and opens a panel. Turning on device
   alerts lives inside it, because that is where you go when you want to be
   told about things. */

.bell-wrap { position: relative; flex: none; }
.bell {
  width: 30px; height: 30px; border-radius: var(--r); cursor: pointer;
  display: grid; place-items: center; position: relative;
  border: 1px solid transparent; background: none; color: var(--text-3);
}
.bell:hover { background: var(--raised); color: var(--text); border-color: var(--line); }
.bell[aria-expanded="true"] { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.bell-dot {
  position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--joe-magenta); box-shadow: 0 0 0 2px var(--sidebar);
}

.bell-panel {
  position: absolute; top: calc(100% + 8px); left: -6px; z-index: 70; width: 348px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.bell-panel > header, .bell-panel > footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; font-size: 13px;
}
.bell-panel > header { border-bottom: 1px solid var(--line); }
.bell-panel > header b { font-weight: 600; }
.bell-panel > footer { border-top: 1px solid var(--line); justify-content: center; }
.bell-panel #bell-list { max-height: 340px; overflow-y: auto; }
.bell-empty { padding: 26px 14px; text-align: center; color: var(--text-3); font-size: 12.5px; margin: 0; }

/* turning on device alerts */
.push-row {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border-bottom: 1px solid var(--line); background: var(--raised);
}
.push-copy { flex: 1; min-width: 0; }
.push-copy b { display: block; font: 600 12.5px/1.3 var(--ui); }
.push-copy span { display: block; font-size: 11.5px; color: var(--text-3); line-height: 1.45; margin-top: 2px; }
.push-row.on { background: var(--ok-bg); }
.push-row.on .push-copy b { color: var(--ok); }
.push-row.blocked { background: var(--warn-bg); }
.push-row.blocked .push-copy b { color: var(--warn); }
.push-row .btn[disabled] { opacity: 1; background: none; border-color: transparent; color: inherit; font-weight: 600; }

.notif {
  display: block; padding: 11px 13px; border-bottom: 1px solid var(--line);
  color: var(--text); background: var(--surface);
}
.notif:last-child { border-bottom: none; }
.notif:hover { background: var(--raised); text-decoration: none; }
.notif.unread { box-shadow: inset 3px 0 0 var(--joe-magenta); }
.notif b { display: block; font-size: 13px; font-weight: 600; }
.notif p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.notif .when { display: block; margin-top: 4px; font-size: 11px; color: var(--text-3); }
.stack { display: grid; gap: 8px; padding-bottom: 40px; }
.stack .notif { border: 1px solid var(--line); border-radius: var(--r); }



/* login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--joe-yellow); }
.login { width: min(384px, 100%); background: var(--surface); border-radius: 6px; box-shadow: 0 18px 46px -18px rgba(23,36,40,.55); overflow: hidden; }
.login .top { background: var(--joe-ink); padding: 24px 26px; }
.login .top .logo { font-size: 34px; color: var(--joe-yellow); }
.login .top .logo span { color: #C6CACB; }
.login form { padding: 22px 26px 26px; display: grid; gap: 14px; }
.login button { width: 100%; justify-content: center; padding: 11px; }
.login .err { background: var(--bad-bg); color: var(--bad); padding: 10px 12px; border-radius: 4px; font-size: 13px; line-height: 1.5; }

/* intake */
.intake-form {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  padding: 20px; display: grid; gap: 18px;
}
.form-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-top: 16px; border-top: 1px solid var(--line);
}
.form-actions .hint { margin: 0; font-size: 12.5px; color: var(--text-3); }
.field .help { margin: 6px 0 0; font-size: 12px; color: var(--text-3); }
.field label .opt { font-weight: 400; color: var(--text-3); text-transform: none; letter-spacing: 0; }
.readout { border: 1px solid var(--line); border-left: 3px solid var(--joe-yellow); border-radius: 0 4px 4px 0; background: var(--raised); padding: 12px 14px; display: grid; gap: 10px; }
.readout-main { display: flex; align-items: center; gap: 11px; }
.plat-dot { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--text); color: var(--bg); font: 600 10.5px/1 var(--ui); }
.readout .who { font: 700 15px/1.2 var(--ui); word-break: break-all; }
.readout .whence { font: 400 11.5px/1.4 var(--mono); color: var(--text-3); margin-top: 2px; word-break: break-all; }
.history { display: flex; gap: 6px; flex-wrap: wrap; }
.history:empty { display: none; }
.h-tag { font: 600 11px/1 var(--ui); padding: 5px 8px; border-radius: 3px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); }
.h-tag.new { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.h-tag.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.h-tag.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { font: 600 12.5px/1 var(--ui); padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 4px; cursor: pointer; background: var(--surface); color: var(--text-2); }
.chip:hover { background: var(--raised); color: var(--text); }
.chip[aria-checked="true"] { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.submit-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.kbd-hint { font-size: 12px; color: var(--text-3); }
kbd { font: 600 10.5px/1 var(--mono); background: var(--raised); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 3px; padding: 3px 5px; margin-right: 2px; color: var(--text-2); }
.added { margin-top: 26px; padding-bottom: 44px; }
.added-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; margin-bottom: 6px; font-size: 13px; }
.added-row.fresh { border-color: var(--ok); background: var(--ok-bg); }
.added-row .h { font-weight: 700; word-break: break-all; }
.added-row .btn { margin-left: auto; }
.added .none { color: var(--text-3); font-size: 13px; }
.section-label { font: 700 11px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin: 26px 0 11px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(216px, 1fr)); gap: 10px; }
.role-card { background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 14px 15px; }
.role-card h3 { font-size: 13px; }
.role-blurb { font-size: 12px; color: var(--text-3); margin: 6px 0 10px; line-height: 1.5; }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 20px; align-items: start; }

@media (max-width: 940px) {
  .ticket { grid-template-columns: 1fr; gap: 18px; }
  .side { order: -1; }
}
@media (max-width: 620px) {
  .wrap { padding-inline: 14px; }
  .searchbar { flex-basis: 100%; order: 3; }
  .grid-2 { grid-template-columns: 1fr; }
  .feed li, .comment-box { grid-template-columns: 1fr; }
  .feed li > .avatar, .comment-box > .avatar { display: none; }
}

/* ================================================================= modal
   The ticket opens over the board rather than navigating away, so you keep
   your place in the list. The URL still changes, so a copied link works. */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14,23,25,.55);
  display: grid; place-items: start center;
  padding: 40px 20px;
  overflow-y: auto;
  backdrop-filter: blur(1.5px);
}
.modal-shell {
  width: min(1060px, 100%);
  background: var(--bg);
  border-radius: 8px;
  box-shadow: 0 26px 70px -20px rgba(0,0,0,.55);
  overflow: hidden;
  animation: modal-in .14s ease-out;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal-shell { animation: none; } }

.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2;
}
.modal-head .vkey { font-size: 12.5px; }
.modal-head .spacer { flex: 1; }
.modal-close {
  border: none; background: none; cursor: pointer; color: var(--text-3);
  width: 30px; height: 30px; border-radius: 4px; display: grid; place-items: center; font-size: 19px; line-height: 1;
}
.modal-close:hover { background: var(--raised); color: var(--text); }
.modal-body { padding: 0 22px 22px; }
.modal-body .ticket { padding-block: 18px 6px; grid-template-columns: minmax(0,1fr) 292px; }
.modal-body .intake-form { margin-top: 18px; }
.modal-body .toolbar { padding-top: 18px; }
.modal-loading { padding: 60px 20px; text-align: center; color: var(--text-3); font-size: 13.5px; }
.modal-shell.loading .modal-body { min-height: 200px; }

@media (max-width: 940px) {
  .modal-backdrop { padding: 0; }
  .modal-shell { border-radius: 0; min-height: 100vh; width: 100%; }
  .modal-body .ticket { grid-template-columns: 1fr; }
}

/* ================================================== full-screen board
   The board fills the window and the columns scroll inside it, so the header
   and the column titles stay put while you work down a long list. */

/* The board fills the content pane. The explicit width matters: a flex item is
   otherwise at least as wide as its min-content, which here is every column
   track added together — and then nothing scrolls, it just clips. */
body.app-board .main > .board-wrap {
  flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column;
  width: 100%; max-width: 100%; overflow: hidden;
  padding: 18px 20px 0;
}
body.app-board .main > .board-wrap .board {
  flex: 1; min-height: 0; min-width: 0; width: auto;
  overflow-x: auto; overflow-y: hidden;
  padding-bottom: 10px; align-items: stretch;
  scrollbar-width: thin;
}
body.app-board .board::-webkit-scrollbar { height: 10px; }
body.app-board .board::-webkit-scrollbar-thumb {
  background: var(--line-2); border-radius: 5px; border: 3px solid var(--bg);
}
body.app-board .board::-webkit-scrollbar-track { background: transparent; }
/* The last column needs room to clear the window edge. */
body.app-board .board::after { content: ''; flex: 0 0 8px; }
body.app-board .col { display: flex; flex-direction: column; min-height: 0; }
body.app-board .col .cards { flex: 1; min-height: 0; overflow-y: auto; align-content: start; }

/* The list view keeps a readable measure; the board does not. */
.board-wrap { max-width: none; }

/* ------------------------------------------------------- date navigator
   One control, not four: arrows, the day itself, and a menu behind it for
   Today / Tomorrow / a specific date / all dates. */

.datenav { display: flex; align-items: center; gap: 0; flex: none; }
.datenav .arrow {
  width: 28px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2);
  font-size: 15px; line-height: 1; cursor: pointer;
}
.datenav .arrow:first-child { border-radius: var(--r) 0 0 var(--r); }
.datenav .arrow:last-child { border-radius: 0 var(--r) var(--r) 0; border-left: none; }
.datenav .arrow:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.toggle a[aria-current="page"] { box-shadow: 0 1px 2px rgba(23,31,34,.07); }

.dpick { position: relative; }
.date-btn {
  height: 30px; display: flex; align-items: center; gap: 7px;
  padding: 0 11px; border: 1px solid var(--line-2); border-inline: none;
  background: var(--surface); color: var(--text); cursor: pointer;
  font: 600 13px/1 var(--ui); white-space: nowrap;
}
.date-btn:hover { background: var(--raised); }
.date-btn .sub { font-weight: 400; color: var(--text-3); font-variant-numeric: tabular-nums; }
.date-btn .caret { color: var(--text-3); font-size: 10px; }

.dmenu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 50; width: 216px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: var(--shadow-lg); overflow: hidden; padding: 5px;
}
.dmenu a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 9px; border-radius: 4px; color: var(--text); font-size: 13px;
}
.dmenu a:hover { background: var(--raised); text-decoration: none; }
.dmenu a.on { background: var(--text); color: var(--bg); }
.dmenu a .cnt { font: 500 11.5px/1 var(--mono); opacity: .65; }
.dmenu .rule { height: 1px; background: var(--line); margin: 5px 3px; }
.dmenu .pickrow { padding: 3px; }
.dmenu input[type="date"] { font-size: 12.5px; padding: 7px 8px; }

/* ------------------------------------------------------------ drag & drop */

.tcard[draggable="true"] { cursor: grab; }
.tcard[draggable="true"]:active { cursor: grabbing; }
.tcard.dragging { opacity: .4; cursor: grabbing; }

/* While a drag is in flight, say plainly where it can and cannot go. */
.board.dragging .col { transition: opacity .12s ease; }
.board.dragging .col[data-drop="no"] { opacity: .32; }
.board.dragging .col[data-drop="yes"] .cards {
  outline: 2px dashed var(--ok); outline-offset: -3px; border-radius: 4px; background: var(--ok-bg);
}
.board.dragging .col[data-drop="yes"].over .cards { background: var(--ok-bg); outline-style: solid; }
.board.dragging .col[data-drop="blocked"] .cards {
  outline: 2px dashed var(--bad); outline-offset: -3px; border-radius: 4px;
}
.col .drop-note {
  font: 600 10.5px/1.35 var(--ui); text-align: center; padding: 7px 8px;
  color: var(--text-3);
}
.col[data-drop="yes"] .drop-note { color: var(--ok); }
.col[data-drop="blocked"] .drop-note { color: var(--bad); }

/* ==================================================== copy editor
   The copy is direction for the video editor: which words carry the emphasis
   and how big each line sits on screen. So it is written as formatted text,
   and rendered the same way wherever it is read back. */

.copy-editor { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.copy-editor:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }

.ce-tools {
  display: flex; align-items: center; gap: 3px; flex-wrap: wrap;
  padding: 6px 7px; border-bottom: 1px solid var(--line); background: var(--raised);
}
.ce-tools .spacer { flex: 1; }
.ce-div { width: 1px; align-self: stretch; background: var(--line-2); margin-inline: 4px; }
.ce-sizes { display: inline-flex; gap: 2px; }

.ce-btn {
  border: 1px solid transparent; background: none; cursor: pointer; color: var(--text-2);
  font: 500 12px/1 var(--ui); padding: 6px 8px; border-radius: 4px; min-width: 28px;
}
.ce-btn:hover { background: var(--surface); border-color: var(--line-2); color: var(--text); }
.ce-btn.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.ce-fmt.is-b { font-weight: 700; }
.ce-fmt.is-i { font-style: italic; font-family: Georgia, serif; }
.ce-fmt.is-u { text-decoration: underline; }
.ce-fmt.is-s { text-decoration: line-through; }
.ce-size { font-size: 11.5px; }
.ce-size.sz-l { font-weight: 700; }
.ce-size.sz-s { font-size: 10.5px; }

.ce-count { font: 500 11.5px/1 var(--mono); color: var(--text-3); padding-right: 4px; }
.ce-count.near { color: var(--warn); }
.ce-count.over { color: var(--bad); font-weight: 700; }

.ce-emoji {
  display: flex; flex-wrap: wrap; gap: 2px; padding: 7px;
  border-bottom: 1px solid var(--line); background: var(--surface); max-height: 128px; overflow-y: auto;
}
.ce-emoji-btn {
  border: none; background: none; cursor: pointer; font-size: 17px; line-height: 1;
  width: 30px; height: 30px; border-radius: 4px;
}
.ce-emoji-btn:hover { background: var(--raised); }

.ce-surface {
  padding: 14px 14px 16px; min-height: 108px; max-height: 340px; overflow-y: auto;
  outline: none; background: var(--surface);
}
.ce-surface > div { margin: 0 0 6px; }
.ce-surface > div:last-child { margin-bottom: 0; }

/* One size scale, shared by the editor surface and the rendered copy. */
.ce-surface > div[data-size="l"], .rt-l { font-size: 21px; line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.ce-surface > div[data-size="m"], .rt-m { font-size: 15px; line-height: 1.5; }
.ce-surface > div[data-size="s"], .rt-s { font-size: 12.5px; line-height: 1.5; color: var(--text-2); }

.ce-foot {
  border-top: 1px solid var(--line); background: var(--raised);
  padding: 7px 11px; font-size: 11.5px; color: var(--text-3);
}
.ce-lines-info.warn { color: var(--warn); }

/* Rendered copy, wherever it is read back. */
.copy-body.rich { margin: 0; }
.copy-body.rich .rt { margin: 0 0 5px; }
.copy-body.rich .rt:last-child { margin-bottom: 0; }
.copy-body.rich strong { font-weight: 700; }
.copy-body.rich u { text-underline-offset: 2px; }

/* ------------------------------------------------------- mentions & slots */

.mention {
  background: var(--info-bg); color: var(--info);
  border-radius: 3px; padding: 1px 4px; font-weight: 600; white-space: nowrap;
}

.slot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slot .person { flex: 1; min-width: 0; }

.mention-wrap { position: relative; }
.mention-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 60; width: 260px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: var(--shadow-lg); overflow: hidden; padding: 4px;
}
.mention-opt {
  display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left;
  border: none; background: none; cursor: pointer; padding: 7px 9px; border-radius: 4px;
  font: 400 13px/1.3 var(--ui); color: var(--text);
}
.mention-opt:hover, .mention-opt.on { background: var(--raised); }
.mention-opt.on { font-weight: 600; }
.mo-name { flex: none; }
.mo-role { font-size: 11.5px; color: var(--text-3); margin-left: auto; }
.push-actions { display: flex; gap: 6px; flex: none; }

/* The push self-check, shown after a test so the answer is specific. */
.push-diag { padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.push-diag ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.push-diag li { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.push-diag li span {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; font-size: 9px; color: #fff;
}
.push-diag li.ok span { background: var(--ok); }
.push-diag li.ok span::after { content: '✓'; }
.push-diag li.no span { background: var(--bad); }
.push-diag li.no span::after { content: '✕'; }
.push-diag li.no { color: var(--text); font-weight: 600; }
.diag-advice {
  margin: 9px 0 0; padding: 8px 9px; background: var(--warn-bg); color: var(--warn);
  border-radius: 4px; font-size: 12px; line-height: 1.45;
}

/* ------------------------------------------------------------- profile */

.sn-me {
  display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0;
  padding: 5px 6px; margin: -5px -6px; border-radius: var(--r); color: inherit;
}
.sn-me:hover { background: var(--raised); text-decoration: none; }
.sn-me.on { background: var(--raised); }

.profile-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 18px;
}
.ph-name { font: 600 17px/1.3 var(--ui); letter-spacing: -.015em; }
.ph-role { font-size: 13px; color: var(--text-2); margin-top: 1px; }
.ph-blurb { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }

.pref {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.pref:last-of-type { border-bottom: none; }
.pref.sub { padding-left: 18px; border-left: 2px solid var(--line); margin-left: 2px; }
.pref.off { opacity: .45; }
.pref-copy { flex: 1; min-width: 0; }
.pref-copy b { display: block; font: 600 13.5px/1.35 var(--ui); }
.pref-copy span { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; line-height: 1.45; }

.switch { position: relative; flex: none; width: 38px; height: 22px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span {
  position: absolute; inset: 0; border-radius: 11px;
  background: var(--line-2); transition: background .15s ease; pointer-events: none;
}
.switch span::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform .15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--focus-ring); }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + span { opacity: .5; }

/* An empty first column offers the action rather than showing a dash, so a
   quiet day is never a dead end. */
.col-empty-add {
  display: block; text-align: center; padding: 14px 10px;
  border: 1px dashed var(--line-2); border-radius: var(--r);
  font: 500 12.5px/1.4 var(--ui); color: var(--text-3); background: var(--surface);
}
.col-empty-add:hover {
  border-color: var(--text-3); color: var(--text); text-decoration: none;
  border-style: solid;
}

/* ------------------------------------------------------ licensing check */

.lic-lead { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.55; }

.lic-list {
  list-style: none; margin: 14px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px;
}
.lic-list li { display: flex; min-width: 0; }
.lic-list a {
  display: block; flex: 1; min-width: 0;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r);
  color: var(--text); background: var(--surface);
}
.lic-list a:hover { border-color: var(--line-2); background: var(--raised); text-decoration: none; }
.lic-name {
  display: block; font-size: 12.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lic-name::after { content: ' \2197'; color: var(--text-3); font-size: 10.5px; }
.lic-note {
  display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.lic-record {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  display: grid; gap: 9px;
}

/* The status is the first thing you want off this panel. */
.panel.licence > header { justify-content: flex-start; gap: 10px; }
.panel.licence > header .pill { margin-left: auto; }
