/* Bruce Labs CRM. Same colors and type as brucelabs.io. No inline styles anywhere: the page's
   security policy only allows this file. */
@font-face {
  font-family: 'IBM Plex Serif';
  src: url(/fonts/plex-serif-600-latin.woff2) format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url(/fonts/plex-sans-var-latin.woff2) format('woff2');
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
:root {
  --paper: #f6f3ec;
  --sheet: #fffdf8;
  --ink: #1a1c20;
  --ink-2: #4a4d55;
  --ink-3: #5f626a;
  --rule: #dcd5c7;
  --rule-2: #ebe5d9;
  --blue: #1d3f8f;
  --blue-dk: #15306f;
  --wash: #e9edf7;
  --navy: #14234a;
  --green: #1f6b45;
  --green-wash: #e3f1e8;
  --amber: #8a5a00;
  --amber-wash: #fbf1d9;
  --red: #a8321f;
  --red-wash: #f8e4df;
  --shadow: 0 8px 30px rgba(20, 35, 74, 0.18);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #15171c;
    --sheet: #1d2027;
    --ink: #ecebe6;
    --ink-2: #c3c3bf;
    --ink-3: #9a9b9f;
    --rule: #343842;
    --rule-2: #2a2d35;
    --blue: #8fb0ff;
    --blue-dk: #b3c8ff;
    --wash: #222a3d;
    --navy: #0e1424;
    --green: #7fd1a2;
    --green-wash: #1c3027;
    --amber: #f0c36a;
    --amber-wash: #3a3220;
    --red: #f19a87;
    --red-wash: #3b231f;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #15171c;
  --sheet: #1d2027;
  --ink: #ecebe6;
  --ink-2: #c3c3bf;
  --ink-3: #9a9b9f;
  --rule: #343842;
  --rule-2: #2a2d35;
  --blue: #8fb0ff;
  --blue-dk: #b3c8ff;
  --wash: #222a3d;
  --navy: #0e1424;
  --green: #7fd1a2;
  --green-wash: #1c3027;
  --amber: #f0c36a;
  --amber-wash: #3a3220;
  --red: #f19a87;
  --red-wash: #3b231f;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.5 'IBM Plex Sans',
    system-ui,
    -apple-system,
    sans-serif;
}
a {
  color: var(--blue);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
h1,
h2 {
  font-family: 'IBM Plex Serif', Georgia, serif;
  font-weight: 600;
}
h1 {
  font-size: 26px;
  line-height: 1.2;
  margin: 0 0 4px;
}
h2 {
  font-size: 18px;
  margin: 0 0 10px;
}
h3 {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 16px 0 6px;
  font-weight: 600;
}
p {
  margin: 0 0 8px;
}
.muted {
  color: var(--ink-3);
}
.small {
  font-size: 13px;
}
[hidden] {
  display: none !important;
}

/* shell */
.app {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}
.side {
  background: var(--navy);
  color: #e8eaf2;
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  font:
    600 17px 'IBM Plex Serif',
    Georgia,
    serif;
  color: #fff;
  padding: 4px 10px 14px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.brand i {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f6f3ec;
  color: #14234a;
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 600;
}
.side a {
  color: #d6dae6;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 36px;
}
.side a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.side a[aria-current='page'] {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 600;
}
.badge {
  background: #f0c36a;
  color: #14234a;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  padding: 0 7px;
  min-width: 20px;
  text-align: center;
}
.side .foot {
  margin-top: auto;
  font-size: 12px;
  color: #aab1c6;
  padding: 10px;
}
.main {
  min-width: 0;
}
.topbar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--rule);
  background: var(--sheet);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar input {
  flex: 1;
  max-width: 420px;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 8px;
  padding: 7px 12px;
  min-height: 36px;
}
.sample {
  margin-left: auto;
  font-size: 12px;
  background: var(--amber-wash);
  color: var(--amber);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}
.page {
  padding: 22px 24px 80px;
  max-width: 1240px;
}
.pagehead {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* bits */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: var(--sheet);
  border-radius: 8px;
  padding: 7px 14px;
  min-height: 36px;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
}
.btn:hover {
  background: var(--blue-dk);
  border-color: var(--blue-dk);
}
.btn.ghost {
  background: var(--sheet);
  color: var(--blue);
}
.btn.ghost:hover {
  background: var(--wash);
}
.btn.quiet {
  background: transparent;
  border-color: var(--rule);
  color: var(--ink-2);
  font-weight: 500;
}
.btn.danger {
  background: var(--sheet);
  border-color: var(--red);
  color: var(--red);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.card {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 16px;
}
.grid {
  display: grid;
  gap: 16px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.stat {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 12px 14px;
}
.stat b {
  display: block;
  font:
    600 26px/1.1 'IBM Plex Serif',
    Georgia,
    serif;
}
.stat span {
  font-size: 13px;
  color: var(--ink-3);
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px solid var(--rule-2);
}
.item:first-child {
  border-top: 0;
  padding-top: 2px;
}
.item .body {
  flex: 1;
  min-width: 0;
}
.item .title {
  font-weight: 600;
}
.item .title a {
  color: var(--ink);
  text-decoration: none;
}
.item .title a:hover {
  color: var(--blue);
  text-decoration: underline;
}
.item .snip {
  color: var(--ink-2);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.item .acts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: none;
}
.rank {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--wash);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  display: inline-block;
  margin-right: 6px;
  vertical-align: 1px;
}
.stage {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--blue);
  white-space: nowrap;
}
.stage[data-s='To contact'] {
  background: var(--rule-2);
  color: var(--ink-2);
}
.stage[data-s='Replied'],
.stage[data-s='Call booked'] {
  background: var(--amber-wash);
  color: var(--amber);
}
.stage[data-s='Plan sent'],
.stage[data-s='Building'],
.stage[data-s='Paying'] {
  background: var(--green-wash);
  color: var(--green);
}
.stage[data-s='Not now'],
.stage[data-s='Not a fit'] {
  background: var(--rule-2);
  color: var(--ink-3);
}
.tag {
  display: inline-block;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--ink-3);
  white-space: nowrap;
}
.tag.warn {
  border-color: var(--amber);
  color: var(--amber);
}
.tag.bad {
  border-color: var(--red);
  color: var(--red);
}
.empty {
  color: var(--ink-3);
  padding: 6px 0;
}
.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.chips button {
  border: 1px solid var(--rule);
  background: var(--sheet);
  border-radius: 999px;
  padding: 4px 12px;
  min-height: 32px;
  cursor: pointer;
  font-size: 13px;
}
.chips button[aria-pressed='true'] {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--sheet);
}

