:root {
  --ink: #090b0f;
  --ink2: #11141a;
  --panel: #151920;
  --line: #292e37;
  --cream: #f3efe5;
  --muted: #969da8;
  --gold: #d7b46a;
  --good: #4fbf8b;
  --warn: #e8b85c;
  --bad: #e06a6a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  min-height: 100vh;
}
button,
input,
textarea,
select {
  font: inherit;
}
.is-hidden {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
button:focus-visible,
.crm-tab:focus-visible,
.funnel-card:focus-visible,
.log-candidate-row:focus-visible,
.recruitment-contact:focus-visible,
.nav-item:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.access-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 0, #2a2318 0, transparent 36%), var(--ink);
}
.gate-card {
  width: min(420px, 100%);
  padding: 48px;
  border: 1px solid var(--line);
  background: rgba(17, 20, 26, 0.94);
  box-shadow: 0 30px 100px #0009;
}
.gate-logo {
  display: block;
  width: min(270px, 78%);
  height: auto;
  object-fit: contain;
  margin: 0 0 34px;
}
.eyebrow {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.2em;
  margin: 0 0 8px;
}
.gate-card h1,
.topbar h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  margin: 0;
}
.gate-card h1 {
  font-size: 42px;
}
.muted {
  color: var(--muted);
}
label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: #c8cbd0;
  margin: 22px 0 8px;
}
input,
textarea,
select {
  width: 100%;
  background: #0d1015;
  border: 1px solid var(--line);
  color: var(--cream);
  padding: 13px 14px;
  border-radius: 3px;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px #d7b46a22;
}
.primary,
.secondary,
.icon-button {
  border: 0;
  cursor: pointer;
  padding: 12px 18px;
  white-space: nowrap;
}
.primary {
  background: var(--gold);
  color: #17130b;
  font-weight: 800;
}
.secondary,
.icon-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--cream);
}
.gate-card .primary {
  width: 100%;
  margin-top: 12px;
}
.form-message {
  min-height: 18px;
  color: var(--bad);
  font-size: 12px;
}
.shell {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  padding: 34px 20px;
  display: flex;
  flex-direction: column;
  background: #0c0e12;
}
.wordmark {
  display: block;
  color: var(--cream);
  text-decoration: none;
  padding: 0 12px 38px;
}
.wordmark img {
  display: block;
  width: 165px;
  height: auto;
  object-fit: contain;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.nav-item {
  display: flex;
  gap: 14px;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 13px 12px;
  text-align: left;
  cursor: pointer;
}
.nav-item b {
  font-size: 9px;
  color: #555d68;
}
.nav-item.active,
.nav-item:hover {
  background: #191d24;
  color: var(--cream);
}
.nav-item.active {
  border-left: 2px solid var(--gold);
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 20px 12px 0;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--bad);
}
.status-dot.connected {
  background: var(--good);
}
main {
  min-width: 0;
}
.topbar {
  height: 112px;
  border-bottom: 1px solid var(--line);
  padding: 24px 4vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar h1 {
  font-size: 30px;
}
.top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.team-pill,
.count-pill,
.consent {
  border: 1px solid var(--line);
  padding: 8px 12px;
  font-size: 11px;
  color: var(--muted);
}
.view {
  display: none;
  padding: 38px 4vw 70px;
  max-width: 1500px;
}
.view.active {
  display: block;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.65fr);
  gap: 22px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 24px;
}
.panel-head,
.section-head,
.conversation-head,
.config-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-head {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  margin: 20px 0;
}
.steps span {
  background: #101318;
  padding: 12px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
.steps .active {
  color: var(--gold);
  background: #1e1a13;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.inline-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.score-panel {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.score-ring {
  width: 180px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-content: center;
  margin: 28px 0 18px;
  box-shadow: inset 0 0 0 12px #11141a;
}
.score-ring strong {
  font:
    64px Georgia,
    serif;
  color: var(--gold);
}
.score-ring span {
  color: var(--muted);
  font-size: 11px;
}
.score-panel h2 {
  font:
    24px Georgia,
    serif;
  font-weight: 400;
}
.score-legend {
  display: grid;
  gap: 10px;
  text-align: left;
  margin-top: auto;
  width: 100%;
  font-size: 11px;
  color: var(--muted);
}
.score-legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 8px;
}
.good {
  background: var(--good);
}
.warn {
  background: var(--warn);
}
.bad {
  background: var(--bad);
}
.section-head {
  margin-bottom: 24px;
}
.section-head h2,
.panel h2 {
  font:
    30px Georgia,
    serif;
  font-weight: 400;
  margin: 0;
}
.empty-state {
  text-align: center;
  border: 1px dashed var(--line);
  padding: 80px 20px;
  color: var(--muted);
}
.empty-state span {
  font-size: 28px;
  color: var(--good);
}
.upload-zone {
  margin: 0;
  border: 1px dashed #515966;
  padding: 52px;
  display: grid;
  place-items: center;
  text-align: center;
  cursor: pointer;
}
.upload-zone input {
  display: none;
}
.upload-zone span {
  font-size: 34px;
  color: var(--gold);
}
.upload-zone small {
  color: var(--muted);
  margin-top: 6px;
}
.reference-controls {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}
.reference-grid,
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.reference-card,
.content-item {
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}
.reference-card img,
.content-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.reference-card div,
.item-footer {
  padding: 12px;
}
.content-item img {
  aspect-ratio: 9/16;
}
.content-item.post img {
  aspect-ratio: 1;
}
.piece-copy {
  min-height: 190px;
  padding: 22px;
  white-space: pre-wrap;
  line-height: 1.55;
  background: linear-gradient(145deg, #1b2028, #101318);
}
.item-name {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item-actions {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.item-actions button {
  padding: 7px;
  font-size: 10px;
}
.content-heading {
  margin: 30px 0 12px;
}
.crm-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 16px;
}
.crm-head-actions {
  margin-top: 0;
}
.safe-mode-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid #2d6a53;
  background: #10251d;
  color: #bcebd8;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 12px;
}

.whatsapp-setup {
  margin: 18px 0;
}

.whatsapp-setup summary {
  cursor: pointer;
  font-weight: 700;
}

.whatsapp-setup form {
  margin-top: 18px;
}

.setup-readonly input {
  color: var(--muted);
}
.safe-mode-banner strong {
  color: var(--good);
  white-space: nowrap;
}
.recruitment-console {
  display: grid;
  grid-template-columns: minmax(230px, 0.78fr) minmax(420px, 1.6fr) minmax(
      250px,
      0.82fr
    );
  gap: 14px;
  align-items: start;
}
.recruitment-console > .panel {
  min-height: 690px;
}
.crm-operations {
  display: grid;
  gap: 14px;
}
.crm-operations .panel {
  padding: 18px;
}
.recruitment-contact {
  cursor: pointer;
  border: 1px solid transparent;
}
.recruitment-contact.active {
  border-color: var(--gold);
  background: #241f17;
}
.recruitment-contact div {
  min-width: 0;
}
.recruitment-contact strong,
.recruitment-contact small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recruitment-conversation {
  min-height: 690px;
}
.recruitment-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 370px;
  overflow-y: auto;
}
.message-bubble {
  width: min(82%, 560px);
  padding: 11px 13px;
  border: 1px solid var(--line);
  background: #101318;
}
.message-bubble p {
  margin: 0 0 6px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.message-bubble small {
  color: var(--muted);
  font-size: 10px;
}
.message-bubble.outbound {
  align-self: flex-end;
  background: #242016;
  border-color: #5b4b2c;
}
.message-bubble.blocked {
  width: 100%;
  background: #2b1818;
  border-color: #6d3434;
}
.human-decision {
  border-top: 1px solid var(--line);
  padding: 18px;
  background: #11151b;
}
.human-decision input {
  margin-top: 12px;
}
.human-decision .check {
  margin: 12px 0 0;
}
.human-decision button:disabled,
.slot-choice button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.slot-choice {
  border-top: 1px solid var(--line);
  padding: 0 18px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}
.slot-choice label {
  margin-top: 14px;
}
.task-row {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.task-row small {
  color: var(--muted);
}
.task-row.pending strong {
  color: var(--warn);
}
.template-row {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}
.manual-candidate {
  margin-top: 18px;
}
.manual-candidate summary {
  cursor: pointer;
  color: var(--gold);
}
.manual-candidate .crm-layout {
  margin-top: 22px;
}
.candidate-card {
  border: 1px solid var(--line);
  background: #11151b;
  padding: 16px;
}
.candidate-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}
.candidate-head > div {
  display: grid;
  gap: 5px;
}
.candidate-head small {
  color: var(--muted);
}
.candidate-card .inline-actions {
  flex-wrap: wrap;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.check input {
  width: auto;
}
.review-grid {
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.review-card p:not(.eyebrow) {
  white-space: pre-wrap;
  line-height: 1.5;
}
.empty-state.compact {
  padding: 28px;
  grid-column: 1/-1;
}
.text-good {
  color: var(--good);
}
.text-warn {
  color: var(--warn);
}
.error-text {
  color: var(--bad);
}
progress {
  width: 100%;
  height: 8px;
  accent-color: var(--gold);
}
.contact-list {
  padding: 14px;
}
.contact {
  width: 100%;
  display: flex;
  gap: 12px;
  text-align: left;
  padding: 14px;
  border: 0;
  background: #1c2129;
  color: var(--cream);
  margin-top: 12px;
}
.contact > span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #2a303a;
  display: grid;
  place-items: center;
}
.contact div {
  display: grid;
}
.contact small,
.conversation-head small {
  color: var(--muted);
}
.conversation {
  padding: 0;
  min-height: 570px;
  display: flex;
  flex-direction: column;
}
.conversation-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.conversation-head > div {
  display: grid;
}
.messages {
  padding: 24px;
  flex: 1;
}
.centered {
  text-align: center;
  margin-top: 120px;
}
.composer {
  border-top: 1px solid var(--line);
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}
.composer > input,
.composer > textarea {
  grid-column: 1/-1;
}
.composer .check {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.composer .check input {
  width: auto;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.stat-tile {
  border: 1px solid var(--line);
  padding: 20px;
  background: var(--panel);
}
.stat-tile .label {
  color: var(--muted);
  font-size: 11px;
}
.stat-tile .value {
  font:
    32px Georgia,
    serif;
  margin-top: 8px;
}
.settings {
  max-width: 700px;
}
.config-row {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--cream);
  color: var(--ink);
  padding: 13px 18px;
  transform: translateY(100px);
  opacity: 0;
  transition: 0.25s;
  z-index: 10;
}
.toast.show {
  transform: none;
  opacity: 1;
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 78px 1fr;
  }
  .sidebar {
    padding: 28px 10px;
  }
  .wordmark {
    font-size: 0;
    padding: 0 12px 30px;
  }
  .nav-item {
    font-size: 0;
    justify-content: center;
  }
  .nav-item b {
    font-size: 10px;
  }
  .sidebar-foot span:last-child {
    display: none;
  }
  .hero-grid,
  .crm-layout,
  .recruitment-console {
    grid-template-columns: 1fr;
  }
  .recruitment-console > .panel {
    min-height: auto;
  }
  .recruitment-messages {
    min-height: 320px;
  }
  .team-pill {
    display: none;
  }
}
@media (max-width: 600px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    z-index: 5;
    bottom: 0;
    top: auto;
    width: 100%;
    height: 64px;
    padding: 6px;
    background: #0c0e12;
  }
  .wordmark,
  .sidebar-foot {
    display: none;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
  }
  .nav-item {
    min-width: 58px;
  }
  .topbar {
    height: 90px;
    padding: 18px;
  }
  .view {
    padding: 24px 16px 90px;
  }
  .field-grid {
    grid-template-columns: 1fr;
  }
  .reference-controls {
    display: grid;
  }
  .composer {
    grid-template-columns: 1fr;
  }
  .slot-choice {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .inline-actions {
    flex-wrap: wrap;
  }
}

.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.status-pill.good {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}
.status-pill.warn {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}
.status-pill.bad {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.secondary.danger {
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}
.secondary.danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.1);
}
.internal-notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
}
.internal-notes label {
  font-size: 0.8rem;
  color: var(--muted);
}
.internal-notes textarea {
  resize: vertical;
}
.qr-box {
  margin-top: 12px;
  text-align: center;
}
.qr-box img {
  max-width: 220px;
  border-radius: 8px;
  border: 1px solid var(--border, #333);
}

.today-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}
.today-action-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid var(--line);
  font-size: 13px;
}
.today-action-row strong {
  font:
    18px Georgia,
    serif;
}

