/* SDD CRM
   Mobile first. Dusk ground taken from the studio's own artwork. Brush red is
   kept for actions. Deal cards are stitched on like patches, after the dog. */

:root {
  --bg: #17141b;
  --bg-2: #1e1a23;
  --card: rgba(38, 33, 44, 0.92);
  --card-2: rgba(18, 15, 22, 0.72);
  --line: rgba(208, 223, 223, 0.18);
  --line-2: rgba(208, 223, 223, 0.1);
  --seam: rgba(208, 223, 223, 0.34);
  --text: #f3f1ec;
  --text-2: #b4adb9;
  --muted: #ceb77a;
  --accent: #ef495a;
  --accent-2: #ffb3ba;
  --blue: #8fa8dc;
  --lime: #b7cd33;
  --tan: #ceb77a;
  --gold: #f2d36b;
  --red: #ff8a8a;
  --radius: 14px;
  --radius-s: 10px;
  --sans: 'Raleway', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: "lnum" 1, "tnum" 1;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

h1, h2, h3 {
  margin: 0;
  color: #ffffff;
}

.mono {
  font-family: var(--mono);
}

.label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.muted {
  color: var(--text-2);
}

.hidden {
  display: none !important;
}

/* ---------- shell ---------- */

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(16, 13, 19, 0.9);
  border-bottom: 1px solid var(--line-2);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #f39836, #1f9f68);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d0a0d;
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 0 20px rgba(239, 73, 90, 0.35);
}

.brand-name {
  font-weight: 600;
  font-size: 14px;
}

.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}

.brand-co {
  display: none;
  font-weight: 300;
  font-size: 18px;
  letter-spacing: 0.01em;
  text-transform: lowercase;
}

.brand .brand-name {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.topbar .spacer {
  flex: 1;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

.body {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
}

.sidenav {
  display: none;
}

.main {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  padding: 16px 14px 96px;
}

.field label.btn {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  align-self: flex-start;
  cursor: pointer;
}

.main.glow {
  background-image:
    radial-gradient(ellipse 80% 40% at 75% 0%, rgba(239, 73, 90, 0.16) 0%, rgba(23, 20, 27, 0) 70%),
    radial-gradient(ellipse 90% 50% at 10% 100%, rgba(77, 92, 117, 0.35) 0%, rgba(23, 20, 27, 0) 60%);
}

/* bottom tab bar on phones */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  background: rgba(16, 13, 19, 0.95);
  border-top: 1px solid var(--line-2);
  backdrop-filter: blur(10px);
  padding-bottom: env(safe-area-inset-bottom);
}

.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px 8px;
  min-height: 56px;
  font-size: 10px;
  color: var(--text-2);
  text-decoration: none;
}

.tabbar a.on {
  color: #ffffff;
}

.tabbar a svg {
  width: 20px;
  height: 20px;
}

/* ---------- cards ---------- */

.card {
  background: linear-gradient(180deg, var(--card) 0%, rgba(27, 23, 32, 0.92) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 16px;
}

.card-in {
  background: var(--card-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  padding: 12px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stat .label {
  margin-bottom: 6px;
}

.stat .num {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.1;
}

.stat .sub {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 4px;
}

/* ---------- page heading ---------- */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
}

.page-head h1 {
  font-size: 30px;
  line-height: 1.05;
  font-weight: 300;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.page-head p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-2);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card-2);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* ---------- buttons and forms ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(239, 73, 90, 0.5);
  background: linear-gradient(180deg, #f4606f 0%, #e23a4c 100%);
  color: #1d0a0d;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(239, 73, 90, 0.28);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.btn.ghost {
  background: var(--card-2);
  color: var(--text);
  box-shadow: none;
  border-color: var(--line);
}

.btn.danger {
  background: transparent;
  color: var(--red);
  border-color: rgba(255, 122, 122, 0.4);
  box-shadow: none;
}

.btn.sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.btn.block {
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label,
.field legend {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  padding: 0;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(14, 11, 17, 0.8);
  color: var(--text);
  outline: none;
}

.field textarea {
  min-height: 80px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(239, 73, 90, 0.6);
  box-shadow: 0 0 0 3px rgba(239, 73, 90, 0.12);
}

.field.check {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.field.check input {
  width: 22px;
  height: 22px;
  min-height: 0;
  accent-color: var(--accent);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--muted);
  flex: 1 1 200px;
}

.search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--text);
}

