﻿/* Success Trader Task Board — styled to match the Success Trader site.
   Palette, type and the chrome CTA are lifted from the live site's tokens. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Saira:wght@500;600;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  /* Straight from the Success Trader site */
  --bg: #03060e;
  --surface-1: #0b0e17;
  --surface-2: #141823;
  --line: hsla(0, 0%, 100%, .06);
  --line-strong: hsla(0, 0%, 100%, .14);
  --ink: #ffffff;
  /* Secondary text is pure white too — readability beats hierarchy on a
     trading-floor screen. Emphasis comes from weight and size instead. */
  --muted: #ffffff;
  --brand: #2f7fe8;
  --accent-blue: #8fc2ff;
  --chrome-cta: linear-gradient(180deg, #fff, #d6dade 22%, #9a9ea3 52%, #c8ccd1 74%, #6f7378);
  --cta-text: #0a0a0a;
  --cta-stroke: #1f2024;

  --urgent: #f4476b;   /* site accent-down */
  --semi:   #e2a03f;
  --not:    #5a5e63;   /* site silver-deep */
  --done:   #1fbf75;   /* site accent-candle-up */
  --danger: #f4476b;

  --head: 'Saira', ui-sans-serif, system-ui, sans-serif;
  --body: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
}
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  font-size: 15.4px;   /* base 14px + 10% */
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .brand-name { font-family: var(--head); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small-text { font-size: 13.2px; }
.error { color: var(--danger); margin-top: 6px; }

button, input, select, textarea { font: inherit; color: inherit; }
.btn {
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--ink);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 14.3px;
  transition: border-color .15s, background .15s;
}
.btn:hover { border-color: hsla(0, 0%, 100%, .28); background: #1b2030; }
/* The site's signature brushed-chrome CTA */
.btn.primary {
  background: var(--chrome-cta);
  border: 1px solid var(--cta-stroke);
  color: var(--cta-text);
  font-weight: 700;
  letter-spacing: .13px;
}
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: rgba(244, 71, 107, .12); border-color: var(--danger); }
/* Second click confirms — deliberately loud so it can't be hit by accident. */
.btn.danger.armed {
  background: var(--danger); color: #fff; font-weight: 700;
  animation: armed-pulse 1s ease-in-out infinite;
}
@keyframes armed-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 71, 107, .5); }
  50%      { box-shadow: 0 0 0 5px rgba(244, 71, 107, 0); }
}
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn.small { padding: 4px 10px; font-size: 13.75px; }

/* Every text-like input, whatever its type — listing types individually meant a
   new one (time, number, search) silently kept the browser's white default. */
input:not([type=checkbox]):not([type=radio]):not([type=range]),
select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--surface-1);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47, 127, 232, .18);
}
/* Makes the native date/time pickers and their icons render dark too. */
input[type=date], input[type=time], input[type=datetime-local] { color-scheme: dark; }
textarea { resize: vertical; }
/* Kept slightly transparent so placeholders don't read as typed-in text. */
::placeholder { color: rgba(255, 255, 255, .6); }

/* ---- Sign-in ---- */
.signin-overlay {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
}
.signin-card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.signin-card h1 {
  font-size: 28.6px; margin-bottom: 4px; font-weight: 700; letter-spacing: -.01em;
}
.signin-card .sub {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-blue); margin-bottom: 14px;
}
.signin-custom { display: flex; gap: 8px; margin-top: 6px; }