.funnel-board-wrap {
  position: relative;
}
.funnel-board-wrap::after {
  /* right-edge fade — the visual cue that more columns exist off-screen */
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 8px;
  width: 48px;
  background: linear-gradient(90deg, transparent, var(--ink) 88%);
  pointer-events: none;
  opacity: var(--fade-opacity, 1);
  transition: opacity 0.2s ease;
}
.funnel-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) #12151b;
}
.funnel-board::-webkit-scrollbar {
  height: 8px;
}
.funnel-board::-webkit-scrollbar-track {
  background: #12151b;
  border-radius: 99px;
}
.funnel-board::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 99px;
}
.funnel-board .funnel-column {
  scroll-snap-align: start;
}
.funnel-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--cream);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px #000a;
}
.funnel-scroll-btn.prev {
  left: -14px;
}
.funnel-scroll-btn.next {
  right: -14px;
}
.funnel-scroll-btn[hidden] {
  display: none;
}
.funnel-column {
  border: 1px solid var(--line);
  background: var(--panel);
  min-height: 200px;
  display: flex;
  flex-direction: column;
}
.funnel-column-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.funnel-cards {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 360px;
}
.funnel-card {
  text-align: left;
  border: 1px solid var(--line);
  background: transparent;
  padding: 8px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}