/* ---------- lists ---------- */

.list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--line-2);
  color: inherit;
  text-decoration: none;
  min-height: 56px;
}

.item:hover {
  border-color: var(--line);
}

.item .title {
  font-weight: 600;
  color: #ffffff;
}

.item .sub {
  font-size: 12px;
  color: var(--text-2);
}

.item .end {
  margin-left: auto;
  text-align: right;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  border: 1px solid currentColor;
  color: var(--text-2);
  white-space: nowrap;
}

/* ---------- pipeline board ---------- */

.board {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.col {
  flex: 0 0 82vw;
  max-width: 300px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.col-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
}

.col-head .n {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: #ffffff;
}

.deal {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card-2);
  border: 1.5px dashed var(--seam);
  color: inherit;
  text-decoration: none;
}

.deal b {
  font-size: 13px;
  color: #f3f1ec;
}

.deal span {
  font-size: 11px;
  color: var(--text-2);
}

.bar {
  height: 3px;
  border-radius: 3px;
  margin-top: 3px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 5px, transparent 5px 9px);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
}

/* ---------- feed ---------- */

.feed {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--card-2);
  border: 1px solid var(--line-2);
  font-size: 12.5px;
}

.feed b {
  color: #ffffff;
}

.feed .amt {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
}

/* ---------- money strip ---------- */

.money {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.money .card-in .num {
  font-family: var(--mono);
  font-size: 18px;
  color: #ffffff;
  margin-top: 4px;
}

.money .card-in.hi .num {
  color: var(--lime);
}

/* ---------- thumbnails and lightbox ---------- */

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

.thumb {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  cursor: zoom-in;
  padding: 0;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb .tag {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox .close {
  position: absolute;
  top: 14px;
  right: 14px;
}

/* ---------- scan review ---------- */

.scan-drop {
  border: 1px dashed rgba(239, 73, 90, 0.4);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  background: var(--card-2);
}

.scan-drop input {
  display: none;
}

.review {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review .preview {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #000;
  cursor: zoom-in;
}

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(242, 211, 107, 0.5);
  background: rgba(242, 211, 107, 0.1);
  color: #f6e7b0;
  font-size: 13px;
}

.notice.ok {
  border-color: rgba(183, 205, 51, 0.4);
  background: rgba(183, 205, 51, 0.08);
  color: #e3eeb0;
}

.notice.err {
  border-color: rgba(255, 122, 122, 0.5);
  background: rgba(255, 122, 122, 0.1);
  color: #ffb3b3;
}

/* ---------- table ---------- */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}

th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 200;
  padding: 10px 16px;
  border-radius: 999px;
  background: #2a2530;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* ---------- larger screens ---------- */

@media (min-width: 760px) {
  .main {
    padding: 24px 24px 40px;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid .span2 {
    grid-column: span 2;
  }

  .col {
    flex: 0 0 240px;
  }

  .page-head h1 {
    font-size: 40px;
  }

  .brand-co {
    display: inline;
  }

  .stat .num {
    font-size: 32px;
  }
}

@media (min-width: 1024px) {
  .tabbar {
    display: none;
  }

  .body {
    flex-wrap: nowrap;
  }

  .main {
    padding-bottom: 40px;
  }

  .sidenav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 0 0 230px;
    padding: 18px 14px;
    border-right: 1px solid var(--line-2);
    background: rgba(16, 13, 19, 0.6);
    position: sticky;
    top: 56px;
    align-self: flex-start;
    height: calc(100vh - 56px);
  }

  .sidenav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #d9d4dc;
    text-decoration: none;
    font-size: 14px;
    min-height: 44px;
  }

  .sidenav a svg {
    width: 16px;
    height: 16px;
  }

  .sidenav a:hover {
    background: rgba(239, 73, 90, 0.08);
    color: #ffffff;
  }

  .sidenav a.on {
    background: rgba(239, 73, 90, 0.14);
    color: #ffffff;
    box-shadow: inset 3px 0 0 var(--accent);
  }

  .sidenav .n {
    margin-left: auto;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
  }

  .sidenav .foot {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--line-2);
    font-size: 12px;
    color: var(--text-2);
  }

  .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form-grid .span2 {
    grid-column: span 2;
  }

  .form-grid .span3 {
    grid-column: span 3;
  }
}

/* ---------- SDD additions ---------- */

h2 {
  font-size: 16px;
  font-weight: 600;
}

.small {
  font-size: 12px;
}