/* table */
.tablewrap {
  overflow-x: auto;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rule-2);
  white-space: nowrap;
}
th {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 600;
  background: var(--paper);
  position: sticky;
  top: 0;
}
tbody tr {
  cursor: pointer;
}
tbody tr:hover {
  background: var(--wash);
}
td.name {
  white-space: normal;
  min-width: 200px;
  font-weight: 600;
}
td.over {
  color: var(--red);
  font-weight: 600;
}

/* pipeline */
.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.col {
  background: var(--rule-2);
  border-radius: 10px;
  padding: 10px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.col.drop {
  outline: 2px dashed var(--blue);
  outline-offset: -2px;
}
.col h2 {
  font:
    600 13px 'IBM Plex Sans',
    sans-serif;
  display: flex;
  justify-content: space-between;
  margin: 2px 4px 4px;
  color: var(--ink-2);
}
.pcard {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 9px 10px;
  cursor: grab;
  font-size: 13px;
}
.pcard b {
  display: block;
  font-size: 14px;
}
.pcard:active {
  cursor: grabbing;
}
.col .more {
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  padding: 4px;
}

/* detail */
.dhead {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.dhead .rank {
  width: 38px;
  height: 38px;
  font-size: 14px;
}
.dhead .t {
  flex: 1;
  min-width: 240px;
}
.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 4px 0 16px;
}
.controls label {
  font-size: 13px;
  color: var(--ink-3);
  display: flex;
  gap: 6px;
  align-items: center;
}
.controls select,
.controls input[type='date'] {
  border: 1px solid var(--rule);
  background: var(--sheet);
  border-radius: 8px;
  padding: 6px 8px;
  min-height: 36px;
}
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 16px;
  align-items: start;
}
.facts {
  margin: 0 0 6px;
  padding-left: 18px;
  font-size: 14px;
}
.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  font-size: 14px;
}
.kv dt {
  color: var(--ink-3);
}
.kv dd {
  margin: 0;
  word-break: break-word;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.timeline li {
  position: relative;
  padding: 0 0 16px 26px;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: var(--rule-2);
}
.timeline li:last-child::before {
  display: none;
}
.ticon {
  position: absolute;
  left: 0;
  top: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--sheet);
  border: 2px solid var(--ink-3);
}
.timeline li[data-t='out'] .ticon {
  border-color: var(--green);
  background: var(--green-wash);
}
.timeline li[data-t='in'] .ticon {
  border-color: var(--amber);
  background: var(--amber-wash);
}
.timeline li[data-t='stage'] .ticon {
  border-color: var(--blue);
  background: var(--wash);
}
.thead {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.thead b {
  font-size: 14px;
}
.thead time {
  font-size: 12px;
  color: var(--ink-3);
}
.timeline details {
  margin-top: 4px;
}
.timeline summary {
  cursor: pointer;
  color: var(--ink-2);
  font-size: 14px;
}
.mail {
  white-space: pre-wrap;
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 6px;
  font-size: 14px;
}
.notebox {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.notebox textarea {
  flex: 1;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 40px;
  resize: vertical;
}
.alert {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 12px;
}
.alert.warn {
  background: var(--amber-wash);
  color: var(--ink);
}
.alert.bad {
  background: var(--red-wash);
}

/* composer */
dialog {
  border: 0;
  border-radius: 12px;
  padding: 0;
  width: min(720px, calc(100vw - 24px));
  background: var(--sheet);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: rgba(10, 14, 30, 0.45);
}
.dlg {
  padding: 18px 20px;
}
.dlg h2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.field {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--rule-2);
  padding: 6px 0;
  font-size: 14px;
}
.field label {
  color: var(--ink-3);
}
.field input,
.field select {
  border: 0;
  background: transparent;
  padding: 6px 0;
  min-height: 32px;
  outline-offset: 2px;
}
.dlg textarea {
  width: 100%;
  min-height: 280px;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
}
.dlgfoot {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.dlgfoot .muted {
  margin-right: auto;
  font-size: 13px;
}
.x {
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-3);
  min-width: 32px;
  min-height: 32px;
}

/* sign in */
.signin {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--navy);
}
.signin .card {
  width: min(400px, 100%);
  padding: 28px;
  text-align: center;
}
.signin .logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--navy);
  color: #f6f3ec;
  font:
    600 28px 'IBM Plex Serif',
    Georgia,
    serif;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
}
.signin .btn {
  width: 100%;
  margin-top: 14px;
  min-height: 44px;
}
.signin input {
  width: 100%;
  text-align: center;
  letter-spacing: 0.4em;
  font-size: 22px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 8px;
  margin-top: 12px;
  background: var(--paper);
}
.signin .linkbtn {
  background: none;
  border: 0;
  color: var(--blue);
  cursor: pointer;
  margin-top: 12px;
  text-decoration: underline;
  min-height: 32px;
}

