/* Sales workspace — laptop first. A left rail, a working top bar, dense tables.
   Same world as the partner portal: colour carries meaning, never decoration. */

body.ws { background: var(--mist); }

.shell {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}

/* ---------- left rail ---------- */
.rail {
  background: var(--paper);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.rail .brand { display: grid; gap: 4px; padding: 4px 10px 16px; justify-items: start; }
.rail .brand img { height: 19px; max-width: 100%; }
.rail .brand span { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; color: var(--ink-3); }

.rail a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--ink-2);
  font-size: 0.9062rem;
  font-weight: 500;
  min-height: 42px;
}
.rail a:hover { background: var(--mist); color: var(--ink); }
.rail a.is-on { background: var(--pink-wash); color: var(--pink-ink); font-weight: 600; }
.rail a svg { width: 19px; height: 19px; flex: none; }
.rail a .count {
  margin-left: auto;
  font-size: var(--fs-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--mist-2);
  color: var(--ink-2);
  border-radius: var(--r-pill);
  padding: 2px 8px;
}
.rail a .count.is-hot { background: var(--amber-wash); color: var(--amber-ink); }

.rail-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  padding: 18px 12px 6px;
}
.rail .me {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid var(--line);
}
.rail .me > span:last-child { min-width: 0; }
.rail .me .av {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--blue-wash);
  color: var(--blue-ink);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.82rem;
}
.rail .me .nm { display: block; font-size: var(--fs-sm); font-weight: 600; line-height: 1.2; }
.rail .me .rl { display: block; font-size: var(--fs-xs); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- main column ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }

.topbar-ws {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-ws h1 { font-size: 1.3rem; }
.topbar-ws .sub { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; }
.topbar-ws .spacer { margin-left: auto; }

.search-ws {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
  padding: 9px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--mist);
  color: var(--ink-3);
  font-size: var(--fs-sm);
}
.search-ws svg { width: 17px; height: 17px; }

/* the mockup's own control, not the product's */
.roleswitch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  background: var(--mist-2);
  border: 1px solid var(--line);
}
.roleswitch a {
  padding: 7px 13px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-3);
  text-decoration: none;
}
.roleswitch a.is-on { background: var(--paper); color: var(--ink); box-shadow: var(--lift-1); }

.wrap-ws { padding: 22px 24px 60px; display: grid; gap: 20px; }
.cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 76px 1fr; }
  .rail a span:not(.count) { display: none; }
  .rail .brand span, .rail-label, .rail .me .nm, .rail .me .rl { display: none; }
  .cols, .cols-2 { grid-template-columns: 1fr; }
  .cols-3 { grid-template-columns: 1fr; }
}

/* form controls, for the call screen and anywhere else that takes input */
.f label {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.f input:focus, .f textarea:focus {
  outline: none;
  background: var(--paper);
  border-color: var(--pink-1);
  box-shadow: 0 2px 6px rgba(255, 46, 134, 0.1), 0 10px 24px rgba(255, 46, 134, 0.14);
}

/* ---------- panels ---------- */
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--lift-1);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2, .panel-head h3 { font-size: 1.0625rem; }
.panel-head .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.panel-head a { font-size: var(--fs-xs); font-weight: 600; color: var(--pink-ink); }
.panel-body { padding: 16px 18px; }
.panel-body + .panel-body { border-top: 1px solid var(--line); }