.sr {
  position: absolute;
  left: -9999px;
}

.right {
  margin-left: auto;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--text-2);
}

.late {
  color: var(--red);
  font-weight: 600;
}

.soon {
  color: var(--lime);
  font-weight: 600;
}

.empty {
  padding: 18px 14px;
  border-radius: 12px;
  border: 1.5px dashed var(--line);
  color: var(--text-2);
  font-size: 13px;
}

.hint {
  font-size: 12px;
  color: var(--text-2);
}

.link {
  background: none;
  border: 0;
  padding: 0;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

a.card {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.card:hover {
  border-color: var(--seam);
}

a.notice {
  display: block;
  text-decoration: none;
}

.btn svg {
  flex: none;
}

.topbar .btn.sm span {
  display: none;
}

.topbar .btn.sm {
  padding: 0 12px;
  min-height: 44px;
}

.select-pill {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text);
}

select option {
  background: #26212c;
  color: var(--text);
}

fieldset.field {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

fieldset.field legend {
  margin-bottom: 8px;
}

/* ---------- home banner ---------- */

.banner {
  position: relative;
  margin: -16px -14px 16px;
  min-height: 250px;
  display: flex;
  align-items: flex-end;
  background-color: #100d13;
  background-size: cover;
  border-bottom: 1.5px dashed var(--seam);
}

.banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(23, 20, 27, 0.15) 0%, rgba(23, 20, 27, 0.55) 45%, rgba(23, 20, 27, 0.96) 100%);
}

.banner-in {
  position: relative;
  width: 100%;
  padding: 18px 14px 20px;
}

