/* =========================================================
   Acolhe Demo — Triagem CSS
   Estende landing.css (tokens já importados)
   ========================================================= */

/* ─── Header mínimo ──────────────────────────────────────── */
.triagem-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(245,240,232,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}
.triagem-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-dark);
}
.triagem-back {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--c-text-muted);
  transition: color var(--t);
}
.triagem-back:hover { color: var(--c-terracota); }

/* ─── Main wrapper ───────────────────────────────────────── */
.triagem-main {
  min-height: 100vh;
  padding-top: calc(var(--nav-h) + var(--sp-10));
  padding-bottom: var(--sp-16);
  padding-inline: clamp(1rem, 4vw, 2rem);
  background: var(--c-off-white);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ─── Barra de progresso ─────────────────────────────────── */
.progress-bar-wrapper {
  width: 100%;
  max-width: 560px;
  margin-bottom: var(--sp-10);
}
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  position: relative;
  flex-shrink: 0;
}
.ps-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--c-beige-dk);
  background: #fff;
  transition: all var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ps-dot::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: all var(--t);
}
.ps-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--c-text-muted);
  transition: color var(--t);
  white-space: nowrap;
}
.progress-step.active .ps-dot {
  border-color: var(--c-terracota);
  background: var(--c-terracota);
}
.progress-step.active .ps-dot::after { background: #fff; }
.progress-step.active .ps-label { color: var(--c-terracota); font-weight: 600; }
.progress-step.done .ps-dot {
  border-color: var(--c-sage);
  background: var(--c-sage);
}
.progress-step.done .ps-dot::after {
  content: '';
  width: 12px;
  height: 7px;
  background: transparent;
  border: none;
}
/* checkmark via box-shadow trick */
.progress-step.done .ps-dot {
  background: var(--c-sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
}
.progress-step.done .ps-dot::after { display: none; }
.progress-step.done .ps-label { color: var(--c-sage); }
.progress-line {
  height: 2px;
  flex: 1;
  min-width: 32px;
  background: var(--c-beige-dk);
  margin-bottom: 20px; /* align with center of dot */
  transition: background var(--t);
}
.progress-line.done { background: var(--c-sage); }

/* ─── Step cards ─────────────────────────────────────────── */
.triagem-step { display: none; width: 100%; justify-content: center; }
.triagem-step.active { display: flex; }

.step-card {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: clamp(var(--sp-8), 5vw, var(--sp-12));
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 520px;
}
.step-card-wide { max-width: 780px; }

.step-eyebrow {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-sage);
  margin-bottom: var(--sp-4);
}
.step-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 900;
  color: var(--c-dark);
  margin-bottom: var(--sp-4);
  line-height: 1.1;
}
.step-title em { color: var(--c-terracota); font-style: italic; }
.step-sub {
  font-size: var(--text-base);
  color: var(--c-text-muted);
  line-height: 1.7;
  margin-bottom: var(--sp-8);
}

/* ─── Fields ─────────────────────────────────────────────── */
.field-group { margin-bottom: var(--sp-5); }
.field-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--c-dark);
  margin-bottom: var(--sp-2);
}
.field-hint {
  font-weight: 400;
  color: var(--c-text-muted);
}
.field-input {
  width: 100%;
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  border: 2px solid var(--c-beige-dk);
  background: var(--c-off-white);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--c-dark);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
  -webkit-appearance: none;
}
.field-input:focus {
  border-color: var(--c-terracota);
  box-shadow: 0 0 0 3px rgba(193,96,74,.12);
  background: #fff;
}
.field-input.error { border-color: #e05050; }

.input-pw-wrapper { position: relative; }
.input-pw-wrapper .field-input { padding-right: 3rem; }
.pw-toggle {
  position: absolute;
  right: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-text-muted);
  transition: color var(--t);
  padding: .25rem;
}
.pw-toggle:hover { color: var(--c-terracota); }

/* ─── Error / hints ──────────────────────────────────────── */
.step-error {
  font-size: var(--text-sm);
  color: #e05050;
  min-height: 1.4em;
  margin-bottom: var(--sp-3);
  font-weight: 500;
}
.step-hint-sel {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  margin-bottom: var(--sp-5);
  text-align: center;
}

/* ─── Step buttons ───────────────────────────────────────── */
.step-btn { width: 100%; justify-content: center; margin-top: var(--sp-2); }
.step-btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-back {
  display: block;
  text-align: center;
  margin-top: var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: color var(--t);
}
.btn-back:hover { color: var(--c-terracota); }