/* ---------- figures ---------- */
.figs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.figs > div { padding: 16px 18px; border-right: 1px solid var(--line); }
.figs > div:last-child { border-right: 0; }
.figs .n {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.figs .l { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 6px; }
.figs .n.is-hot { color: var(--amber-ink); }
.figs .n.is-error { color: var(--alarm); }

/* ---------- tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 0.9062rem; }
.tbl th {
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-3);
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--mist);
  white-space: nowrap;
}
.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--mist); }
.tbl .nm { font-weight: 600; }
.tbl .sub { display: block; font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; }
.tbl .num, .tbl .money { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.tbl .money { font-weight: 600; }

/* ---------- status ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--new { background: var(--blue-wash); color: var(--blue-ink); }
.pill--mine { background: var(--pink-wash); color: var(--pink-ink); }
.pill--won { background: var(--green-wash); color: var(--green-ink); }
.pill--wait { background: var(--mist-2); color: var(--ink-2); }
.pill--late { background: var(--amber-wash); color: var(--amber-ink); }
.pill--error { background: var(--alarm-wash); color: var(--alarm); }
.pill--cold { background: var(--mist-2); color: var(--ink-3); }

.owner { display: flex; align-items: center; gap: 8px; }
.owner .av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--mist-2);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
  font-family: var(--display);
}
.owner .av--me { background: var(--pink-wash); color: var(--pink-ink); }

/* the twelve outcomes in two columns, so the save row stays on screen.
   Sized against the panel rather than the window: the rail and the detail
   column take enough width that a viewport query collapses too late. */
.outcomes--two { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

/* ---------- the call screen ---------- */
.call { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .call { grid-template-columns: 1fr; } }

.dial {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: var(--field-blue);
  color: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--lift-blue);
  text-decoration: none;
}
.dial .num-big { font-family: var(--display); font-weight: 700; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.dial .lab { font-size: var(--fs-xs); opacity: 0.9; }
.dial .go {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--blue-ink);
  padding: 10px 16px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.outcomes { display: grid; gap: 7px; }
.outcome {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 10px;
  width: 100%;
  min-height: 46px;
  padding: 9px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--paper);
  font: 600 0.9375rem/1.25 var(--ui);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.outcome:hover { border-color: var(--pink-1); background: var(--pink-wash); }
.outcome .tagline { grid-column: 1; font-weight: 400; font-size: var(--fs-xs); color: var(--ink-3); }
.outcome .claims {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--green-ink);
  background: var(--green-wash);
  border-radius: var(--r-pill);
  padding: 3px 9px;
  white-space: nowrap;
}
.outcome .claims--no { color: var(--ink-3); background: var(--mist-2); }

.timeline { display: grid; gap: 0; }
.timeline .t-item { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.timeline .t-item:first-child { border-top: 0; padding-top: 0; }
.timeline .when { font-size: var(--fs-xs); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.timeline .what { font-size: 0.9062rem; }
.timeline .who { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 3px; }
.timeline .note { margin-top: 6px; font-size: var(--fs-sm); color: var(--ink-2); background: var(--mist); border-radius: var(--r-sm); padding: 10px 12px; }

/* ---------- conversations ---------- */
.inbox { display: grid; grid-template-columns: 300px 1fr; min-height: 560px; }
@media (max-width: 1100px) { .inbox { grid-template-columns: 1fr; } }
.inbox .side { border-right: 1px solid var(--line); overflow-y: auto; }
.inbox .side a {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.inbox .side a:hover { background: var(--mist); }
.inbox .side a.is-on { background: var(--pink-wash); }
.inbox .side .nm { font-weight: 600; font-size: 0.9062rem; display: flex; align-items: center; gap: 8px; }
.inbox .side .nm .unread { width: 8px; height: 8px; border-radius: 50%; background: var(--pink-1); }
.inbox .side .pv { font-size: var(--fs-xs); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox .side .ago { font-size: 0.6875rem; color: var(--ink-3); }
.inbox .view { display: flex; flex-direction: column; }
.inbox .view .head { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.inbox .view .body { padding: 18px; display: grid; gap: 12px; align-content: start; flex: 1; }
.inbox .view .foot { padding: 14px 18px; border-top: 1px solid var(--line); }

.bubble-msg { max-width: 76%; padding: 11px 14px; border-radius: 16px; font-size: 0.9062rem; line-height: 1.45; }
.bubble-msg .meta { display: block; font-size: 0.6875rem; margin-top: 6px; opacity: 0.75; }
.bubble-msg--in { background: var(--mist-2); justify-self: start; border-bottom-left-radius: 5px; }
.bubble-msg--out { background: var(--field-pink); color: #fff; justify-self: end; border-bottom-right-radius: 5px; }
.bubble-msg--sys { background: var(--blue-wash); color: var(--blue-ink); justify-self: start; border-bottom-left-radius: 5px; }

/* ---------- calendar ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border-radius: var(--r-md); overflow: hidden; }
.week .day { background: var(--paper); min-height: 240px; padding: 12px; display: grid; gap: 8px; align-content: start; }
.week .day.is-today { background: var(--pink-wash); }
.week .day h4 { font-size: var(--fs-xs); color: var(--ink-3); font-family: var(--ui); font-weight: 600; }
.week .day.is-today h4 { color: var(--pink-ink); }
.slot {
  border-radius: var(--r-sm);
  padding: 9px 10px;
  font-size: var(--fs-xs);
  line-height: 1.35;
  background: var(--mist);
  border-left: 3px solid var(--blue-1);
}
.slot.is-late { background: var(--amber-wash); border-left-color: var(--amber); }
.slot.is-done { opacity: 0.55; border-left-color: var(--green-1); }
.slot .t { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- misc ---------- */
.banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--blue-wash);
  color: var(--blue-ink);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.banner svg { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.banner--warn { background: var(--amber-wash); color: var(--amber-ink); }
.banner--error { background: var(--alarm-wash); color: var(--alarm); }

.btn-ws {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  border: 0;
  background: var(--field-pink);
  box-shadow: var(--lift-pink);
  color: #fff;
  font: 600 0.9375rem/1 var(--ui);
  text-decoration: none;
  cursor: pointer;
}
.btn-ws--blue { background: var(--field-blue); box-shadow: var(--lift-blue); }
.btn-ws--ghost { background: var(--paper); color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn-ws--ghost:hover { background: var(--mist); }

.quiet { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.5; }
.money-pos { color: var(--green-ink); font-weight: 600; }

/* ---------- product-only additions beyond the client mockups ---------- */

/* the search in the topbar is a real form here, not a placeholder */
.search-ws input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font: 500 var(--fs-sm)/1.2 var(--ui);
  color: var(--ink);
}
.search-ws input::placeholder { color: var(--ink-3); font-weight: 500; }
.search-ws input:focus { outline: none; }
.search-ws:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }

.banner--good { background: var(--green-wash); color: var(--green-ink); }

/* forms the mockups only sketched */
.f input[type="text"], .f input[type="search"], .f input[type="datetime-local"],
.f input[type="tel"], .f input[type="email"], .f select, .f textarea {
  width: 100%;
  min-height: 44px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font: 500 var(--fs-sm)/1.45 var(--ui);
  background: var(--mist);
  color: var(--ink);
}
.f textarea { min-height: 84px; resize: vertical; }
.f input:focus, .f select:focus, .f textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px var(--blue-wash);
}

/* an empty table says what to do next, it doesn't just sit there */
.empty {
  padding: 34px 22px;
  text-align: center;
  color: var(--ink-3);
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.empty strong { display: block; color: var(--ink-2); font-size: var(--fs-body); margin-bottom: 4px; }

.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; padding: 12px 16px; }
.pager .quiet { margin-right: auto; }

/* the outcomes are radios in a form, styled as the cards the mockup showed */
.outcome input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.outcome:has(input:checked) {
  border-color: var(--pink-1);
  background: var(--pink-wash);
  box-shadow: inset 0 0 0 1.5px var(--pink-1);
}
.outcome:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }

/* seven narrow columns stack rather than crush on a laptop at 1280 or less */
@media (max-width: 1180px) {
  .week { grid-template-columns: repeat(2, 1fr); }
  .week .day { min-height: 0; }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* a standing reminder that this copy sends nothing to anyone */
.rail-flag {
  margin: 0 12px 6px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--amber-wash);
  color: var(--amber-ink);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}