.funnel-card:hover {
  border-color: var(--accent, #999);
}
.funnel-card.active {
  border-color: var(--accent, #999);
  background: rgba(255, 255, 255, 0.05);
}
.funnel-card strong {
  font-size: 13px;
}

/* ================= CRM v2 — modern colorful dashboard =================
   Palette stays inside the existing brand family (gold/good/bad/warn are
   reused verbatim, never re-invented) and adds only the muted, editorial
   jewel tones the funnel genuinely needs for new stages. No default-SaaS
   candy colors. */
:root {
  --stage-initial: #7ba7d9;
  --stage-progress: var(--gold);
  --stage-schedule: #9b8ac4;
  --stage-interview: #6e7fd1;
  --stage-done: #5fb3b3;
  --stage-result: var(--good);
  --stage-onboarding: var(--gold);
  --crm-approved: var(--good);
  --crm-denied: var(--bad);
  --crm-radius: 14px;
  --icon-sm: 18px;
}

.icon {
  width: var(--icon-sm);
  height: var(--icon-sm);
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -3px;
}
.icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Heading stays solid cream like every other view — congruence over flair. */

/* Stat tiles: colorful icon cards */
#crmMetrics {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
#crmMetrics .stat-tile {
  position: relative;
  border-radius: var(--crm-radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, #171b23 0%, #12151b 100%);
  overflow: hidden;
  padding: 18px 18px 16px;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease;
}
#crmMetrics .stat-tile:hover {
  transform: translateY(-2px);
  border-color: var(--tile-color, var(--gold));
}
#crmMetrics .stat-tile::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: var(--tile-color, var(--gold));
}
#crmMetrics .stat-tile .tile-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--tile-color, var(--gold));
  background: color-mix(in srgb, var(--tile-color, var(--gold)) 20%, transparent);
  margin-bottom: 12px;
}
#crmMetrics .stat-tile .tile-icon .icon {
  width: 18px;
  height: 18px;
}
#crmMetrics .stat-tile .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
#crmMetrics .stat-tile .value {
  font: 30px/1.1 Georgia, serif;
  color: var(--tile-color, var(--cream));
  margin-top: 6px;
  display: block;
}