/* ---- Header ---- */
header {
  display: flex; align-items: center; gap: 22px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--line);
  padding: 12px 18px;
  flex-wrap: wrap;
}
.brand { line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 19.8px; letter-spacing: -.01em; display: block; }
.brand-sub {
  display: block; font-size: 10.45px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent-blue); margin-top: 2px;
}
#tabs { display: flex; gap: 2px; }
.tab {
  border: none; background: transparent; padding: 7px 13px;
  border-radius: 8px; cursor: pointer; color: var(--muted);
  font-weight: 500; font-size: 14.3px;
}
.tab:hover { color: var(--ink); background: var(--surface-2); }
.tab.active { background: rgba(47, 127, 232, .16); color: var(--accent-blue); font-weight: 600; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.counts { display: flex; gap: 6px; flex-wrap: wrap; }
.count-chip {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 20px; padding: 3px 10px; font-size: 13.2px; color: var(--muted);
}
.count-chip b { margin-right: 3px; color: var(--ink); }
.count-chip.warn { border-color: rgba(244, 71, 107, .5); color: var(--urgent); }
.count-chip.warn b { color: var(--urgent); }
.me-badge { font-weight: 600; font-size: 14.3px; }

/* ---- Filter bar ---- */
.filterbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; flex-wrap: wrap;
}
.filterbar select { width: auto; }
#f-search { width: 230px; }
#f-search::-webkit-search-cancel-button { filter: invert(1); cursor: pointer; }
.filterbar.search-only > *:not(#f-search) { display: none; }
/* Leads is search-only but still needs its create button. */
.filterbar.search-only.allow-new > #btn-new { display: inline-block; }

/* Divider between today's work and the rest of the board */
.section-split {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 4px 10px; color: var(--accent-blue);
  font-size: 11px; text-transform: uppercase; letter-spacing: .16em; font-weight: 600;
}
.section-split::after {
  content: ''; flex: 1; height: 1px; background: var(--line-strong);
}
.chk { display: flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }

main { padding: 0 18px 30px; }

/* ---- Board ---- */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.col {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  min-height: 120px;
}
.col h3 {
  font-size: 11.55px; text-transform: uppercase; letter-spacing: .16em;
  color: var(--accent-blue); margin: 2px 4px 12px; font-weight: 600;
}
.col h3 .n { float: right; color: var(--muted); letter-spacing: 0; }

.card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--not);
  border-radius: 10px;
  padding: 11px 13px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color .15s, transform .1s;
}
/* Keep the priority stripe on hover — only the other three edges brighten. */
.card:hover {
  border-top-color: var(--line-strong);
  border-right-color: var(--line-strong);
  border-bottom-color: var(--line-strong);
  transform: translateY(-1px);
}
.card.p-urgent { border-left-color: var(--urgent); }
.card.p-semi { border-left-color: var(--semi); }
.card.p-not { border-left-color: var(--not); }

/* Past due — anything not finished by its time/date shouts. Beats priority. */
.card.is-overdue {
  background: rgba(244, 71, 107, .13);
  border-color: rgba(244, 71, 107, .55);
  border-left-color: var(--urgent);
}
.card.is-overdue:hover {
  border-top-color: rgba(244, 71, 107, .8);
  border-right-color: rgba(244, 71, 107, .8);
  border-bottom-color: rgba(244, 71, 107, .8);
}
.card.is-overdue .card-title { color: #ff9db2; font-weight: 700; }

.card.is-done { opacity: .75; }
.card.is-done .card-title { text-decoration: line-through; }
.card-title { font-weight: 600; margin-bottom: 6px; }
.card-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13.2px; color: var(--muted); }

