/* Avantys — Admin Dashboard */
.admin-page {
  min-height: 100vh;
  background: #FAFAF8;
  color: #141414;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  padding: 48px clamp(20px, 5vw, 64px) 96px;
}

.admin-shell { max-width: 1240px; margin: 0 auto; }

.admin-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  padding-bottom: 24px; border-bottom: 1px solid rgba(0,0,0,0.08); margin-bottom: 32px;
}
.admin-eyebrow {
  font: 500 11px/1 "Inter", sans-serif; letter-spacing: 0.22em; text-transform: uppercase;
  color: #8a8a8a; margin-bottom: 12px;
}
.admin-title {
  font-family: "Cormorant Garamond", serif; font-weight: 400; font-size: clamp(36px, 4vw, 52px);
  letter-spacing: -0.02em; line-height: 1; color: #141414;
}
.admin-title em { font-style: italic; color: #3fa66a; }
.admin-meta { font: 400 12px/1.4 "Inter", sans-serif; color: #6b6b6b; text-align: right; }

.admin-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; justify-content: flex-end; }
.admin-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #141414; background: #141414; color: #FAFAF8;
  padding: 10px 18px; border-radius: 999px; font: 500 12px/1 "Inter", sans-serif;
  letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
  transition: all 0.2s ease;
}
.admin-btn:hover { background: #3fa66a; border-color: #3fa66a; }
.admin-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Status chip */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 11px/1 "Inter", sans-serif; letter-spacing: 0.14em; text-transform: uppercase;
  color: #6b6b6b;
}
.chip::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #b8b8b8;
}
.chip.live { color: #2f7a4d; }
.chip.live::before { background: #3fa66a; box-shadow: 0 0 0 4px rgba(63,166,106,0.15); animation: pulse 2s ease-in-out infinite; }
.chip.error { color: #c8362a; }
.chip.error::before { background: #c8362a; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.55 } }

/* KPI grid */
.kpi-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px;
}
@media (max-width: 900px) { .kpi-grid { grid-template-columns: 1fr; } }

.kpi-card {
  background: #fff; border: 1px solid rgba(0,0,0,0.06); border-radius: 14px;
  padding: 28px 28px 24px; box-shadow: 0 1px 2px rgba(0,0,0,0.02);
  display: flex; flex-direction: column; gap: 18px; min-height: 180px;
}
.kpi-label {
  font: 500 11px/1 "Inter", sans-serif; letter-spacing: 0.2em; text-transform: uppercase;
  color: #6b6b6b;
}
.kpi-value {
  font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 400;
  font-size: clamp(56px, 7vw, 84px); line-height: 0.95; letter-spacing: -0.02em; color: #141414;
}
.kpi-value.pending { color: #b8b8b8; font-style: normal; }
.kpi-hint { font: 400 12px/1.4 "Inter", sans-serif; color: #8a8a8a; margin-top: auto; }

/* Sections */
.admin-section { margin-bottom: 40px; }
.admin-section-head {
  display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px;
}
.admin-section-title {
  font-family: "Cormorant Garamond", serif; font-size: 24px; letter-spacing: -0.01em; color: #141414;
}
.admin-section-sub { font: 400 12px/1 "Inter", sans-serif; color: #8a8a8a; letter-spacing: 0.06em; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.panel {
  background: #fff; border: 1px solid rgba(0,0,0,0.06); border-radius: 14px; padding: 24px;
}
.panel h3 {
  font: 500 11px/1 "Inter", sans-serif; letter-spacing: 0.2em; text-transform: uppercase;
  color: #6b6b6b; margin: 0 0 20px;
}

/* Archetype bars */
.arch-row { display: grid; grid-template-columns: 140px 1fr 60px; align-items: center; gap: 12px; padding: 8px 0; }
.arch-name { font: 500 13px/1.2 "Inter", sans-serif; color: #141414; text-transform: capitalize; }
.arch-track { height: 6px; background: rgba(0,0,0,0.06); border-radius: 999px; overflow: hidden; }
.arch-fill { height: 100%; background: #3fa66a; border-radius: 999px; transition: width 0.6s ease; }
.arch-count { font: 500 12px/1 "Inter", sans-serif; color: #6b6b6b; text-align: right; }
.arch-empty { font: 400 13px/1.5 "Inter", sans-serif; color: #b8b8b8; padding: 8px 0; }

/* Table */
.leads-table { width: 100%; border-collapse: collapse; }
.leads-table th {
  text-align: left; font: 500 10px/1 "Inter", sans-serif; letter-spacing: 0.18em;
  text-transform: uppercase; color: #8a8a8a; padding: 12px 12px 12px 0; border-bottom: 1px solid rgba(0,0,0,0.08);
}
.leads-table td {
  padding: 16px 12px 16px 0; border-bottom: 1px solid rgba(0,0,0,0.05);
  font: 400 13px/1.4 "Inter", sans-serif; color: #141414;
}
.leads-table tr:last-child td { border-bottom: none; }
.leads-table .col-email { font-weight: 500; }
.tag {
  display: inline-flex; padding: 3px 10px; border-radius: 999px;
  font: 500 10px/1.4 "Inter", sans-serif; letter-spacing: 0.1em; text-transform: uppercase;
}
.tag.vitalidad { background: rgba(63,166,106,0.12); color: #2f7a4d; }
.tag.readiness { background: rgba(27,58,92,0.10); color: #1B3A5C; }
.tag.neutral { background: rgba(0,0,0,0.06); color: #6b6b6b; }
.muted { color: #b8b8b8; }

/* Funnel table */
.funnel-table { width: 100%; border-collapse: collapse; }
.funnel-table th {
  text-align: left; font: 500 10px/1 "Inter", sans-serif; letter-spacing: 0.18em;
  text-transform: uppercase; color: #8a8a8a; padding: 12px 12px 12px 0; border-bottom: 1px solid rgba(0,0,0,0.08);
}
.funnel-table td { padding: 18px 12px 18px 0; border-bottom: 1px solid rgba(0,0,0,0.05); vertical-align: top; }
.funnel-table tr:last-child td { border-bottom: none; }
.fn-stage { font: 500 13px/1.3 "Inter", sans-serif; color: #141414; }
.fn-stage-sub { font: 400 11px/1.4 "Inter", sans-serif; color: #8a8a8a; margin-top: 2px; }
.fn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fn-chip {
  display: inline-flex; align-items: baseline; gap: 8px;
  background: #FAFAF8; border: 1px solid rgba(0,0,0,0.06); border-radius: 10px;
  padding: 8px 12px;
}
.fn-chip-lbl { font: 500 10px/1 "Inter", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: #8a8a8a; }
.fn-chip-val { font: 500 14px/1 "Inter", sans-serif; color: #141414; }
.fn-soon { display: inline-flex; align-items: center; gap: 8px; font: 400 12px/1.4 "Inter", sans-serif; color: #8a8a8a; }
.fn-soon-dot { width: 8px; height: 8px; border-radius: 50%; background: #d4c98a; }
.fn-soon-hint { color: #b8b8b8; }

/* Histogram */
.hist { display: flex; align-items: flex-end; gap: 12px; height: 120px; margin-top: 16px; padding: 8px 4px 0; border-top: 1px dashed rgba(0,0,0,0.06); }
.hist-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; flex: 1; height: 100%; }
.hist-bar { width: 100%; max-width: 44px; background: linear-gradient(180deg, #3fa66a 0%, #2f7a4d 100%); border-radius: 4px 4px 0 0; min-height: 2px; transition: height 0.6s ease; }
.hist-lbl { font: 500 10px/1 "Inter", sans-serif; letter-spacing: 0.06em; color: #6b6b6b; margin-top: 6px; }
.hist-count { font: 500 11px/1 "Inter", sans-serif; color: #141414; margin-top: 2px; }