/* ─── Login mini ─────────────────────────────────────────── */
.step-login-hint {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  margin-top: var(--sp-5);
}
.step-login-hint a {
  color: var(--c-terracota);
  font-weight: 600;
  cursor: pointer;
}
.login-mini { margin-top: var(--sp-6); padding-top: var(--sp-6); border-top: 1px solid var(--c-border); }
.demo-access-card { display: grid; gap: .35rem; margin: 0 0 var(--sp-5); padding: 1rem; border: 1px solid #d8b7a3; border-radius: 10px; background: #fff8f3; color: var(--c-text); font-size: var(--text-xs); line-height: 1.45; }
.demo-access-card strong { color: var(--c-terracota); font-size: var(--text-sm); }
.demo-access-card code { color: #88462d; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; overflow-wrap: anywhere; }

/* ─── Loading ────────────────────────────────────────────── */
.step-loading {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  color: var(--c-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--sp-4);
}
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--c-beige-dk);
  border-top-color: var(--c-terracota);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
.spinner-lg { width: 36px; height: 36px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Emotion tags ───────────────────────────────────────── */
.emotion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}
.emotion-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-3);
  border-radius: var(--radius);
  border: 2px solid var(--c-beige-dk);
  background: var(--c-off-white);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--c-text);
  cursor: pointer;
  transition: all var(--t);
  text-align: center;
}
.emotion-tag:hover {
  border-color: var(--c-terracota);
  background: var(--c-terracota-lt);
  transform: translateY(-2px);
}
.emotion-tag.selected {
  border-color: var(--c-terracota);
  background: var(--c-terracota-lt);
  color: var(--c-terracota);
  box-shadow: 0 2px 8px rgba(193,96,74,.15);
}
.emotion-icon { font-size: 1.5rem; }

/* ─── Income options ─────────────────────────────────────── */
.income-options {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}
.income-option { cursor: pointer; }
.income-radio { display: none; }
.income-card {
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius);
  border: 2px solid var(--c-beige-dk);
  background: var(--c-off-white);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  transition: all var(--t);
}
.income-card:hover {
  border-color: var(--c-terracota);
  background: var(--c-terracota-lt);
}
.income-radio:checked + .income-card {
  border-color: var(--c-terracota);
  background: var(--c-terracota-lt);
  box-shadow: 0 2px 8px rgba(193,96,74,.15);
}
.income-label {
  font-weight: 600;
  color: var(--c-dark);
  font-size: var(--text-base);
  flex: 1;
}
.income-sub {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
}
.income-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--c-terracota);
  color: #fff;
  padding: 2px var(--sp-3);
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}
.income-badge-med {
  background: var(--c-sage);
}

/* ─── Match cards ────────────────────────────────────────── */
.matches-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  margin-top: var(--sp-6);
}
.match-card {
  background: var(--c-off-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6) var(--sp-6);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--sp-5);
  align-items: start;
  transition: box-shadow var(--t), transform var(--t);
}
.match-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.match-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-terracota), var(--c-terracota-dk));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.match-info {}
.match-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: var(--sp-1);
}
.match-crp {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  margin-bottom: var(--sp-3);
}
.match-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.match-tag {
  font-size: var(--text-xs);
  font-weight: 500;
  background: rgba(91,117,99,.1);
  color: var(--c-sage);
  padding: 2px var(--sp-3);
  border-radius: var(--radius-full);
}
.match-bio {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  line-height: 1.6;
  max-width: 50ch;
}
.match-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-3);
  flex-shrink: 0;
}
.match-score-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: conic-gradient(var(--c-terracota) calc(var(--score) * 360deg), var(--c-beige-dk) 0deg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.match-score-ring::before {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--c-off-white);
}
.match-score-val {
  position: relative;
  z-index: 1;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--c-terracota);
}
.match-trainee-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--c-sage);
  color: #fff;
  padding: 2px var(--sp-3);
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.match-slots {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
}
.match-btn {
  display: inline-flex;
  align-items: center;
  padding: .6rem 1.25rem;
  border-radius: var(--radius-full);
  background: var(--c-terracota);
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--t);
  white-space: nowrap;
}
.match-btn:hover {
  background: var(--c-terracota-dk);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(193,96,74,.3);
}
.match-rating {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}
.match-rating::before { content: '★'; color: #F59E0B; }

/* Empty / loading states */
.matches-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-16) 0;
  color: var(--c-text-muted);
  font-size: var(--text-base);
}
.matches-empty {
  text-align: center;
  padding: var(--sp-12) 0;
  color: var(--c-text-muted);
}

/* ─── Modal de agendamento ───────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(42,31,26,.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: var(--sp-10);
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  color: var(--c-text-muted);
  font-size: 1.1rem;
  line-height: 1;
  transition: color var(--t);
}
.modal-close:hover { color: var(--c-terracota); }
.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: var(--sp-2);
}
.modal-prof-name {
  font-size: var(--text-base);
  color: var(--c-sage);
  font-weight: 600;
  margin-bottom: var(--sp-6);
}
.agenda-success {
  text-align: center;
  padding: var(--sp-6) 0;
}
.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--c-sage);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-5);
}
.success-msg {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--c-dark);
  margin-bottom: var(--sp-2);
}
.success-sub {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
}

/* ─── Responsivo ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .match-card {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .match-meta {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .emotion-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .progress-steps { gap: 0; }
  .ps-label { font-size: 10px; }
}
