/* =========================================================
   Pipeline — "Copy desk" theme, v2
   White chrome on top, each publication's board on its own
   colored canvas, headlines in an editorial serif.
   ========================================================= */
:root {
  --bg: #e9ecef;
  --surface: #ffffff;
  --sunken: #f4f6f8;
  --list: #f1f2f4;        /* list (column) surface on the canvas */
  --col: #dfe3e8;
  --text: #172b3a;
  --muted: #5e6b78;
  --faint: #8a95a1;
  --line: #d5dae0;
  --line-soft: #e8ebef;

  /* default accent (non-board pages); boards override below */
  --accent: #0e6e6b;
  --accent-strong: #0a5754;
  --accent-soft: #e2f1f0;
  --accent-ink: #ffffff;
  --brand-line: #0e6e6b;
  --canvas: radial-gradient(circle at 1px 1px, rgba(255,255,255,.075) 1px, transparent 0) 0 0 / 22px 22px,
    radial-gradient(1100px 620px at 8% -12%, rgba(32,150,140,.42), transparent 62%),
    radial-gradient(900px 520px at 105% 115%, rgba(32,150,140,.16), transparent 60%),
    linear-gradient(160deg, #183236, #0f2124);

  --danger: #c0352f;
  --danger-strong: #9f2520;
  --danger-soft: #fdeeed;
  --ok: #1f9d55;
  --busy: #d08a12;

  /* card states (meanings unchanged) */
  --skipped: #fbe7e6;     --skipped-line: #e05a54;
  --pitch: #efe9fb;       --pitch-line: #8b6fd6;
  --approved: #e6eefb;    --approved-line: #4f7fd9;
  --rfe: #fbf3d0;         --rfe-line: #d4a514;
  --scheduled: #e2f4e8;   --scheduled-line: #2f9e5b;
  --checkdaily: #ffffff;  --checkdaily-line: #9aa5b1;
  --needswork: #fcebd9;   --needswork-line: #e58e3c;
  --fixes: #fde3e1;       --fixes-line: #c93c37;

  --font-ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Newsreader", Georgia, "Times New Roman", serif;

  --r-sm: 6px;
  --r: 8px;
  --r-card: 10px;
  --r-col: 14px;
  --r-lg: 16px;

  --shadow-card: 0 1px 1px rgba(9, 30, 66, .2), 0 0 1px rgba(9, 30, 66, .25);
  --shadow-lift: 0 8px 20px -6px rgba(9, 30, 66, .35), 0 0 1px rgba(9, 30, 66, .3);
  --shadow-pop: 0 20px 50px -12px rgba(9, 30, 66, .4), 0 0 0 1px rgba(9, 30, 66, .07);
  --ease: cubic-bezier(.2, .7, .2, 1);

  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* each publication gets its own canvas + accent */
body[data-board="wgtc"] {
  --canvas: radial-gradient(circle at 1px 1px, rgba(255,255,255,.075) 1px, transparent 0) 0 0 / 22px 22px,
    radial-gradient(1100px 620px at 8% -12%, rgba(255,83,5,.42), transparent 62%),
    radial-gradient(900px 520px at 105% 115%, rgba(255,120,40,.16), transparent 60%),
    linear-gradient(160deg, #2f1e17, #1a110d);
  --accent: #c2410c; --accent-strong: #9a3412; --accent-soft: #fdeee6; --brand-line: #ff5305;
}
body[data-board="aotf"] {
  --canvas: radial-gradient(circle at 1px 1px, rgba(255,255,255,.075) 1px, transparent 0) 0 0 / 22px 22px,
    radial-gradient(1100px 620px at 8% -12%, rgba(46,94,173,.55), transparent 62%),
    radial-gradient(900px 520px at 105% 115%, rgba(254,3,86,.14), transparent 60%),
    linear-gradient(160deg, #18223a, #0e1424);
  --accent: #2e5ead; --accent-strong: #234a8a; --accent-soft: #e8eef9; --brand-line: #2e5ead;
}
body[data-board="tms"] {
  --canvas: radial-gradient(circle at 1px 1px, rgba(255,255,255,.075) 1px, transparent 0) 0 0 / 22px 22px,
    radial-gradient(1100px 620px at 8% -12%, rgba(252,206,68,.22), transparent 62%),
    radial-gradient(900px 520px at 105% 115%, rgba(72,97,131,.35), transparent 60%),
    linear-gradient(160deg, #1d2b33, #11191e);
  --accent: #2f4a58; --accent-strong: #22363f; --accent-soft: #eaeff2; --brand-line: #fcce44;
}
body[data-board="os-curveball"] {
  --canvas: radial-gradient(circle at 1px 1px, rgba(255,255,255,.075) 1px, transparent 0) 0 0 / 22px 22px,
    radial-gradient(1100px 620px at 8% -12%, rgba(35,150,85,.45), transparent 62%),
    radial-gradient(900px 520px at 105% 115%, rgba(35,150,85,.15), transparent 60%),
    linear-gradient(160deg, #16281e, #0c1812);
  --accent: #1b6e3d; --accent-strong: #14532d; --accent-soft: #e5f2ea; --brand-line: #1b6e3d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); display: flex; flex-direction: column; }
body.board-page { background: var(--canvas); background-attachment: fixed; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
textarea { resize: vertical; }
h1, h2, h3 { line-height: 1.25; }
::selection { background: color-mix(in srgb, var(--accent) 22%, white); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

input, select, textarea {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px 10px;
  background-color: var(--surface); width: 100%; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
input:hover, select:hover, textarea:hover { border-color: #b9c1ca; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
select {
  appearance: none; padding-right: 30px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235e6b78' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
}
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; padding: 0; }
input[type="checkbox"]:focus { box-shadow: none; }
.over, textarea.over, input.over { border-color: var(--danger) !important; color: var(--danger); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.error { color: var(--danger); margin: 8px 0 0; }
.empty { padding: 48px; color: #fff; }
.empty .error { color: #fff; font-weight: 600; }

.icon { width: 16px; height: 16px; flex-shrink: 0; vertical-align: -3px; }
.icon.sm { width: 13px; height: 13px; vertical-align: -2px; }

/* ---------- buttons ---------- */
button {
  cursor: pointer; border-radius: var(--r); border: 1px solid transparent; padding: 7px 13px; white-space: nowrap;
  background: var(--sunken); font-weight: 500; line-height: 1.2;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
button:hover { background: var(--col); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .55; cursor: default; transform: none; }
button.primary { background: var(--accent); color: var(--accent-ink); }
button.primary:hover { background: var(--accent-strong); }
button.danger-solid { background: var(--danger); color: #fff; }
button.danger-solid:hover { background: var(--danger-strong); }
button.ghost, .btnlike {
  background: var(--surface); border: 1px solid var(--line); padding: 7px 12px; border-radius: var(--r);
  text-decoration: none; color: var(--text); display: inline-flex; align-items: center; gap: 6px;
  font-weight: 500; line-height: 1.2; transition: background-color .15s, border-color .15s;
}
button.ghost:hover, .btnlike:hover { background: var(--sunken); border-color: #c3cad2; }
button.ghost.on { background: var(--text); color: #fff; border-color: var(--text); }
button.danger { background: transparent; color: var(--danger); border-color: #ecc3c0; }
button.danger:hover { background: var(--danger-soft); }
button.link { background: none; border: 0; padding: 2px 4px; color: var(--accent); font-weight: 500; }
button.link:hover { text-decoration: underline; background: none; }
button.wide { width: 100%; justify-content: center; }
.icon-btn {
  width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 10px; color: var(--muted);
}
.icon-btn:hover { background: var(--sunken); color: var(--text); }
.icon-btn .icon { width: 19px; height: 19px; }
.btn-xs { font-size: 12px !important; padding: 4px 9px !important; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 20px; padding: 0 18px; min-height: 62px; background: var(--surface);
  border-top: 3px solid var(--brand-line); box-shadow: 0 1px 0 rgba(9, 30, 66, .1), 0 4px 16px -8px rgba(9, 30, 66, .25);
  flex-wrap: nowrap; position: relative; z-index: 20; transition: border-color .4s ease;
}
.tb-left, .tb-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.tb-left { min-width: 0; flex-shrink: 1; }
.tb-right { margin-left: auto; gap: 6px; }
.brand {
  font-family: var(--font-head); font-weight: 600; font-size: 22px; letter-spacing: -.015em;
  color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 9px; padding-right: 14px;
  border-right: 1px solid var(--line-soft);
}
.brand::before { content: ""; width: 26px; height: 26px; flex-shrink: 0; background: url("/favicon.svg") center / contain no-repeat; }
.board-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* board picker */
.board-picker { position: relative; }
#boardSwitcher { display: none !important; }
.board-picker { min-width: 0; }
.board-picker-btn {
  max-width: 100%; display: inline-flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; background: transparent;
  border: 1px solid transparent; border-radius: 12px; cursor: default;
}
.board-picker-btn:hover { background: transparent; }
.board-picker-btn:active { transform: none; }
.board-picker-btn .chev { display: none; color: var(--muted); }
.board-picker-btn.can-switch { cursor: pointer; }
.board-picker-btn.can-switch:hover { background: var(--sunken); border-color: var(--line-soft); }
.board-picker-btn.can-switch .chev { display: inline; }
/* full logo in a chip, sized by height so wide wordmarks (AOTF, OS) stay legible */
.board-mark {
  height: 38px; min-width: 38px; border-radius: 10px; background: #fff; border: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: center; padding: 7px 10px; font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.board-mark img { height: 100%; width: auto; max-width: 118px; object-fit: contain; display: block; }
body[data-board="tms"] .board-mark { background: #1d2b33; border-color: #1d2b33; }
body[data-board="os-curveball"] .board-mark img { height: 70%; }
.menu-label { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 10px 8px; }
.menu.board-menu { max-width: calc(100vw - 16px); width: 340px; }
#boardMenuList { display: grid; gap: 2px; }
.menu .board-opt { gap: 14px; padding: 8px; border-radius: 10px; position: relative; }
.board-logo { width: 104px; height: 44px; border-radius: 8px; background: #fff; border: 1px solid var(--line-soft); display: grid; place-items: center; padding: 7px 10px; flex-shrink: 0; }
.board-logo.dark { background: #1d2b33; border-color: #1d2b33; }
.board-logo img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.board-opt-name { font-weight: 600; font-size: 13.5px; line-height: 1.3; white-space: normal; }
.menu .board-opt.on { background: var(--accent-soft); }
.board-opt.on::after {
  content: ""; position: absolute; right: 12px; width: 16px; height: 16px; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* presence */
.roster { display: flex; align-items: center; gap: 10px; flex: 1 1 0; min-width: 0; justify-content: center; overflow: hidden; padding: 4px 0; }
.who-stack { display: flex; align-items: center; }
.roster-btn { display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border-radius: 999px; background: transparent; border: 1px solid transparent; }
.roster-btn:hover { background: var(--sunken); border-color: var(--line-soft); }
.roster-btn:active { transform: none; }
.who { position: relative; text-decoration: none; color: inherit; margin-left: -8px; display: inline-block; }
.who-stack .who:first-child { margin-left: 0; }
.who-av {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  background: #e3e8ee; color: #334454; border: 2px solid var(--surface);
}
.who.avail .who-av { background: var(--accent-soft); color: var(--accent-strong); }
.who.off .who-av { opacity: .55; }
.who i { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #b4bcc6; border: 2px solid var(--surface); }
.who.avail i { background: var(--ok); }
.who.busy i { background: var(--busy); }
.roster-sum { color: var(--muted); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.roster-sum strong { color: var(--text); font-weight: 600; }

/* availability switch */
label.avail {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; cursor: pointer; font-weight: 500;
  color: var(--muted); user-select: none; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid var(--line-soft);
  transition: background-color .2s, border-color .2s, color .2s; margin-right: 4px;
}
label.avail:hover { border-color: var(--line); }
label.avail:has(input:checked) { background: #e8f6ee; border-color: #bfe5cf; color: #136b3a; }
label.avail input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 30px; height: 17px; border-radius: 999px; background: #c3cad2; position: relative; transition: background-color .2s; flex-shrink: 0; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
label.avail input:checked + .switch-track { background: var(--ok); }
label.avail input:checked + .switch-track::after { transform: translateX(13px); }
label.avail input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }

/* account */
.account-btn { display: inline-flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; background: transparent; border: 1px solid transparent; border-radius: 999px; }
.account-btn:hover { background: var(--sunken); }
.account-btn:active { transform: none; }
.account-btn .chev { color: var(--muted); }
.account-dot { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.me { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; font-weight: 600; text-align: left; }
.me small { font-size: 11.5px; font-weight: 500; color: var(--muted); text-transform: capitalize; }

/* popover menus */
.menu {
  margin: 0; position: fixed; inset: 64px 16px auto auto; min-width: 220px; padding: 6px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-pop); color: var(--text);
}
.menu:popover-open { animation: rise .16s var(--ease); }
.menu a, .menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: var(--r);
  color: var(--text); text-decoration: none; background: none; border: 0; font-weight: 500; text-align: left;
}
.menu a:hover, .menu button:hover { background: var(--sunken); }
.menu .icon { color: var(--muted); }
.menu hr { border: 0; border-top: 1px solid var(--line-soft); margin: 6px 4px; }

/* ---------- notifications ---------- */
.notif-btn { position: relative; }
.notif-badge { background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; position: absolute; top: 2px; right: 1px; display: grid; place-items: center; border: 2px solid var(--surface); }
.notif-panel { position: absolute; top: 60px; right: 18px; width: 370px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); z-index: 100; max-height: 460px; display: flex; flex-direction: column; animation: rise .16s var(--ease); }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); font-weight: 600; font-size: 15px; }
.notif-list { overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.notif-item { padding: 10px 12px 10px 16px; border-radius: 10px; font-size: 13px; position: relative; }
.notif-item:hover { background: var(--sunken); }
a.notif-item { display: block; color: inherit; text-decoration: none; }
a.notif-item:hover { background: var(--accent-soft); }
.notif-item.unread { background: var(--accent-soft); }
.notif-item.unread::before { content: ""; position: absolute; left: 6px; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.notif-item .when { font-size: 11.5px; color: var(--muted); margin-top: 3px; display: block; }
.notif-empty { padding: 28px 10px; text-align: center; }

/* ---------- board bar (on the canvas) ---------- */
.board-bar {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px; color: #fff;
  background: rgba(0, 0, 0, .14); flex-wrap: wrap;
}
.search-bar { display: flex; gap: 8px; align-items: center; flex: 1; flex-wrap: wrap; min-width: 0; }
.search-bar input {
  width: 280px; max-width: 100%; padding: 8px 12px 8px 34px; color: #fff; border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center;
}
.search-bar input::placeholder { color: rgba(255,255,255,.78); }
.search-bar input:hover { border-color: rgba(255,255,255,.4); }
.search-bar input:focus {
  color: var(--text); border-color: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.3);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%235e6b78' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center;
}
.search-bar input:focus::placeholder { color: var(--faint); }
.bar-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: var(--r);
  background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.18); font-weight: 600;
}
.bar-btn:hover { background: rgba(255,255,255,.28); }
.bar-btn.on, .bar-btn.active { background: #fff; color: var(--text); border-color: #fff; }
.filter-dot { display: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.bar-btn.active .filter-dot { display: inline-block; }
.menu.filter-menu { max-width: calc(100vw - 16px); width: 280px; padding: 8px 12px 12px; }
.filter-menu .field { margin-bottom: 12px; }
.filter-menu .menu-label { padding-left: 0; }
.menu button.ghost { border: 1px solid var(--line); justify-content: center; }
.search-count { font-size: 12.5px; color: rgba(255,255,255,.9); font-weight: 500; }
.board-bar #tallyBtn { margin-left: auto; }

/* ---------- board ---------- */
.layout { flex: 1; display: flex; min-height: 0; }
.board {
  flex: 1; display: flex; gap: 12px; padding: 14px 18px 18px; overflow-x: auto; align-items: flex-start; min-width: 0;
  cursor: grab; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.45) transparent;
}
.board.is-panning, .board.is-panning * { cursor: grabbing !important; user-select: none; }
.board:empty::before, .board:empty::after {
  content: ""; flex: 0 0 280px; height: 360px; border-radius: var(--r-col); background: rgba(255,255,255,.2);
  animation: pulse 1.1s ease-in-out infinite alternate;
}
.board:empty::after { height: 240px; }
.column {
  flex: 0 0 280px; background: var(--list); border-radius: var(--r-col); display: flex; flex-direction: column;
  max-height: 100%; --dot: var(--faint); box-shadow: 0 1px 1px rgba(9, 30, 66, .25); cursor: auto;
}
.col-squelched { --dot: var(--skipped-line); }
.col-pitched { --dot: var(--pitch-line); }
.col-writing { --dot: var(--approved-line); }
.col-ready_for_edit { --dot: var(--rfe-line); }
.col-scheduled, .col-submitted { --dot: var(--scheduled-line); }
.col-check_daily { --dot: var(--checkdaily-line); }
.col-archive { --dot: #6b7682; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 8px 14px; cursor: grab; }
.col-head h2 { font-size: 14px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; }
.col-head h2::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--dot); }
.count { font-size: 12px; font-weight: 600; color: var(--muted); background: rgba(9,30,66,.07); padding: 2px 9px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.col-list { padding: 2px 8px 8px; overflow-y: auto; min-height: 48px; display: flex; flex-direction: column; gap: 8px; flex: 1; scrollbar-width: thin; scrollbar-color: #c1c8d0 transparent; }
.col-empty { display: none; margin: 0; padding: 16px 8px; border: 2px dashed rgba(9,30,66,.12); border-radius: var(--r-card); text-align: center; color: var(--faint); font-size: 12.5px; }
.board:has(.card.dragging) .col-empty { display: block; }
.col-list:has(.placeholder) .col-empty { display: none !important; }
.col-note { margin: 4px; font-size: 12px; color: var(--muted); text-align: center; }
.col-actions { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 4px; }
.col-btn { width: 100%; font-size: 12.5px; padding: 7px 8px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line-soft); color: var(--text); box-shadow: var(--shadow-card); }
.col-btn:hover { background: var(--accent-soft); border-color: transparent; }
.add-card { margin: 0 8px 8px; text-align: left; background: transparent; color: var(--muted); padding: 8px 10px; font-weight: 600; border-radius: var(--r); }
.add-card:hover { background: rgba(9,30,66,.08); color: var(--text); }
.add-form { padding: 0 8px 10px; }
.add-form textarea { font-family: var(--font-head); font-size: 15.5px; line-height: 1.3; box-shadow: var(--shadow-card); border-color: transparent; border-radius: var(--r-card); }
.add-form textarea:focus { border-color: var(--accent); }
.add-form .row { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.add-form .ghost { background: transparent; border-color: transparent; }
.counter { font-size: 12px; color: var(--muted); margin-left: auto; font-style: normal; font-weight: 500; font-variant-numeric: tabular-nums; }
.counter.over { color: var(--danger); font-weight: 700; }

/* ---------- cards ---------- */
.card {
  position: relative; background: var(--surface); border-radius: var(--r-card); padding: 10px 12px;
  box-shadow: var(--shadow-card); cursor: pointer; border: 0; user-select: none;
  transition: box-shadow .15s var(--ease), transform .15s var(--ease);
}
.card:hover { box-shadow: var(--shadow-card), inset 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card.dragging { opacity: .4; transform: rotate(2deg) scale(.98); }
/* status label (Trello-style): a colored bar, or a named label for states that need action */
/* named labels for states that need action sit in the label row with the tags */
.tag-badge.flag { background: var(--label); }
.card.c-pitch { --label: var(--pitch-line); }
.card.c-approved { --label: var(--approved-line); }
.card.c-rfe { --label: var(--rfe-line); }
.card.c-scheduled { --label: var(--scheduled-line); }
.card.c-checkdaily { --label: var(--checkdaily-line); }
.card.c-skipped { --label: var(--skipped-line); background: #fff8f7; }
.card.c-skipped .card-title { color: #6b5553; }
.card.c-needswork { --label: var(--needswork-line); }
.card.c-fixes { --label: var(--fixes-line); background: var(--fixes); }
.card.c-fixes .card-title { color: #5c1512; }
.card-title { font-family: var(--font-head); font-size: 15.5px; font-weight: 500; line-height: 1.3; letter-spacing: -.003em; word-break: break-word; }
.card-title.over { color: var(--danger); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 10px; }
.card-meta:has(.badges:empty):has(.avatars:empty) { display: none; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; padding: 2px 6px; border-radius: var(--r-sm); background: transparent; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.badges .badge[title="Assigned slot"] { background: var(--scheduled); color: #17603a; font-weight: 600; }
.badge.warn { background: #fde4c4; color: #7a4100; font-weight: 600; }
.avatars { display: flex; flex-shrink: 0; align-items: center; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; background: #34506b; color: #fff; font-size: 10.5px; font-weight: 700;
  display: grid; place-items: center; text-decoration: none; letter-spacing: .02em; border: 2px solid var(--surface);
}
.avatars .avatar + .avatar { margin-left: -7px; }
.avatar, .who-av, .account-dot, .u-av, .tw-av { position: relative; overflow: hidden; }
.avatar > img, .who-av > img, .account-dot > img, .u-av > img, .tw-av > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.u-who { display: flex; align-items: center; gap: 8px; }
.u-av { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: #34506b; color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.u-quota-cell { min-width: 290px; }
.u-quota-cell .day-picker { flex-wrap: nowrap; }
.u-quota-cell .day-chip span { min-width: 0; padding: 3px 6px; font-size: 11.5px; }
.u-quota-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.day-picker { display: flex; flex-wrap: wrap; gap: 4px; }
.day-chip { cursor: pointer; }
.day-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; min-width: 0 !important; padding: 0; }
.day-chip span { display: inline-block; min-width: 36px; text-align: center; padding: 4px 6px; border-radius: 7px; font-size: 12px; font-weight: 600; background: var(--sunken); color: var(--muted); border: 1px solid var(--line-soft); transition: background-color .15s, color .15s; }
.day-chip input:checked + span { background: var(--text); color: #fff; border-color: var(--text); }
.day-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.quota-field { grid-column: 1 / -1; order: 1; }
.quota-preview { margin-top: 6px; }
.avatars .avatar:nth-child(3n+2) { background: #6a4f8f; }
.avatars .avatar:nth-child(3n+3) { background: #8a5a2b; }
.placeholder { height: 48px; border-radius: var(--r-card); flex-shrink: 0; background: rgba(9,30,66,.1); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.column:has(.placeholder) { box-shadow: 0 0 0 2px rgba(255,255,255,.85), 0 8px 24px -8px rgba(0,0,0,.35); }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.tag-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; color: #fff; line-height: 1.4; }
.claim-btn { font-size: 11.5px; font-weight: 600; padding: 3px 10px; background: var(--accent-soft); color: var(--accent-strong); border: 1px solid transparent; border-radius: 999px; }
.claim-btn:hover { background: var(--accent); color: #fff; }

/* ---------- card modal (one column) ---------- */
.backdrop {
  position: fixed; inset: 0; background: rgba(9, 20, 30, .55); display: flex; justify-content: center; align-items: flex-start;
  overflow-y: auto; padding: 48px 16px; z-index: 50; animation: fade .1s ease-out;
}
.modal-wrapper { display: flex; gap: 16px; width: 100%; max-width: 1180px; align-items: flex-start; justify-content: center; animation: rise .12s var(--ease); min-height: 100%; cursor: default; }
/* only the instant shell animates in; swapping in the full card must not flash */
.backdrop:not(.is-loading), .backdrop:not(.is-loading) .modal-wrapper { animation: none; }
.modal {
  --stripe: var(--line);
  position: relative; background: var(--surface); width: 100%; max-width: 780px; border-radius: var(--r-lg);
  padding: 30px 32px 24px; box-shadow: var(--shadow-pop); flex: 1 1 740px; min-width: 0; overflow: hidden;
}
.modal::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--stripe); }
.modal.c-skipped { --stripe: var(--skipped-line); }
.modal.c-pitch { --stripe: var(--pitch-line); }
.modal.c-approved { --stripe: var(--approved-line); }
.modal.c-rfe { --stripe: var(--rfe-line); }
.modal.c-scheduled { --stripe: var(--scheduled-line); }
.modal.c-checkdaily { --stripe: var(--checkdaily-line); }
.modal.c-needswork { --stripe: var(--needswork-line); }
.modal.c-fixes { --stripe: var(--fixes-line); }
.close { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; background: var(--sunken); font-size: 22px; line-height: 1; color: var(--muted); border-radius: 50%; }
.close:hover { background: var(--col); color: var(--text); }
.m-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.m-head-actions { display: flex; gap: 4px; flex-shrink: 0; }
.m-head-actions .icon-btn { width: 36px; height: 36px; border-radius: 50%; }
.modal-colbar { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.title-field { position: relative; margin-bottom: 4px; }
.title-field .counter { position: absolute; right: 0; bottom: -16px; font-size: 11px; opacity: 0; transition: opacity .15s; }
.title-field:focus-within .counter, .title-field .counter.over { opacity: 1; }
/* properties: label column + value column, like a doc's metadata block */
.props { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 6px 0; margin-bottom: 18px; }
.prop { display: grid; grid-template-columns: 112px 1fr; gap: 12px; align-items: start; padding: 8px 0; }
.prop-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 500; padding-top: 6px; }
.prop-label .icon { color: var(--faint); }
.prop-value { min-width: 0; }
.prop .lock-controls { border: 0; padding: 4px 0 0; margin: 0; }
.prop .lock-area > .slot { margin: 0; }
.prop .add-source { margin-top: 6px; }
.prop .add-source input, .prop .add-tag-inline input { padding: 5px 9px; font-size: 13px; }
.prop .add-source .ghost, .prop .add-tag-inline .ghost { padding: 5px 10px; font-size: 13px; }
.prop .f-sources { margin: 0; }
.prop .f-sources li:last-child { border-bottom: 0; }
.prop .writer-add-row select { padding: 5px 30px 5px 9px; font-size: 13px; }
.prop .add-tag-inline { margin-top: 8px; }
.desc-field .f-desc { min-height: 76px; }
/* comments / activity tabs */
.m-tabs { margin-top: 4px; }
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; }
.tab { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; border-radius: 0; padding: 9px 4px; margin-right: 14px; color: var(--muted); font-weight: 600; box-shadow: inset 0 -2px 0 transparent; }
.tab:hover { background: none; color: var(--text); }
.tab.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.tab-count { font-size: 11px; background: var(--sunken); color: var(--muted); padding: 1px 7px; border-radius: 999px; }
.tab-panel .comment-new { flex-direction: row; align-items: flex-start; border: 0; padding: 0; margin-bottom: 12px; }
.tab-panel .comment-new textarea { resize: none; min-height: 38px; }
.tab-panel .comment-list { max-height: 340px; overflow-y: auto; }
/* instant-open shell while the full card loads */
.shell-title { border: 0; padding: 6px 0 14px; }
.shell-lines { display: grid; gap: 10px; }
.shell-lines i { height: 14px; border-radius: 6px; background: var(--sunken); animation: pulse .9s ease-in-out infinite alternate; }
.shell-lines i:nth-child(1) { width: 60%; } .shell-lines i:nth-child(2) { width: 90%; height: 60px; } .shell-lines i:nth-child(3) { width: 40%; }
.pill { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--col); color: #2c3844; }
.pill.red { background: var(--skipped); color: #7d2420; }
.pill.purple { background: var(--pitch); color: #4b3592; }
.pill.blue { background: var(--approved); color: #1f4590; }
.pill.yellow { background: var(--rfe); color: #6b5100; }
.pill.green { background: var(--scheduled); color: #17603a; }
.pill.white { background: var(--checkdaily); border: 1px solid var(--line); }
.pill.red-strong { background: var(--fixes-line); color: #fff; }

.field { display: block; margin-bottom: 18px; }
.field > span { display: flex; align-items: baseline; gap: 8px; font-weight: 600; font-size: 13px; color: var(--text); margin-bottom: 7px; }
.field > span small { font-weight: 400; color: var(--muted); }
.field.inline { display: flex; align-items: center; gap: 8px; }
.field.inline > span { margin: 0; }
.field.inline input { width: auto; }
.modal .field:has(.f-title) > span { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.f-title {
  overflow: hidden; font-family: var(--font-head); font-size: 26px; font-weight: 500; line-height: 1.22; letter-spacing: -.012em;
  border-color: transparent; padding: 6px 8px; margin-left: -8px; width: calc(100% + 16px); resize: none;
}
.f-title:hover { border-color: var(--line); }
.f-desc { line-height: 1.6; background-color: var(--sunken); border-color: transparent; }
.f-desc:focus { background-color: var(--surface); }
.wordcount-banner { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); margin: 0 0 16px; font-size: 12.5px; }
.wordcount-banner strong { color: var(--text); font-weight: 600; }

.status-area:not(:empty) { background: var(--sunken); border-radius: 12px; padding: 10px; margin-bottom: 18px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.status-btn { border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13px; padding: 8px 14px; }
.status-btn:hover { background: var(--surface); border-color: #b9c1ca; }
.status-btn.pitch:hover, .status-btn.pitch.on { background: var(--pitch); border-color: var(--pitch-line); color: #4b3592; }
.status-btn.needswork:hover, .status-btn.needswork.on { background: var(--needswork); border-color: var(--needswork-line); color: #7a4100; }
.status-btn.fixes, .status-btn.squelch { border-color: #ecc3c0; color: var(--danger); }
.status-btn.fixes:hover, .status-btn.squelch:hover { background: var(--danger-soft); border-color: var(--danger); }
.status-btn.approve { background: var(--approved-line); border-color: var(--approved-line); color: #fff; }
.status-btn.approve:hover { background: #3c6cc6; border-color: #3c6cc6; }
.status-btn.rfe { background: var(--accent); border-color: var(--accent); color: #fff; }
.status-btn.rfe:hover { background: var(--accent-strong); }
.status-btn.schedule { background: var(--scheduled-line); border-color: var(--scheduled-line); color: #fff; }
.status-btn.schedule:hover { background: #26864c; }
.status-btn.on { box-shadow: inset 0 0 0 1px currentColor; }

.slot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--scheduled); color: #17603a; padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; }
.slot.muted { background: var(--sunken); color: var(--muted); }
.slot strong { color: #0f4a2b; }
.dup { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: #fdf1e1; border: 1px solid #f1d2a6; color: #6b3d00; padding: 10px 14px; border-radius: 10px; margin-bottom: 8px; }
.dup-actions { white-space: nowrap; }
.dup-area:not(:empty) { margin-bottom: 18px; }
.f-writers { display: flex; flex-direction: column; gap: 8px; }
.writer-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.writer-tag { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 6px 3px 3px; font-size: 13px; font-weight: 600; }
.wt-av { position: relative; overflow: hidden; width: 26px; height: 26px; border-radius: 50%; background: #34506b; color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.wt-av > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.role-badge { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; letter-spacing: .01em; white-space: nowrap; }
.r-editor { background: #efe9fb; color: #4b3592; }
.r-selfappr { background: #e6eefb; color: #1f4590; }
.r-selfpub { background: #e2f4e8; color: #17603a; }
.r-writer { background: var(--sunken); color: #3b4753; }
.writer-tag a { color: inherit; text-decoration: none; }
.writer-tag a:hover { text-decoration: underline; }
.writer-tag .rm-writer { background: none; border: none; width: 20px; height: 20px; padding: 0; border-radius: 50%; color: var(--muted); font-size: 15px; line-height: 1; }
.writer-tag .rm-writer:hover { color: var(--danger); background: var(--danger-soft); }
.writer-add-row { display: flex; gap: 8px; max-width: 320px; }
.chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.chk input { width: 16px; }
.f-sources { list-style: none; padding: 0; margin: 0 0 8px; }
.f-sources li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); word-break: break-all; }
.f-sources li.muted { border: 0; padding-top: 0; }
.add-source { display: grid; grid-template-columns: 2fr 1fr auto; gap: 6px; }
.actions { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; padding-top: 18px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.saved-note { font-size: 12.5px; }
.spacer { flex: 1; }
.tag-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 6px; font-size: 12px; font-weight: 600; color: #fff; cursor: pointer; opacity: .4; user-select: none; transition: opacity .15s; }
.tag-pill:hover { opacity: .75; }
.tag-pill.active { opacity: 1; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px rgba(9,30,66,.25); }
.add-tag-inline { display: flex; gap: 6px; margin-top: 10px; max-width: 340px; }
.lock-controls { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line-soft); padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; }
.lock-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lock-row input[type="datetime-local"] { width: auto; }

.comments-sidebar {
  width: 380px; flex: 0 0 380px; background: var(--surface); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-pop);
  position: sticky; top: 0; max-height: calc(100vh - 96px); display: flex; flex-direction: column;
}
.comments-sidebar .comments-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.comments-sidebar .comments-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.comments-sidebar .comments-head h3 .icon { margin-right: 6px; color: var(--muted); }
.comments-sidebar .close-comments { width: 32px; height: 32px; padding: 0; border: 0; font-size: 18px; color: var(--muted); justify-content: center; }
.comments-sidebar .comment-list { flex: 1; overflow-y: auto; padding-right: 4px; }
.toggle-comments-btn { gap: 0 !important; }
.toggle-comments-btn .icon, .restore .icon { margin-right: 6px; }
.comment-new { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.comment { margin-left: calc(var(--depth) * 20px); padding: 10px 12px; background: var(--sunken); border-radius: 10px; margin-bottom: 8px; }
.c-head { font-size: 13px; }
.c-head .muted { font-size: 12px; margin-left: 4px; }
.c-body { white-space: pre-wrap; word-break: break-word; margin: 4px 0 2px; line-height: 1.5; }
.c-actions { display: flex; gap: 2px; margin-left: -4px; }
.c-actions button { font-size: 12px; color: var(--muted); }
.c-actions button:hover { color: var(--accent); }
.inline-edit { margin-top: 6px; }
.inline-edit .row { display: flex; gap: 6px; margin-top: 6px; }
.activity-section { margin-top: 20px; }
.activity-section h3 { font-size: 13px; font-weight: 600; color: var(--text); margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.activity-section h3 .icon { color: var(--muted); }
.activity-list { display: flex; flex-direction: column; max-height: 420px; overflow-y: auto; }
.activity-item { font-size: 12.5px; padding: 8px 2px; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.activity-item:last-child { border-bottom: 0; }
.activity-item .act-author { font-weight: 600; color: var(--text); }
.activity-item .act-time { font-size: 11.5px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.activity-empty { margin: 4px 0; font-size: 12.5px; }

/* ---------- styled dialogs (ui.confirm / ui.prompt) ---------- */
.ui-dialog {
  border: 0; padding: 0; border-radius: 18px; width: min(440px, calc(100vw - 32px)); background: var(--surface);
  color: var(--text); box-shadow: var(--shadow-pop);
}
.ui-dialog[open] { animation: pop .2s var(--ease); }
.ui-dialog::backdrop { background: rgba(9, 20, 30, .5); backdrop-filter: blur(3px); }
.ui-dialog form { padding: 24px 24px 20px; display: grid; grid-template-columns: auto 1fr; gap: 0 16px; }
.ui-dialog-icon { width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); position: relative; }
.ui-dialog-icon::after {
  content: ""; position: absolute; inset: 11px; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ui-dialog.is-danger .ui-dialog-icon { background: var(--danger-soft); }
.ui-dialog.is-danger .ui-dialog-icon::after {
  background: var(--danger);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v6M14 11v6'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v6M14 11v6'/%3E%3C/svg%3E");
}
.ui-dialog-title { margin: 2px 0 6px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.ui-dialog-msg { margin: 0; color: var(--muted); line-height: 1.5; }
.ui-dialog-input { margin-top: 14px; }
.ui-dialog-actions { grid-column: 1 / -1; display: flex; flex-direction: row-reverse; gap: 8px; margin-top: 22px; }
.ui-dialog-actions button { padding: 9px 16px; }

/* ---------- tally ---------- */
.tally-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(540px, 100vw); z-index: 45; background: var(--surface);
  padding: 22px 24px 28px; overflow-y: auto; box-shadow: -20px 0 50px -20px rgba(9, 20, 30, .5); animation: slide-in .2s var(--ease);
}
.tally-scrim { position: fixed; inset: 0; z-index: 44; background: rgba(9, 20, 30, .35); animation: fade .15s ease-out; }
.tally-loading { display: grid; gap: 12px; padding-top: 8px; }
.tally-loading i { height: 64px; border-radius: 12px; background: var(--sunken); animation: pulse .9s ease-in-out infinite alternate; }
.tally-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.tally-head h2 { margin: 0; font-family: var(--font-head); font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.tally-head p { margin: 2px 0 0; }
.tally-nav { display: flex; align-items: center; gap: 8px; margin: 18px 0 16px; }
.tally-nav .ghost { width: 34px; height: 34px; padding: 0; justify-content: center; font-size: 18px; }
.tally-day { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.tally-day strong { font-size: 15px; }
.tally-day span { font-size: 12.5px; color: var(--muted); }
.tally-nav .tally-date { width: auto; padding: 6px 8px; font-size: 13px; }
.tally-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.kpi { background: var(--sunken); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi b { font-family: var(--font-head); font-size: 32px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi b small { font-size: 16px; color: var(--faint); font-weight: 500; }
.kpi-sub { font-size: 12px; color: var(--muted); }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.sw.a, .tb.a { background: #4f7fd9; }
.sw.p, .tb.p { background: #2f9e5b; }
.tally-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12px; font-weight: 500; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.tally-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tally-legend .muted { margin-left: auto; font-weight: 400; }
.tally-writers { list-style: none; margin: 0; padding: 0; }
.tally-writers li { display: grid; grid-template-columns: 36px 1fr auto auto; gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--line-soft); border-radius: 8px; }
.tally-writers li:hover { background: #fafbfc; }
.tw-av { width: 34px; height: 34px; border-radius: 50%; background: #34506b; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; text-decoration: none; }
.tally-writers li:nth-child(3n+2) .tw-av { background: #6a4f8f; }
.tally-writers li:nth-child(3n+3) .tw-av { background: #8a5a2b; }
.tw-main { min-width: 0; }
.tw-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.tw-bars { display: flex; align-items: flex-end; gap: 5px; height: 26px; }
.tb-day { display: flex; align-items: flex-end; gap: 2px; height: 100%; padding: 0 1px; border-radius: 3px; }
.tb-day.sel { background: var(--sunken); box-shadow: 0 0 0 1px var(--line-soft); }
.tb { display: block; width: 6px; min-height: 2px; border-radius: 3px 3px 1px 1px; }
.tw-today { display: flex; gap: 6px; }
.tw-today .n { min-width: 30px; text-align: center; padding: 3px 6px; border-radius: 7px; font-weight: 700; font-variant-numeric: tabular-nums; }
.tw-today .n.a { background: #e6eefb; color: #1f4590; }
.tw-today .n.p { background: #e2f4e8; color: #17603a; }
.tw-week { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; line-height: 1.2; min-width: 54px; }
.tw-week small { display: block; font-size: 11px; color: var(--faint); font-weight: 500; }
.tw-empty { display: block !important; padding: 20px 6px; }
.tally-table { margin-top: 16px; }
.tally-table summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--accent); padding: 6px 0; }
.tally-table .tally-scroll { margin-top: 8px; }
table.tally, .users-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.tally th, .tally td, .users-table th, .users-table td { padding: 9px 8px; border-bottom: 1px solid var(--line-soft); text-align: left; white-space: nowrap; }
.users-table th, .tally th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--sunken); }
.users-table thead th:first-child, .tally thead th:first-child { border-top-left-radius: var(--r-sm); }
.users-table thead th:last-child, .tally thead th:last-child { border-top-right-radius: var(--r-sm); }
.users-table tbody tr:hover td { background: #fafbfc; }
.tally th.today { color: var(--accent); }
.tally th.sub { font-weight: 500; }
.tally .num, .users-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.tally .big { font-size: 18px; font-weight: 700; }
.tally .strong { font-weight: 700; }
.tally tfoot td { font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; }
.tally-scroll { overflow-x: auto; }
.week td:nth-child(2n+2), .week th.sub:nth-child(2n+1) { border-left: 1px solid var(--line-soft); }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #14222d; color: #fff;
  padding: 12px 18px; border-radius: 12px; z-index: 200; max-width: 90vw; font-weight: 500; box-shadow: var(--shadow-pop);
  animation: toast-in .22s var(--ease); display: flex; align-items: center; gap: 10px;
}

/* ---------- login ---------- */
.login-page { align-items: center; justify-content: center; padding: 24px; background: var(--canvas); }
.login-card { background: var(--surface); padding: 38px 36px 32px; border-radius: 20px; width: 100%; max-width: 400px; box-shadow: var(--shadow-pop); }
.login-card h1 { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 36px; letter-spacing: -.02em; display: flex; align-items: center; gap: 12px; }
.login-card h1::before { content: ""; width: 36px; height: 36px; background: url("/favicon.svg") center / contain no-repeat; }
.login-card p { margin: 6px 0 26px; }
.login-card button.primary { padding: 11px; font-size: 15px; margin-top: 4px; }

/* ---------- inner pages (users / dashboard / profile) ---------- */
.users-page { display: block; overflow-y: auto; }
.users-page .topbar { position: sticky; top: 0; }
.users-main { max-width: 1180px; margin: 0 auto; padding: 30px 20px 56px; display: grid; gap: 18px; }
.users-main > * { min-width: 0; } /* let wide tables scroll inside their panel */
.page-title { font-family: var(--font-head); font-size: 32px; font-weight: 600; letter-spacing: -.015em; margin: 0; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.panel { background: var(--surface); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow-card); }
.panel h2 { margin: 0 0 14px; font-size: 16px; font-weight: 600; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.panel-head h2 { margin: 0; }
.panel-head p { margin: 2px 0 0; }
.panel-sub { margin: -8px 0 14px; font-size: 13px; }
.user-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 14px; align-items: end; }
.user-form button { margin-bottom: 18px; }
.user-form .board-field { grid-column: 1 / -1; order: 1; }
.user-form .board-field .board-checks-container { flex-direction: row; flex-wrap: wrap; gap: 8px 22px; max-height: none; padding: 10px 12px; }
.user-form > button { order: 2; justify-self: start; }
.users-table td { vertical-align: middle; }
/* inline-editable cells read as text until you hover or focus them */
.users-table input, .users-table select { min-width: 140px; padding: 6px 8px; border-color: transparent; background-color: transparent; }
.users-table select { padding-right: 26px; background-position: right 6px center; }
.users-table tr:hover input, .users-table tr:hover select { border-color: var(--line); background-color: var(--surface); }
.users-table input:focus, .users-table select:focus { background-color: var(--surface); }
.users-table input.u-name { font-weight: 600; }
.users-table input.u-quota { min-width: 0; width: 74px; }
.users-table td.row-actions { white-space: nowrap; }
.row-actions > * { margin-right: 4px; vertical-align: middle; }
.row-actions button, .row-actions .btnlike { padding: 6px 10px; font-size: 12.5px; }
.board-checks-container { display: flex; flex-direction: column; gap: 5px; max-height: 128px; overflow-y: auto; padding: 7px 9px; border: 1px solid var(--line-soft); border-radius: var(--r); background: var(--sunken); min-width: 190px; }
.board-check-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; cursor: pointer; user-select: none; }
.board-check-item input { min-width: auto; margin: 0; }
.hint { font-size: 11px; margin-top: 3px; }

/* dashboard */
#tabOverview, #tabCalendar { display: grid; gap: 18px; }
#tabOverview > .dash-actions { margin: 0; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.stat-card { background: var(--surface); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-card); position: relative; overflow: hidden; }
.dashboard-grid > .stat-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--accent); }
.dashboard-grid > .stat-card:nth-child(1)::before { background: var(--pitch-line); }
.dashboard-grid > .stat-card:nth-child(2)::before { background: var(--rfe-line); }
.dashboard-grid > .stat-card:nth-child(3)::before { background: var(--scheduled-line); }
.stat-card h3 { margin: 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.stat-card p { margin: 0; font-size: 12.5px; }
.stat-val { font-family: var(--font-head); font-size: 42px; font-weight: 600; line-height: 1.1; color: var(--text); margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.dash-tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--col); border-radius: 11px; }
.dash-tabs button.ghost { border: 0; background: transparent; color: var(--muted); padding: 8px 15px; border-radius: 8px; }
.dash-tabs button.ghost:hover { color: var(--text); background: transparent; }
.dash-tabs button.ghost.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }
.dash-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-filter-pills button.ghost { font-size: 12.5px; padding: 6px 13px; border-radius: 999px; }
.dash-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.slot-card { background: var(--sunken); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.slot-card .slot-board { font-weight: 600; }
.slot-card .slot-time { font-family: var(--font-head); font-size: 21px; font-weight: 600; color: var(--accent); }
.slot-card a { font-size: 12.5px; font-weight: 600; text-decoration: none; }
.slot-card a:hover { text-decoration: underline; }
.queue-list { display: flex; flex-direction: column; gap: 6px; max-height: 400px; overflow-y: auto; }
.queue-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 10px; background: var(--sunken); font-size: 13px; text-decoration: none; color: inherit; transition: background-color .15s; }
.queue-item:hover { background: var(--accent-soft); }
.queue-main { display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; white-space: nowrap; }
.queue-title { font-family: var(--font-head); font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.queue-board { font-size: 12px; color: var(--muted); }
.queue-item .urgent { color: var(--danger); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge.b-pitch { background: var(--pitch); color: #4b3592; font-weight: 600; }
.badge.b-rfe { background: var(--rfe); color: #6b5100; font-weight: 600; }
.queue-empty { padding: 14px 0; }
.progress { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.progress-track { flex: 1; height: 7px; background: var(--col); border-radius: 999px; overflow: hidden; min-width: 60px; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--ok); }
.progress-fill.mid { background: var(--busy); }
.progress-fill.low { background: var(--danger); }
.progress-pct { font-size: 11.5px; font-weight: 600; min-width: 34px; font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #b4bcc6; margin-right: 6px; }
.dot.on { background: var(--ok); }
.cell-sub { font-size: 11.5px; }

/* calendar */
.cal-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cal-controls label { font-weight: 500; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; }
.cal-controls select { width: auto; min-width: 190px; }
.cal-range { font-family: var(--font-head); font-weight: 600; font-size: 20px; margin-bottom: 12px; }
.calendar-days-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.cal-day { border: 1px solid var(--line-soft); border-radius: 12px; padding: 10px; background: var(--sunken); }
.cal-day.today { border-color: var(--accent); background: var(--accent-soft); }
.cal-day-head { font-weight: 600; font-size: 13px; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.cal-day.today .cal-day-head { color: var(--accent-strong); }
.cal-day-list { max-height: 480px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.cal-item { display: block; color: inherit; text-decoration: none; background: var(--surface); border-radius: var(--r); padding: 9px 10px 9px 12px; box-shadow: var(--shadow-card); position: relative; }
.cal-item::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--scheduled-line); }
.cal-time { font-size: 11.5px; font-weight: 700; color: var(--accent); display: flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.cal-title { font-family: var(--font-head); font-size: 14.5px; font-weight: 500; line-height: 1.3; margin: 2px 0 3px; }
.cal-writer { font-size: 11.5px; color: var(--muted); }
.cal-writer.none { color: var(--danger); }
.cal-empty { padding: 10px 4px; }

/* profile */
.profile-hero { padding: 0; overflow: hidden; }
.profile-hero::before { content: ""; display: block; height: 84px; background: var(--canvas); }
.profile-hero > .profile-body { padding: 0 24px 22px; }
.profile-top { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 20px; margin-top: -38px; }
.profile-id { display: flex; gap: 18px; align-items: flex-start; }
.profile-id > div:last-child, .profile-seen { margin-top: 48px; }
.profile-avatar-img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 4px solid var(--surface); background: var(--sunken); box-shadow: var(--shadow-card); }
.avatar.avatar-xl { width: 88px; height: 88px; font-size: 28px; border-width: 4px; box-shadow: var(--shadow-card); }
.profile-name { font-family: var(--font-head); font-size: 30px; font-weight: 600; letter-spacing: -.015em; margin: 0 0 2px; }
.profile-email { margin: 0 0 8px; }
.profile-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.profile-tags .badge { background: var(--sunken); color: var(--text); font-weight: 600; }
.status-on { color: var(--ok); font-weight: 600; }
.profile-seen { text-align: right; }
.profile-seen .label { font-size: 12px; }
.profile-seen .value { font-weight: 600; }
.profile-seen .value small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.profile-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.profile-section h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.profile-section h3.strong { font-size: 15px; color: var(--text); margin-bottom: 12px; }
.bio { margin: 0; line-height: 1.6; white-space: pre-wrap; max-width: 70ch; }
.bio:not(.muted) { color: var(--text); }
.profile-form { display: grid; gap: 4px; max-width: 600px; }
.quota-track { height: 7px; background: var(--col); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.quota-fill { width: 0%; height: 100%; background: var(--ok); border-radius: 999px; transition: width .4s var(--ease); }
.quota-sub { margin-top: 6px !important; }
.title-link { color: inherit; text-decoration: none; font-family: var(--font-head); font-size: 14.5px; font-weight: 500; }
.title-link:hover { color: var(--accent); }

/* ---------- motion ---------- */
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.99); } }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(24px); } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes pulse { from { opacity: .45; } to { opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .account-btn .me, label.avail .avail-label { display: none; }
  label.avail { padding: 6px; }
  .account-btn { padding-right: 6px; }
}
@media (max-width: 900px) {
  .roster { display: none; }
  .tb-right { margin-left: auto; }
  .users-page .board-name { display: none; }
}
@media (max-width: 520px) {
  .board-picker .board-name { display: none; }
}
@media (max-width: 760px) {
  .topbar { padding: 6px 10px; gap: 6px; min-height: 58px; flex-wrap: nowrap; }
  .tb-left { min-width: 0; gap: 6px; }
  .board-picker-btn { padding-right: 4px; }
  .board-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .brand { font-size: 0; gap: 0; padding-right: 8px; }
  .board-name { font-size: 14px; }
  .roster { display: none; }
  label.avail { padding: 6px; }
  label.avail .avail-label, .account-btn .me, .account-btn .chev { display: none; }
  .account-btn { padding: 2px; }
  .board-bar { padding: 10px 12px; }
  .search-bar input { width: auto; flex: 1 1 160px; }
  .board { padding: 12px; gap: 10px; scroll-snap-type: x mandatory; }
  .column { flex-basis: 86vw; scroll-snap-align: center; }
  .tally-panel { padding: 18px 16px; }
  .tally-kpis { gap: 6px; }
  .kpi { padding: 10px; }
  .kpi b { font-size: 26px; }
  .tally-legend .muted { display: none; }
  .backdrop { padding: 0; }
  .modal-wrapper { flex-direction: column; gap: 0; }
  .modal { border-radius: 0; padding: 26px 16px; min-height: 100vh; }
  .f-title { font-size: 22px; }
  .comments-sidebar { width: 100%; flex-basis: auto; max-height: none; border-radius: 0; position: static; }
  .add-source { grid-template-columns: 1fr; }
  .users-main { padding: 18px 12px 40px; }
  .panel { padding: 16px; }
  .profile-seen { text-align: left; }
  .ui-dialog form { grid-template-columns: 1fr; }
  .ui-dialog-icon { margin-bottom: 12px; }
}

/* ---------- team availability panel ---------- */
.menu.team-menu { width: 340px; max-width: calc(100vw - 16px); max-height: min(70vh, 560px); overflow-y: auto; padding: 8px; }
.team-head { display: flex; flex-direction: column; padding: 6px 8px 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.team-head strong { font-size: 15px; }
.team-group + .team-group { margin-top: 6px; }
.team-group .menu-label { display: flex; align-items: center; gap: 6px; padding: 8px 8px 4px; }
.team-n { font-size: 11px; background: var(--sunken); border-radius: 999px; padding: 0 7px; color: var(--muted); }
.menu .team-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; }
.team-row .who { margin: 0; }
.team-name { display: flex; flex-direction: column; font-weight: 600; line-height: 1.25; min-width: 0; }
.team-name small { font-weight: 500; font-size: 11.5px; color: var(--muted); text-transform: capitalize; }
.team-state { font-size: 12px; font-weight: 600; white-space: nowrap; }
.team-state.avail { color: var(--ok); }
.team-state.busy { color: #a86a00; }
.team-state.off { color: var(--faint); font-weight: 500; }

/* ---------- list (column) menu ---------- */
.col-head-r { display: flex; align-items: center; gap: 4px; }
.col-menu-btn { width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border-radius: 8px; background: transparent; color: var(--muted); opacity: .75; }
.col-menu-btn:hover, .col-menu-btn.on { background: rgba(9, 30, 66, .08); color: var(--text); opacity: 1; }
.col-menu-btn .icon { width: 18px; height: 18px; }
.menu.col-menu { width: 300px; max-width: calc(100vw - 16px); padding: 8px; }
.col-menu-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 8px; }
.col-menu-head .muted { margin-left: auto; }
.col-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; background: var(--dot, var(--faint)); }
.col-dot.col-squelched { --dot: var(--skipped-line); }
.col-dot.col-pitched { --dot: var(--pitch-line); }
.col-dot.col-writing { --dot: var(--approved-line); }
.col-dot.col-ready_for_edit { --dot: var(--rfe-line); }
.col-dot.col-scheduled { --dot: var(--scheduled-line); }
.col-dot.col-check_daily { --dot: var(--checkdaily-line); }
.col-dot.col-archive { --dot: #6b7682; }
.col-move-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.menu .col-move-grid button { font-size: 13px; padding: 8px; }
.menu button:disabled { opacity: .4; cursor: default; background: none; }
.menu .danger-item { color: var(--danger); }
.menu .danger-item .icon { color: var(--danger); }
.menu .danger-item:hover:not(:disabled) { background: var(--danger-soft); }

/* ---------- availability history ---------- */
.dot.busy { background: var(--busy); }
.status-busy { color: #a86a00; font-weight: 600; }
.avail-history { list-style: none; margin: 4px 0 0; padding: 0; max-width: 560px; }
.avail-history li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.avail-history li:last-child { border-bottom: 0; }
.avail-history time { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---------- mentions ---------- */
.mention { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; padding: 0 3px; border-radius: 4px; }
.has-mentions { position: relative; }
.mention-menu { position: absolute; left: 0; top: calc(100% + 4px); z-index: 5; width: min(320px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); padding: 4px; }
.mention-opt { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; background: none; border: 0; border-radius: 8px; text-align: left; font-weight: 500; }
.mention-opt.on, .mention-opt:hover { background: var(--accent-soft); }
.mention-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------- desktop alerts prompt ---------- */
.notif-perm { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 8px 0; padding: 9px 10px; border-radius: 10px; background: var(--sunken); font-size: 12.5px; color: var(--muted); }

/* ---------- team & access ---------- */
.page-sub { margin: 4px 0 0; font-size: 13.5px; }
.people-panel { padding: 0; overflow: hidden; }
.people-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-soft); }
.people-tools input[type="search"] { max-width: 300px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--sunken); border-radius: 10px; flex-wrap: wrap; }
.seg button { background: transparent; border: 0; padding: 6px 12px; border-radius: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.seg button:hover { color: var(--text); background: transparent; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }
.person { border-bottom: 1px solid var(--line-soft); }
.person:last-child { border-bottom: 0; }
.person.editing { background: #fafbfc; }
.person-row { display: grid; grid-template-columns: minmax(220px, 1.6fr) 110px minmax(160px, 1.4fr) minmax(130px, 1fr) minmax(120px, .9fr) auto; gap: 14px; align-items: center; padding: 12px 20px; }
.person-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person-id .u-av { width: 38px; height: 38px; font-size: 13px; }
.person-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.person-name strong { font-weight: 600; }
.person-name span { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-boards { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--sunken); border: 1px solid var(--line-soft); color: #3b4753; white-space: nowrap; }
.chip.all { background: var(--accent-soft); color: var(--accent-strong); border-color: transparent; }
.chip.warn { background: #fdf1e1; color: #7a4100; border-color: transparent; }
.person-quota { font-size: 13px; line-height: 1.3; }
.person-quota small { display: block; color: var(--muted); font-size: 12px; }
.person-seen { font-size: 12.5px; }
.person-actions .edit-btn { padding: 6px 14px; }
.person-edit { padding: 4px 20px 18px 70px; }
.pe-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
.pe-grid.two { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.board-checks-container.row { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; max-height: none; padding: 9px 12px; }
.pe-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 4px; }
.people-empty { padding: 24px 20px; margin: 0; }
@media (max-width: 1000px) {
  .person-row { grid-template-columns: 1fr auto; grid-template-areas: "id act" "role act" "boards boards" "quota seen"; row-gap: 8px; }
  .person-id { grid-area: id; } .person-role { grid-area: role; } .person-boards { grid-area: boards; }
  .person-quota { grid-area: quota; } .person-seen { grid-area: seen; text-align: right; } .person-actions { grid-area: act; align-self: start; }
  .person-edit { padding-left: 20px; }
  .pe-grid, .pe-grid.two { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .pe-grid, .pe-grid.two { grid-template-columns: 1fr; }
  .people-tools input[type="search"] { max-width: none; }
}

/* ---------- Administrator role ---------- */
.r-admin { background: #172b3a; color: #fff; }

/* ---------- card alert badge (unread notifications about this card) ---------- */
.card.has-alert { box-shadow: var(--shadow-card), inset 0 0 0 2px color-mix(in srgb, var(--accent) 70%, transparent); }
.card-alert {
  position: absolute; top: -7px; right: -6px; z-index: 2; min-width: 24px; height: 24px; padding: 0 6px;
  display: grid; place-items: center; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 13px; line-height: 1; border: 2px solid var(--surface); box-shadow: 0 2px 6px rgba(9, 30, 66, .3);
  animation: alert-pop .35s var(--ease);
}
.card-alert .icon { width: 13px; height: 13px; }
.card-alert b { font-weight: 800; font-size: 13px; margin-top: -1px; }
.card-alert.k-mention, .card-alert.k-reply { background: #d6336c; }
.card-alert.k-assigned { background: #2e5ead; }
.card-alert.k-fixes, .card-alert.k-needs_work { background: var(--danger); }
@keyframes alert-pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.col-list { padding-top: 9px; }

/* ---------- desktop notification opt-in ---------- */
.push-banner {
  display: flex; align-items: center; gap: 12px; margin: 12px 18px 0; padding: 10px 14px; border-radius: 10px;
  background: var(--surface); box-shadow: var(--shadow-card); font-size: 13px; color: var(--muted);
}
.push-banner > .icon { color: var(--accent); width: 20px; height: 20px; }
.push-banner strong { color: var(--text); }
.push-banner span { flex: 1; }

/* ---------- writers: join + member picker ---------- */
.prop-value.f-writers { position: relative; }
.writer-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.join-btn, .add-member-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--surface); border: 1px dashed #b9c1ca; color: var(--muted);
}
.join-btn:hover, .add-member-btn:hover, .add-member-btn[aria-expanded="true"] { border-style: solid; border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.join-btn { border-style: solid; border-color: transparent; background: var(--accent); color: #fff; }
.join-btn:hover { background: var(--accent-strong); color: #fff; border-color: transparent; }
.member-picker {
  position: absolute; z-index: 6; top: 100%; margin-top: 6px; left: 0; width: min(360px, 100%);
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-pop); overflow: hidden;
  animation: rise .14s var(--ease);
}
.mp-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); color: var(--faint); }
.mp-search input { border: 0; padding: 2px 0; box-shadow: none !important; background: transparent; }
.mp-list { max-height: 280px; overflow-y: auto; padding: 4px; }
.mp-opt { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 7px 8px; background: none; border: 0; border-radius: 10px; text-align: left; }
.mp-opt:hover, .mp-opt.on { background: var(--accent-soft); }
.mp-opt .who { margin: 0; }
.mp-name { display: flex; flex-direction: column; font-weight: 600; line-height: 1.25; min-width: 0; }
.mp-name small { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.mp-empty { padding: 14px; margin: 0; }

/* ---------- admin console ---------- */
.admin-panel { display: grid; gap: 18px; }
.admin-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.admin-kpis .stat-val { font-size: 34px; }
.admin-sites { display: grid; gap: 4px; }
.admin-site { display: grid; grid-template-columns: 120px minmax(160px, 1fr) minmax(180px, 2fr) auto; gap: 16px; align-items: center; padding: 10px; border-radius: 12px; color: inherit; text-decoration: none; }
.admin-site:hover { background: var(--sunken); }
.admin-site-logo { height: 40px; border-radius: 8px; border: 1px solid var(--line-soft); background: #fff; display: grid; place-items: center; padding: 6px 10px; }
.admin-site-logo.dark { background: #1d2b33; border-color: #1d2b33; }
.admin-site-logo img { max-width: 100%; max-height: 100%; }
.admin-site-name { display: flex; flex-direction: column; line-height: 1.3; }
.admin-site-name small { color: var(--muted); font-size: 12px; }
.admin-bar { display: flex; gap: 2px; height: 12px; border-radius: 6px; overflow: hidden; background: var(--sunken); }
.admin-bar > span { min-width: 4px; }
.seg-squelched { background: var(--skipped-line); } .seg-pitched { background: var(--pitch-line); } .seg-writing { background: var(--approved-line); }
.seg-ready_for_edit { background: var(--rfe-line); } .seg-scheduled { background: var(--scheduled-line); } .seg-check_daily { background: var(--checkdaily-line); }
.admin-site-nums { display: flex; gap: 10px; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.admin-site-nums span, .admin-legend span { display: inline-flex; align-items: center; gap: 5px; }
.admin-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); padding: 10px 10px 0; border-top: 1px solid var(--line-soft); margin-top: 8px; }
.admin-filter { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.admin-filter select { width: auto; min-width: 220px; }
.admin-activity { list-style: none; margin: 0; padding: 0; }
.admin-activity li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.admin-activity li:last-child { border-bottom: 0; }
.admin-activity time { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.admin-activity a { font-family: var(--font-head); font-weight: 500; margin-left: 4px; color: var(--text); }
.admin-activity a:hover { color: var(--accent); }
.tag-group + .tag-group { margin-top: 18px; }
.tag-group h3 { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.tag-row { display: grid; grid-template-columns: 42px minmax(140px, 260px) auto 1fr auto auto; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.tag-row input[type="color"] { width: 38px; height: 32px; padding: 2px; cursor: pointer; }
.tag-row .t-name { padding: 6px 9px; }
.perm-table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.perm-table th, .perm-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); text-align: center; }
.perm-table th:first-child, .perm-table td:first-child { text-align: left; }
.perm-table thead th { font-size: 12px; color: var(--muted); background: var(--sunken); }
.perm-table td.yes { color: var(--ok); }
.perm-table td.no { color: var(--faint); }
@media (max-width: 900px) {
  .admin-site { grid-template-columns: 96px 1fr; }
  .admin-bar, .admin-site-nums { grid-column: 1 / -1; }
  .tag-row { grid-template-columns: 42px 1fr auto; }
  .tag-row .tag-badge, .tag-row .muted { display: none; }
}
.act-from { color: var(--faint); }

/* ---------- profile: writing pace ---------- */
.kpi-tile { background: var(--sunken); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; border: 1px solid transparent; }
.kpi-tile .kpi-label { font-size: 12px; font-weight: 600; color: var(--muted); }
.kpi-tile b { font-family: var(--font-head); font-size: 30px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-tile b small { font-size: 16px; color: var(--faint); font-weight: 500; }
.kpi-tile .kpi-sub { font-size: 12px; color: var(--muted); }
.kpi-tile.good { background: #ebf7ef; border-color: #cdeedb; }
.kpi-tile.good .kpi-sub { color: #17603a; font-weight: 600; }
.kpi-tile.warn { background: #fdf0eb; border-color: #f6d6c9; }
.kpi-tile.warn .kpi-sub { color: #9a3b18; font-weight: 600; }
.kpi-tile.off .kpi-sub { color: var(--faint); }
.pace-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.pace-chart-wrap { padding: 4px 0 0; }
.pace-chart { position: relative; display: flex; align-items: flex-end; gap: 4px; height: 150px; border-bottom: 1px solid var(--line); }
.pace-col { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 4px; }
.pace-col:hover { background: var(--sunken); }
.pace-bar { display: block; width: 70%; max-width: 18px; border-radius: 4px 4px 0 0; }
.pace-bar.met { background: #2f9e5b; }
.pace-bar.under { background: #d85a30; }
.pace-bar.today { background: #4f7fd9; }
.pace-bar.off { background: #c7ced6; }
.pace-quota { position: absolute; left: 0; right: 0; border-top: 2px dashed #34495a; pointer-events: none; }
.pace-quota span { position: absolute; right: 0; top: -20px; font-size: 11px; font-weight: 700; color: #34495a; background: var(--surface); padding: 0 4px; border-radius: 4px; }
.pace-axis { display: flex; gap: 4px; margin-top: 4px; }
.pace-axis span { flex: 1; font-size: 11px; color: var(--muted); white-space: nowrap; text-align: center; overflow: visible; }
.pace-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.pace-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.lg.met { background: #2f9e5b; } .lg.under { background: #d85a30; } .lg.today { background: #4f7fd9; } .lg.off { background: #c7ced6; }
.lg.line { width: 16px; height: 0; border-top: 2px dashed #34495a; border-radius: 0; }
.pace-facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.pace-facts span { font-size: 13px; background: var(--sunken); padding: 6px 12px; border-radius: 999px; color: var(--muted); }
.pace-facts strong { color: var(--text); }
.profile-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.flow-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.workload { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wl-item { display: flex; align-items: center; gap: 8px; background: var(--sunken); border-radius: 10px; padding: 10px 12px; font-size: 13px; font-weight: 500; }
.wl-item b { margin-left: auto; font-family: var(--font-head); font-size: 22px; font-weight: 600; }
.sub-h { font-size: 13px; color: var(--muted); font-weight: 600; margin: 18px 0 8px; }
.site-row { display: grid; grid-template-columns: minmax(110px, 1fr) 2fr auto; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.site-bar { height: 8px; background: var(--sunken); border-radius: 999px; overflow: hidden; }
.site-bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.site-row b { font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .profile-cols { grid-template-columns: 1fr; } .pace-chart { gap: 2px; } }

/* ---------- dashboard: writers & quota ---------- */
.team-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.writers-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.writers-table th { font-size: 12px; color: var(--muted); font-weight: 600; background: var(--sunken); padding: 9px 10px; text-align: left; white-space: nowrap; }
.writers-table th.num, .writers-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.writers-table thead th:first-child { border-top-left-radius: var(--r-sm); }
.writers-table thead th:last-child { border-top-right-radius: var(--r-sm); }
.writers-table td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.writers-table tbody tr:hover td { background: #fafbfc; }
.wr-who { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 210px; }
.wr-who .who { margin: 0; }
.wr-name { display: flex; flex-direction: column; font-weight: 600; line-height: 1.3; }
.wr-name small { font-weight: 500; font-size: 11.5px; color: var(--muted); }
.wr-who:hover .wr-name { color: var(--accent); }
.wr-today { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.wr-today b, .wr-month b { font-family: var(--font-head); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wr-today b small, .wr-month b small { font-size: 13px; color: var(--faint); font-weight: 500; }
.chip.ok { background: #ebf7ef; color: #17603a; border-color: #cdeedb; }
.mini-bars { position: relative; display: flex; align-items: flex-end; gap: 2px; height: 34px; width: 150px; border-bottom: 1px solid var(--line); }
.mb { flex: 1; border-radius: 2px 2px 0 0; min-height: 2px; }
.mb.met { background: #2f9e5b; } .mb.under { background: #d85a30; } .mb.today { background: #4f7fd9; } .mb.off { background: #d6dbe1; }
.mb-quota { position: absolute; left: 0; right: 0; border-top: 1.5px dashed #34495a; pointer-events: none; }
.wr-month { min-width: 170px; }
.wr-month-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pace-ok { color: #17603a; font-weight: 600; font-size: 12px; }
.pace-bad { color: #b03a14; font-weight: 600; font-size: 12px; }
.pace-track { position: relative; height: 7px; background: var(--col); border-radius: 999px; margin-top: 6px; }
.pace-fill { position: absolute; inset: 0 auto 0 0; border-radius: 999px; }
.pace-fill.ok { background: #2f9e5b; } .pace-fill.bad { background: #d85a30; }
.pace-mark { position: absolute; top: -3px; width: 2px; height: 13px; background: #34495a; border-radius: 1px; transform: translateX(-1px); }

/* ---------- admin: tags + permissions ---------- */
.tag-group { padding: 4px 0 14px; }
.tag-group + .tag-group { border-top: 1px solid var(--line-soft); padding-top: 16px; margin-top: 4px; }
.tag-group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.tag-group-head h3 { margin: 0; font-size: 14px; color: var(--text); }
.tag-none { margin: 6px 0; }
.tag-new { display: grid; grid-template-columns: 42px minmax(160px, 320px) auto; gap: 10px; align-items: center; margin-top: 10px; }
.tag-new input[type="color"] { width: 38px; height: 32px; padding: 2px; cursor: pointer; }
.tag-new .n-name { padding: 6px 9px; }
.perm-actions { display: flex; gap: 8px; align-items: center; }
.perm-table td small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; margin-top: 2px; }
.perm-table td strong { font-weight: 600; }
.perm-table td.locked { color: var(--faint); }
.perm-table tr.fixed td { color: var(--muted); }
.perm-table tr.fixed td.yes { color: var(--faint); }
.perm-sep td { background: var(--sunken); font-size: 12px; font-weight: 600; color: var(--muted); text-align: left !important; padding: 7px 12px; }
.perm-tick { display: inline-grid; place-items: center; cursor: pointer; }
.perm-tick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.perm-tick span { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid #b9c1ca; background: var(--surface); display: grid; place-items: center; transition: background-color .15s, border-color .15s; }
.perm-tick:hover span { border-color: var(--accent); }
.perm-tick input:checked + span { background: var(--ok); border-color: var(--ok); }
.perm-tick input:checked + span::after { content: ""; width: 11px; height: 6px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.perm-tick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.perm-bar { position: sticky; bottom: 12px; display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #172b3a; color: #fff; box-shadow: var(--shadow-pop); }
.perm-bar span { flex: 1; font-weight: 500; }
.perm-bar .ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.tag-new button { justify-self: start; padding: 7px 14px !important; }
.tag-badge.flag.c-pub { background: var(--scheduled-line); }
.push-banner.blocked { background: #fdf0eb; border: 1px solid #f6d6c9; color: #7a2e12; } .push-banner.blocked > .icon { color: #c2410c; } .push-banner.blocked strong { color: #7a2e12; }

/* ---------- profile photo upload ---------- */
.photo-edit { display: flex; align-items: center; gap: 18px; padding: 14px; border: 1.5px dashed var(--line); border-radius: 14px; background: var(--sunken); transition: border-color .15s, background-color .15s; }
.photo-edit.over { border-color: var(--accent); background: var(--accent-soft); }
.photo-edit.busy { opacity: .6; pointer-events: none; }
.photo-preview.avatar { width: 84px; height: 84px; font-size: 26px; flex-shrink: 0; border-width: 3px; box-shadow: 0 0 0 1px var(--line); }
.photo-actions { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.photo-actions small { font-size: 12px; line-height: 1.45; max-width: 46ch; }
.photo-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-file { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--r); background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; overflow: hidden; }
.btn-file:hover { background: var(--accent-strong); }
.btn-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.btn-file:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-link { margin-top: 10px; }
.photo-link summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent); }
.photo-link input { margin-top: 8px; max-width: 460px; }

/* ---------- admin: lists manager ---------- */
.site-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.site-chip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 600; }
.site-chip .admin-site-logo { width: 74px; height: 32px; padding: 4px 8px; }
.site-chip:hover { border-color: #b9c1ca; background: var(--surface); }
.site-chip.on { border-color: var(--accent); background: var(--accent-soft); }
.lists-preview { display: flex; gap: 6px; overflow-x: auto; padding: 12px; margin-bottom: 14px; border-radius: 12px; background: linear-gradient(135deg, #2d3d4a, #1b2731); }
.lp-col { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 9px; background: var(--list); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.lp-col i { width: 9px; height: 9px; border-radius: 3px; background: var(--dot); }
.lp-col b { font-size: 11px; color: var(--muted); background: rgba(9,30,66,.07); padding: 0 6px; border-radius: 999px; }
.list-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.list-row { display: grid; grid-template-columns: 22px 40px minmax(160px, 1fr) 150px 80px auto auto auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--surface); }
.list-row.dragging { opacity: .45; border-style: dashed; border-color: var(--accent); }
.list-row:hover { border-color: var(--line); }
.lr-handle { cursor: grab; color: var(--faint); font-weight: 700; letter-spacing: -2px; text-align: center; user-select: none; }
.lr-color { width: 36px; height: 30px; padding: 2px; cursor: pointer; }
.lr-name { padding: 6px 9px; font-weight: 600; }
.lr-stage { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--sunken); padding: 4px 10px; border-radius: 999px; justify-self: start; }
.lr-stage-sel { padding: 5px 28px 5px 9px; font-size: 12.5px; }
.lr-count { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lr-move { display: inline-flex; gap: 2px; }
.lr-move .icon-btn { width: 28px; height: 28px; font-size: 14px; }
.lr-lock { font-size: 11.5px; font-weight: 600; color: var(--faint); padding: 0 6px; }
.list-new { display: grid; grid-template-columns: 40px minmax(180px, 1fr) auto auto auto; gap: 10px; align-items: center; margin-top: 16px; padding: 14px; border-radius: 12px; background: var(--sunken); border: 1.5px dashed var(--line); }
.list-new-title { grid-column: 1 / -1; font-weight: 600; font-size: 13.5px; }
.list-new input[type="color"] { width: 36px; height: 32px; padding: 2px; }
.list-new label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.list-new select { width: auto; padding: 6px 28px 6px 9px; font-size: 13px; }
.list-help { margin: 14px 0 0; line-height: 1.55; max-width: 90ch; }
@media (max-width: 900px) {
  .list-row { grid-template-columns: 22px 40px 1fr auto; }
  .lr-stage, .lr-stage-sel, .lr-count { grid-column: 3; }
  .list-new { grid-template-columns: 40px 1fr; }
  .list-new label, .list-new button { grid-column: 1 / -1; }
}


/* ---------- time off ---------- */
.team-state.away { color: #7a5bc4; font-weight: 600; white-space: normal; text-align: right; max-width: 150px; }
.who.away i { background: #9b7fe0; }
.off-next, .off-now { color: #7a5bc4; font-weight: 600; }
.off-chip { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; padding: 3px 10px; border-radius: 999px;
  background: #f1ecfb; color: #5b3fa6; font-size: 12px; font-weight: 600; }
.off-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #9b7fe0; }
.off-chip.soon { background: var(--surface-2, #f3f5f7); color: var(--muted); }
.off-chip.soon::before { background: var(--faint); }
.timeoff-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.timeoff-list li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); }
.timeoff-list li.now { border-color: #cdbdf0; background: #faf7ff; }
.timeoff-list li.past { opacity: .6; }
.timeoff-list li.empty { border-style: dashed; justify-content: center; font-size: 13px; }
.to-when { font-weight: 650; min-width: 112px; font-variant-numeric: tabular-nums; }
.to-what { flex: 1; min-width: 0; }
.to-what small { display: block; color: var(--muted); font-size: 12px; }
.to-tag { font-size: 11px; font-weight: 700; color: #5b3fa6; background: #ece4fb; padding: 2px 8px; border-radius: 999px; }
.to-del { width: 28px; height: 28px; font-size: 18px; line-height: 1; }
.timeoff-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.timeoff-form .field { margin: 0; flex: 0 1 150px; }
.timeoff-form .field.grow { flex: 1 1 180px; }
.timeoff-form button { height: 38px; }
.chip.off { background: #f1ecfb; color: #5b3fa6; }
.whos-off { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 0 0 16px; }
.wo-col { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface, #fff); min-width: 0; }
.wo-col h3 { margin: 0 0 8px; font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.wo-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wo-col li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.wo-person { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-weight: 600; min-width: 0; }
.wo-person:hover { text-decoration: underline; }
.wo-person .who-av { width: 24px; height: 24px; font-size: 10px; }
.wo-why { color: var(--muted); text-align: right; }
.wo-why b { color: var(--ink, inherit); font-weight: 600; }

/* ---------- footer ---------- */
.app-foot { flex-shrink: 0; margin-top: auto; padding: 8px 16px; text-align: center; font-size: 11.5px; color: var(--muted); letter-spacing: .01em; }
body.board-page .app-foot, .login-page .app-foot { padding: 5px 16px; color: rgba(255, 255, 255, .62); }
.login-page .login-card { margin-top: auto; }

/* Admin console: Slack channels */
.slack-form { display: grid; gap: 12px; max-width: 900px; }
.slack-site { display: grid; grid-template-columns: 220px 1fr 1.4fr; align-items: center; gap: 12px; font-size: 13px; }
.slack-site.head { font-size: 12px; color: var(--muted, #6b7280); font-weight: 500; }
.slack-site [data-site][hidden] { display: block; visibility: hidden; } /* keeps the columns lined up in shared-channel mode */
.slack-form #slackSites { display: grid; gap: 12px; }
.slack-row { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 12px; font-size: 13px; font-weight: 500; }
.slack-row[hidden] { display: none; }
.slack-shared { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.slack-form .perm-actions { justify-content: flex-start; }
@media (max-width: 600px) { .slack-row, .slack-site { grid-template-columns: 1fr; gap: 4px; } .slack-site.head { display: none; } }