/* Chart row */
.chart-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin: 16px 0;
}
.chart-card {
  border-radius: var(--crm-radius);
  background: linear-gradient(160deg, #171b23 0%, #12151b 100%);
}
.chart-card h3 {
  font: 15px/1.2 Inter, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 16px;
}
.bar-chart {
  display: grid;
  gap: 10px;
}
.bar-chart-row {
  display: grid;
  grid-template-columns: 140px 1fr 34px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.bar-chart-row .bar-track {
  height: 12px;
  border-radius: 99px;
  background: #0d1015;
  overflow: hidden;
}
.bar-chart-row .bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}
.bar-chart-row .bar-value {
  text-align: right;
  font-weight: 700;
}
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 22px;
  justify-content: center;
}
.donut-legend {
  display: grid;
  gap: 10px;
  font-size: 12px;
}
.donut-legend .legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.donut-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.donut-legend strong {
  margin-left: auto;
  font-family: Georgia, serif;
}

/* Today actions: colorful */
.today-action-row {
  border-radius: 10px;
  background: #12151b;
  border-color: var(--line);
}
.today-action-row strong {
  color: var(--gold);
}

/* Funnel board v2 */
.funnel-board {
  gap: 14px;
}
.funnel-column {
  border-radius: var(--crm-radius);
  background: linear-gradient(180deg, #171b23 0%, #12151b 100%);
  border-top: 3px solid var(--stage-color, var(--line));
  overflow: hidden;
}
.funnel-column-head {
  font-weight: 700;
}
.funnel-column-head .count-pill {
  background: color-mix(in srgb, var(--stage-color, var(--gold)) 22%, transparent);
  color: var(--stage-color, var(--cream));
  border: 0;
  border-radius: 99px;
  font-weight: 800;
}
.funnel-card {
  border-radius: 10px;
  border-left: 3px solid var(--stage-color, var(--line));
  background: #12151b;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}
.funnel-card:hover {
  transform: translateX(2px);
  box-shadow: 0 6px 18px #0006;
}
.funnel-card.active {
  background: color-mix(in srgb, var(--stage-color, var(--gold)) 14%, #12151b);
  border-left-color: var(--stage-color, var(--gold));
}
.funnel-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.funnel-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
  background: var(--stage-color, var(--gold));
  color: #10131a;
}
.priority-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
}
.priority-dot.high {
  background: var(--crm-denied);
}
.priority-dot.normal {
  background: var(--warn);
}
.priority-dot.low {
  background: var(--muted);
}
.bot-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 4px;
  background: var(--muted);
}
.bot-dot.active {
  background: var(--good);
}