/* settings */
.set {
  display: grid;
  gap: 16px;
  max-width: 780px;
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--rule-2);
}
.row:first-of-type {
  border-top: 0;
}
.row input[type='number'] {
  width: 80px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 6px 8px;
  background: var(--paper);
}
.ok {
  color: var(--green);
  font-weight: 600;
}
.warnc {
  color: var(--amber);
  font-weight: 600;
}
.tpl textarea {
  width: 100%;
  min-height: 170px;
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 8px;
  padding: 10px;
  font-size: 14px;
  line-height: 1.55;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 50;
  font-size: 14px;
  max-width: calc(100vw - 32px);
}

@media (max-width: 1000px) {
  .detail,
  .two {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .app {
    grid-template-columns: 1fr;
  }
  .side {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    height: auto;
    flex-direction: row;
    justify-content: space-around;
    padding: 6px 4px;
    z-index: 20;
    gap: 0;
  }
  .brand,
  .side .foot,
  .side .hide-s {
    display: none;
  }
  .side a {
    flex-direction: column;
    font-size: 11px;
    padding: 6px 4px;
    gap: 2px;
    min-width: 56px;
    justify-content: center;
  }
  .badge {
    font-size: 10px;
    padding: 0 5px;
  }
  .topbar {
    padding: 10px 16px;
  }
  .page {
    padding: 16px 16px 100px;
  }
  .sample {
    display: none;
  }
  .item {
    flex-wrap: wrap;
  }
  .item .acts {
    width: 100%;
    padding-left: 40px;
  }
}

/* real-app additions */
.over {
  color: var(--red);
}
.right {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mt {
  margin-top: 8px;
}
.mt16 {
  margin-top: 16px;
}
.err {
  background: var(--red-wash);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 14px;
  margin-top: 10px;
}
.loading {
  padding: 40px 24px;
  color: var(--ink-3);
}
.form {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.form label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--ink-3);
}
.form input,
.form textarea,
.form select {
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: 8px;
  padding: 8px 10px;
  min-height: 38px;
  font-size: 15px;
  color: var(--ink);
}
.form textarea {
  min-height: 120px;
  resize: vertical;
}
.form .two {
  gap: 10px;
}
.row input[type='text'] {
  width: min(320px, 100%);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 6px 8px;
  background: var(--paper);
}
.audit {
  max-height: 60vh;
  overflow: auto;
  font-size: 14px;
}
.audit li {
  padding: 6px 0;
  border-top: 1px solid var(--rule-2);
}
.dangerzone {
  border-color: var(--red);
}
.btn.google svg {
  fill: currentColor;
}
.signin .alt {
  display: block;
  margin: 10px auto 0;
}
.chips .muted {
  font-size: 12px;
}
@media (max-width: 760px) {
  .item .acts {
    padding-left: 0;
  }
  .form .two {
    grid-template-columns: 1fr;
  }
}