.banner h1 {
  font-size: 32px;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.banner p {
  margin: 6px 0 14px;
  color: var(--text);
  font-size: 14px;
}

.banner .btn.ghost {
  background: rgba(18, 15, 22, 0.78);
  border-color: rgba(255, 255, 255, 0.28);
}

.banner-cap {
  position: absolute;
  top: 12px;
  right: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(18, 15, 22, 0.7);
  font-size: 11px;
  font-style: italic;
  color: var(--text);
}

/* ---------- board ---------- */

.board.full .col {
  min-height: 160px;
  padding: 6px;
  border-radius: 14px;
}

.col.over {
  background: rgba(143, 168, 220, 0.12);
  outline: 1.5px dashed var(--blue);
}

.col-empty {
  padding: 10px 8px;
  font-size: 12px;
  color: var(--text-2);
}

.col-more {
  font-size: 12px;
  padding: 4px 6px;
}

.col-head {
  flex-wrap: wrap;
}

.col-head .label {
  color: var(--text);
}

.col-head .n {
  white-space: nowrap;
}

.deal.dragging {
  opacity: 0.4;
}

.deal .mono {
  font-family: var(--mono);
  color: var(--text);
}

.deal .next {
  color: var(--text-2);
}

.deal .next.warn {
  color: var(--gold);
}

.bar.tall {
  height: 8px;
  border-radius: 8px;
  margin: 0;
  background: rgba(255, 255, 255, 0.07);
}

.barrow {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bl {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  justify-content: space-between;
  font-size: 13px;
}

.bl .mono {
  font-size: 12px;
  color: var(--text-2);
}

/* ---------- tasks ---------- */

.item.task {
  align-items: flex-start;
}

.tick {
  flex: none;
  width: 28px;
  height: 28px;
  margin: 2px 0;
  border-radius: 50%;
  border: 1.5px solid var(--seam);
  background: transparent;
  color: #17141b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.tick::after {
  content: '';
  position: absolute;
  inset: -9px;
}

.tick[data-done="1"] {
  background: var(--lime);
  border-color: var(--lime);
}

.item.task.done .title {
  color: var(--text-2);
  text-decoration: line-through;
}

.item .sub a {
  color: var(--text-2);
}

.item.wrap {
  flex-wrap: wrap;
  gap: 8px;
}

.item.nav {
  width: 100%;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.item.nav svg {
  width: 20px;
  height: 20px;
  color: var(--text-2);
}

/* ---------- inline settings inputs ---------- */

.inl {
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(14, 11, 17, 0.8);
  color: var(--text);
  min-width: 0;
}

.mini {
  font-size: 12px;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bigcheck {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
  flex: none;
}

.swatch {
  width: 44px;
  height: 44px;
  border: 0;
  padding: 0;
  background: transparent;
}

/* ---------- service chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  cursor: pointer;
}

.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  cursor: pointer;
}

.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px dashed var(--seam);
  font-size: 13px;
  color: var(--text-2);
}

.chip input:checked + span {
  border-style: solid;
  border-color: var(--lime);
  background: rgba(183, 205, 51, 0.12);
  color: #ffffff;
}

.chip input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- people and client work rows ---------- */

details > summary {
  list-style: none;
  cursor: pointer;
}

details > summary::-webkit-details-marker {
  display: none;
}

.sum {
  font-weight: 600;
  color: #ffffff;
  min-height: 32px;
  display: flex;
  align-items: center;
}

.sum::after,
.person > summary::after,
.eng > summary::after {
  content: '+';
  margin-left: auto;
  padding-left: 10px;
  font-size: 20px;
  font-weight: 300;
  color: var(--text-2);
}

details[open] > .sum::after,
details[open].person > summary::after,
details[open].eng > summary::after {
  content: '\2212';
}

.person > summary,
.eng > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
}

.person > summary b,
.eng > summary b {
  color: #ffffff;
}

.person .sub,
.eng .sub {
  display: block;
  font-size: 12px;
  color: var(--text-2);
}

.eng .end {
  margin-left: auto;
  text-align: right;
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}

.eng form,
.person form {
  margin-top: 12px;
}

.badge.st-client,
.badge.es-active {
  color: var(--lime);
}

.badge.st-prospect,
.badge.es-onboarding {
  color: var(--tan);
}

.badge.es-paused {
  color: var(--gold);
}

/* ---------- files ---------- */

.thumbs {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 12px;
}

.thumb-wrap {
  position: relative;
  min-width: 0;
}

.thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.thumb.doc {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--card-2);
  border: 1.5px dashed var(--seam);
  text-decoration: none;
  cursor: pointer;
}

.thumb.doc .ext {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
}

.thumb.doc .sz {
  font-size: 11px;
  color: var(--text-2);
}

.thumb.wide {
  aspect-ratio: auto;
  max-height: 300px;
  background: #000;
}

.thumb.wide img {
  object-fit: contain;
  max-height: 300px;
}

.thumb-wrap .del {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #2a2530;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.thumb-wrap .del svg {
  width: 14px;
  height: 14px;
}

.thumb-wrap .cap {
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scan-drop {
  border: 1.5px dashed var(--seam);
  cursor: pointer;
}

.scan-title {
  color: #ffffff;
  font-weight: 600;
}

/* ---------- login ---------- */

.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.login-art {
  flex: 1 1 42vh;
  min-height: 250px;
  background-image: url('/art/login.jpg');
  background-size: cover;
  background-position: 50% 58%;
  border-bottom: 1.5px dashed var(--seam);
}

.login-side {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  padding: 20px 16px 32px;
}

.login .card {
  width: 100%;
  max-width: 400px;
}

.login-title {
  font-size: 28px;
  font-weight: 300;
  line-height: 1.1;
}

/* ---------- larger screens ---------- */

@media (min-width: 560px) {
  .topbar .btn.sm span {
    display: inline;
  }

  .topbar .btn.sm {
    padding: 0 16px;
  }
}

@media (min-width: 760px) {
  .banner {
    margin: -24px -24px 22px;
    min-height: 300px;
  }

  .banner-in {
    padding: 28px 24px 26px;
  }

  .banner h1 {
    font-size: 46px;
  }

  .banner::before {
    background: linear-gradient(90deg, rgba(23, 20, 27, 0.94) 0%, rgba(23, 20, 27, 0.6) 45%, rgba(23, 20, 27, 0.05) 100%), linear-gradient(180deg, rgba(23, 20, 27, 0) 60%, rgba(23, 20, 27, 0.8) 100%);
  }

  .thumbs {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  }
}

@media (min-width: 1024px) {
  .login {
    flex-direction: row;
  }

  .login-art {
    flex: 1 1 62%;
    border-bottom: 0;
    border-right: 1.5px dashed var(--seam);
  }

  .login-side {
    flex: 0 0 440px;
    align-items: center;
    padding: 32px;
  }

  .board.full {
    scroll-snap-type: none;
  }

  .board.full .col {
    flex: 1 1 0;
    min-width: 172px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .btn,
  .deal,
  .item {
    transition: border-color 0.15s ease, transform 0.15s ease;
  }

  .btn:active {
    transform: translateY(1px);
  }
}