@media (max-width: 900px) {
  .chart-row {
    grid-template-columns: 1fr;
  }
}

/* CRM sub-tabs */
.crm-subnav {
  display: flex;
  gap: 8px;
  margin: 18px 0 20px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.crm-tab {
  border: 1px solid var(--line);
  background: #12151b;
  color: var(--muted);
  padding: 11px 18px;
  min-height: 40px;
  border-radius: 99px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
.crm-tab .icon {
  opacity: 0.85;
}
.crm-tab:hover {
  color: var(--cream);
  border-color: var(--stage-interview);
}
.crm-tab.active {
  background: linear-gradient(120deg, var(--stage-interview), var(--stage-schedule));
  color: #0c0e12;
  border-color: transparent;
}
.crm-tab.active .icon {
  opacity: 1;
}
.crm-subview[hidden] {
  display: none !important;
}
.crm-subview.active {
  animation: crm-fade-in 0.2s ease;
}
@keyframes crm-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Bitácora / timeline */
.timeline {
  display: grid;
  gap: 0;
  position: relative;
  padding-left: 22px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}
.timeline-item {
  position: relative;
  padding: 0 0 22px 18px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--timeline-color, var(--gold));
  border: 2px solid #0c0e12;
}
.timeline-item .timeline-kind {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--timeline-color, var(--gold));
  font-weight: 700;
}
.timeline-item strong {
  display: block;
  margin: 3px 0;
}
.timeline-item small {
  color: var(--muted);
}
.log-candidate-row {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: #12151b;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  display: grid;
  gap: 4px;
}
.log-candidate-row:hover {
  border-color: var(--stage-interview);
}
.log-candidate-row.active {
  border-color: var(--stage-interview);
  background: color-mix(in srgb, var(--stage-interview) 14%, #12151b);
}

.agenda-group {
  margin-bottom: 20px;
}
.agenda-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.agenda-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #12151b;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.agenda-card .inline-actions {
  flex-wrap: wrap;
}

.chat-filter-tabs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.chat-filter-tab {
  border: 1px solid var(--line);
  background: #12151b;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 99px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}
.chat-filter-tab.active {
  background: var(--stage-interview);
  color: #0c0e12;
  border-color: transparent;
}
.contact-top-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.recruitment-contact {
  align-items: flex-start;
}
.recruitment-contact > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.recruitment-contact .funnel-avatar {
  margin-top: 2px;
}

.whatsapp-live-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #12151b;
  font-size: 13px;
  letter-spacing: 0.04em;
}

/* Filter bars: wrap instead of squeezing the search field unreadable */
#chatsFilterBar,
#contactsFilterBar {
  flex-wrap: wrap;
}
#chatsSearch,
#contactsSearch {
  flex: 1 1 240px;
  min-width: 180px;
}

/* Empty-state conversation panel: don't force a huge dead block when there's
   nothing to show yet — let it size to content, with a sane floor. */
.recruitment-console:has(.contact-list .empty-state) > .panel {
  min-height: 320px;
}

/* WhatsApp config: collapsed behind one access point, conversation stays the
   protagonist of the Chats tab. */
.whatsapp-config-group {
  margin-top: 18px;
  background: transparent;
  border-style: dashed;
}
.whatsapp-config-group > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}
.whatsapp-config-group > summary:hover {
  color: var(--cream);
}
.whatsapp-config-group .whatsapp-setup {
  margin-top: 16px;
}

/* "Add new" ghost tile inside the Contactos grid — gives the empty space
   next to a sparse grid a purpose instead of looking unfinished. */
.candidate-add-tile {
  /* Don't stretch to match tall sibling cards in the grid row — keep its
     own compact height regardless of how tall a neighboring candidate
     card gets. */
  align-self: start;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 140px;
  cursor: pointer;
  font-size: 13px;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}
.candidate-add-tile .icon {
  width: 26px;
  height: 26px;
}
.candidate-add-tile:hover {
  border-color: var(--gold);
  color: var(--gold);
}