.badge {
  border-radius: 5px; padding: 2px 8px; font-size: 11.55px; font-weight: 700;
  letter-spacing: .04em; justify-self: start; border: 1px solid transparent;
}
.badge.p-urgent { background: rgba(244, 71, 107, .16); color: #ff87a1; border-color: rgba(244, 71, 107, .4); }
.badge.p-semi   { background: rgba(226, 160, 63, .16); color: #f0bd77; border-color: rgba(226, 160, 63, .4); }
.badge.p-not    { background: rgba(246, 247, 249, .07); color: #fff; border-color: var(--line-strong); }
.due { font-size: 13.2px; }
.est {
  font-size: 12.1px; color: var(--muted); border: 1px solid var(--line-strong);
  border-radius: 4px; padding: 0 6px;
}
.due.overdue { color: var(--urgent); font-weight: 700; }
.due.soon { color: var(--semi); font-weight: 600; }

.progress { background: rgba(255, 255, 255, .08); border-radius: 5px; height: 6px; margin-top: 9px; overflow: hidden; }
.progress > div { height: 100%; background: var(--brand); border-radius: 5px; transition: width .25s; }
.progress.full > div { background: var(--done); }
.pct-label { font-size: 12.1px; color: var(--muted); margin-top: 4px; }

/* ---- List view ---- */
.list { background: var(--surface-1); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.view-note { padding: 0 18px 10px; color: var(--muted); font-size: 13.75px; }
.chk { color: var(--muted); font-size: 14.3px; }
.chk input { accent-color: var(--brand); }
.list-row input[type=checkbox] { accent-color: var(--done); }
.history { color: var(--muted); }
.history b { color: var(--accent-blue); }
main { min-height: 60vh; }

.board-tag {
  border-radius: 4px; padding: 2px 8px; font-size: 12.1px; font-weight: 700;
  justify-self: start; border: 1px solid var(--line);
}
.board-tag.b-daily { background: rgba(47, 127, 232, .16); color: var(--accent-blue); border-color: rgba(47, 127, 232, .38); }
.board-tag.b-misc { background: rgba(246, 247, 249, .07); color: #fff; border-color: var(--line-strong); }

.list-row {
  display: grid;
  grid-template-columns: 24px 1fr 78px 130px 105px 115px 100px 120px;
  gap: 10px; align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.list-row:hover { background: var(--surface-2); }
.list-row.head {
  font-weight: 600; font-size: 11px; color: var(--accent-blue); cursor: default;
  text-transform: uppercase; letter-spacing: .16em; background: rgba(255,255,255,.02);
}
.list-row.head:hover { background: rgba(255,255,255,.02); }
.list-row:last-child { border-bottom: none; }
.list-row.is-overdue { background: rgba(244, 71, 107, .13); box-shadow: inset 3px 0 0 var(--urgent); }
.list-row.is-overdue:hover { background: rgba(244, 71, 107, .2); }
.list-row.is-overdue .lt { color: #ff9db2; font-weight: 700; }
.list-row.is-done { opacity: .75; }
.list-row.is-done .lt { text-decoration: line-through; }
.list-row input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }
.list-row .progress { margin-top: 0; }

/* ---- Activity feed ---- */
.activity-feed { max-width: 760px; }
.act-item {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 14px; margin-bottom: 6px;
  display: flex; gap: 10px; align-items: baseline;
}
.act-item .who { font-weight: 600; white-space: nowrap; }
.act-item .when { margin-left: auto; color: var(--muted); font-size: 13.2px; white-space: nowrap; }
.act-item .tlink { color: var(--accent-blue); cursor: pointer; }
.act-item .tlink:hover { text-decoration: underline; }

/* ---- Team ---- */
.team { max-width: 560px; }
.team-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 14px; margin-bottom: 6px;
}
.team-row .name { font-weight: 600; }
.team-row .email { color: var(--muted); font-size: 13.2px; }
.team-row .spacer { margin-left: auto; }
.team-row.inactive { opacity: .5; }
.team-add { display: flex; gap: 8px; margin-top: 12px; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(3, 6, 14, .75);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; z-index: 40; overflow-y: auto;
}
.modal {
  background: var(--surface-1); border: 1px solid var(--line-strong); border-radius: 14px;
  width: 860px; max-width: 100%;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
}
.modal-head h2 { font-size: 19.8px; font-weight: 700; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.modal-body { display: flex; gap: 24px; padding: 18px 20px; }
.modal-main { flex: 1.2; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.modal-side { flex: 1; min-width: 0; border-left: 1px solid var(--line); padding-left: 20px; }
.modal-side h3 {
  font-size: 11px; text-transform: uppercase; letter-spacing: .16em;
  color: var(--accent-blue); margin: 14px 0 8px; font-weight: 600;
}
.modal label {
  display: flex; flex-direction: column; gap: 5px; font-size: 12.1px;
  font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--muted);
}
.modal label input, .modal label select, .modal label textarea {
  font-size: 15.4px; font-weight: 400; text-transform: none; letter-spacing: normal; color: var(--ink);
}
.modal .row { display: flex; gap: 12px; }
.modal label .hint { text-transform: none; letter-spacing: normal; font-weight: 400; opacity: .75; }

.assignee-picker {
  display: flex; flex-wrap: wrap; gap: 6px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--surface-1); padding: 7px 8px;
}
.assignee-picker label {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--line-strong); border-radius: 20px;
  padding: 3px 11px 3px 8px; cursor: pointer;
  font-size: 13.2px; font-weight: 500; text-transform: none;
  letter-spacing: normal; color: var(--ink); user-select: none;
}
.assignee-picker label:hover { border-color: hsla(0, 0%, 100%, .3); }
.assignee-picker label.on { background: rgba(47, 127, 232, .2); border-color: var(--brand); }
.assignee-picker input { accent-color: var(--brand); margin: 0; }
.assignee-picker .none { color: var(--muted); font-size: 13.2px; padding: 3px 4px; }
.lab-new {
  border: 1px dashed var(--line-strong); border-radius: 20px; background: transparent;
  color: var(--accent-blue); padding: 3px 11px; cursor: pointer; font-size: 13.2px;
}
.lab-new:hover { border-color: var(--brand); }
.lab-new-input {
  width: 170px; border-radius: 20px; padding: 3px 11px;
  font-size: 13.2px; border: 1px solid var(--brand);
}

/* Labels on cards and rows */
.lab-chip {
  display: inline-block; font-size: 11.5px; font-weight: 600;
  color: var(--accent-blue); background: rgba(47, 127, 232, .14);
  border: 1px solid rgba(47, 127, 232, .32); border-radius: 4px;
  padding: 0 6px; margin-left: 5px; white-space: nowrap;
}
.card-labels { margin-bottom: 6px; }
.card-labels .lab-chip { margin-left: 0; margin-right: 5px; }
.sub-badge {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  border: 1px solid var(--line-strong); border-radius: 4px;
  padding: 0 6px; margin-left: 6px; color: var(--muted);
}

/* Steps (subtasks) */
.subtasks-block { border-top: 1px solid var(--line); padding-top: 12px; }
.sub-head {
  font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  font-weight: 600; color: var(--muted); margin-bottom: 8px;
}
.subtasks { display: flex; flex-direction: column; gap: 4px; max-height: 190px; overflow-y: auto; }
.subtask {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 7px; padding: 5px 9px;
}
.subtask input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--done); cursor: pointer; flex: none; }
.subtask span { flex: 1; }
.subtask.done span { text-decoration: line-through; opacity: .65; }
.sub-del {
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; font-size: 17px; line-height: 1; padding: 0 4px;
}
.sub-del:hover { color: var(--danger); }
.sub-add { margin-top: 8px; }

/* Non-blocking error banner */
.flash-error {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(12px);
  background: var(--surface-2); border: 1px solid var(--danger); color: #ff9db2;
  border-radius: 10px; padding: 11px 18px; font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 60;
}
.flash-error.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Archive controls: who completed what, and how to group it */
.arch-controls {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.arch-people { display: flex; gap: 6px; flex-wrap: wrap; }
.arch-chip {
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 20px; padding: 5px 13px; cursor: pointer;
  font-size: 13.2px; color: var(--ink);
}
.arch-chip:hover { border-color: hsla(0, 0%, 100%, .3); }
.arch-chip.on { background: rgba(47, 127, 232, .2); border-color: var(--brand); color: var(--accent-blue); }
.arch-chip b { margin-left: 5px; color: var(--accent-blue); }
.arch-chip.on b { color: #fff; }
.arch-group { display: flex; align-items: center; gap: 6px; }
.arch-toggle {
  background: transparent; border: 1px solid var(--line-strong);
  border-radius: 7px; padding: 4px 12px; cursor: pointer;
  font-size: 13.2px; color: var(--muted);
}
.arch-toggle.on { background: rgba(47, 127, 232, .2); border-color: var(--brand); color: var(--accent-blue); }

/* Archive */
.arch-day {
  font-size: 12px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--accent-blue); margin: 18px 0 8px; font-weight: 600;
}
.arch-day:first-child { margin-top: 0; }
.modal input[type=range] { accent-color: var(--brand); padding: 0; }
#m-pct-label { color: var(--accent-blue); }
.modal .row label { flex: 1; }
.modal-actions { display: flex; gap: 10px; align-items: center; }

.comments { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.comment { background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.comment .c-head { font-size: 13.2px; color: var(--muted); margin-bottom: 3px; }
.comment .c-head b { color: var(--accent-blue); }
.comment .c-body { white-space: pre-wrap; }
.comment-box { display: flex; gap: 8px; margin-top: 8px; align-items: flex-end; }
.history { max-height: 200px; overflow-y: auto; font-size: 13.2px; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }
.history b { color: var(--ink); }

@media (max-width: 900px) {
  .board { grid-template-columns: 1fr; }
  .modal-body { flex-direction: column; }
  .modal-side { border-left: none; padding-left: 0; }
  .list-row { grid-template-columns: 24px 1fr 70px 110px; }
  .list-row .hide-sm { display: none; }
}

/* ---- Board drag-and-drop ----
   The card being carried, and the column it would land in. Both cues matter:
   without them a drag over a busy board gives no sign it will be accepted. */
.card.dragging {
  opacity: .45;
  cursor: grabbing;
}

.col.drop-target {
  border-color: var(--accent-blue);
  background: rgba(47, 127, 232, .09);
}

/* ---- Leads pipeline ----
   Nine stages will not fit as equal columns the way the three-status task board
   does, so this scrolls sideways with columns of a fixed, readable width rather
   than squeezing every stage into an unreadable sliver. */
.pipeline {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 10px;
}
.pipeline .stage-col {
  flex: 0 0 232px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  min-height: 120px;
}
.pipeline .stage-col h3 {
  font-size: 13.2px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 10px;
  color: var(--muted);
}
.pipeline .stage-col h3 .n { float: right; letter-spacing: 0; }
.stage-col.drop-target { border-color: var(--accent-blue); background: rgba(47, 127, 232, .09); }

.lead-card {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--brand);
  border-radius: 10px;
  padding: 10px 11px;
  margin-bottom: 9px;
  cursor: pointer;
  transition: border-color .15s, transform .12s;
}
.lead-card:hover { border-color: var(--accent-blue); transform: translateY(-1px); }
.lead-card.dragging { opacity: .45; cursor: grabbing; }
.lead-name { font-weight: 600; margin-bottom: 6px; }
.lead-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 6px; }
.lead-meta {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 13.2px; color: var(--muted);
}
.lead-meta .unowned { opacity: .55; font-style: italic; }
.lead-meta .acct { color: var(--accent-blue); font-variant-numeric: tabular-nums; }

.res-chip {
  font-size: 11.5px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .05);
}
/* Domestic and foreign decide the whole document set, so they are worth
   telling apart at a glance from across the desk. */
.res-chip.r-domestic { background: rgba(47, 127, 232, .18); border-color: rgba(47, 127, 232, .45); color: var(--accent-blue); }
.res-chip.r-foreign  { background: rgba(226, 160, 63, .18); border-color: rgba(226, 160, 63, .5); color: #f0c078; }
.res-chip.r-entity   { background: rgba(31, 191, 117, .16); border-color: rgba(31, 191, 117, .45); color: #6fe0ab; }

/* ---- Lead checklist (in the modal) ---- */
.lead-checklist { max-height: 46vh; overflow-y: auto; padding-right: 4px; }
.ck-section { margin-bottom: 14px; }
.ck-head {
  font-size: 12.1px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent-blue);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  margin-bottom: 6px;
}
.ck-head .small-text { float: right; text-transform: none; letter-spacing: 0; opacity: .7; }
.ck-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  border-radius: 6px;
}
.ck-row:hover { background: var(--surface-2); }
.ck-row input[type=checkbox] { accent-color: var(--done); flex: 0 0 auto; }
.ck-title { flex: 1; min-width: 0; }
.ck-row.is-done .ck-title { text-decoration: line-through; opacity: .6; }
.ck-by { font-size: 12.1px; color: var(--accent-blue); white-space: nowrap; }
/* The row buttons stay quiet until you are actually on the row — a checklist of
   thirty lines with sixty visible buttons is unreadable. */
.ck-row .btn { opacity: 0; transition: opacity .12s; }
.ck-row:hover .btn, .ck-row .ck-open { opacity: 1; }
.lead-add { display: flex; gap: 8px; }
.lead-add select { flex: 0 0 auto; }
.lead-add input { flex: 1; }
/* A tick-box with its explanation beside it, rather than the modal's default
   stacked-uppercase-label treatment, which turned the sentence into a heading. */
.modal label.chk-inline {
  flex-direction: row;
  align-items: center;
  gap: 9px;
  flex: 1.6;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  font-size: 14.3px;
  color: var(--ink);
  align-self: flex-end;
  padding-bottom: 7px;
}
.modal label.chk-inline input { flex: 0 0 auto; width: auto; accent-color: var(--brand); }

/* The heading carries a right-hand action, so lay it out rather than floating:
   a float here pulled the checklist below it into a narrow column. */
.subtasks-block .sub-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.subtasks-block .sub-head > .btn { margin-left: auto; }
#l-progress { text-transform: none; letter-spacing: normal; font-weight: 400; }

/* ---- Template editor ---- */
.tpl-list { max-height: 52vh; overflow-y: auto; padding-right: 4px; }
.tpl-text {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 8px;
}
.tpl-text:focus { border-color: var(--accent-blue); outline: none; }
.tpl-add { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
/* The two selects size to their longest option, which left the text field with
   almost no room. Cap them and let the field take what is left. */
.tpl-add select { flex: 0 1 auto; max-width: 180px; }
.tpl-add input { flex: 1 1 220px; min-width: 160px; }
.tpl-add .btn { flex: 0 0 auto; }

/* In the template editor the remove button is the only affordance on the row,
   so it stays visible instead of appearing on hover like the checklist rows. */
.tpl-list .ck-row .btn { opacity: .5; }
.tpl-list .ck-row:hover .btn { opacity: 1; }

@media (max-width: 900px) {
  .pipeline .stage-col { flex: 0 0 200px; }
}
