/* Voices - estilos base: identidad visual SaaS moderna */

:root {
  --voices-accent: #7ED321;
  --voices-accent-dark: #5FA818;
  --voices-bg: #F4F6F5;
  --voices-sidebar-bg: #14171A;
  --voices-sidebar-hover: #1F242A;
  --voices-sidebar-active: #22281F;
  --voices-card-bg: #FFFFFF;
  --voices-border: #E6E9E8;
  --voices-text: #1D2321;
  --voices-text-muted: #6B7570;
  --voices-radius: 14px;
  --voices-shadow: 0 2px 10px rgba(20, 23, 26, 0.06);
  --voices-shadow-hover: 0 6px 18px rgba(20, 23, 26, 0.10);
  --sidebar-width: 260px;
  --topbar-height: 68px;
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--voices-bg);
  color: var(--voices-text);
  font-family: "Segoe UI", "Inter", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

a {
  text-decoration: none;
}

/* ---------- Layout ---------- */

.voices-shell {
  display: flex;
  min-height: 100vh;
}

.voices-sidebar {
  width: var(--sidebar-width);
  background: var(--voices-sidebar-bg);
  color: #E8ECEA;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  padding: 20px 14px;
  z-index: 1030;
}

.voices-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 22px;
}

.voices-sidebar-brand img {
  width: 32px;
  height: 32px;
}

.voices-sidebar-brand .brand-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  line-height: 1.1;
}

.voices-sidebar-brand .brand-subtitle {
  font-size: 0.68rem;
  color: #9AA39D;
  letter-spacing: 0.02em;
}

.voices-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.voices-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #C7CDC9;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.voices-nav a i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
}

.voices-nav a:hover {
  background: var(--voices-sidebar-hover);
  color: #fff;
}

.voices-nav a.active {
  background: var(--voices-sidebar-active);
  color: var(--voices-accent);
}

.voices-sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
  margin-top: 10px;
}

.voices-sidebar-footer .user-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
}

.voices-sidebar-footer .user-company {
  color: #9AA39D;
  font-size: 0.75rem;
  margin-bottom: 10px;
}

.voices-sidebar-footer button {
  width: 100%;
}

/* ---------- Main area ---------- */

.voices-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.voices-topbar {
  height: var(--topbar-height);
  background: var(--voices-card-bg);
  border-bottom: 1px solid var(--voices-border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.voices-topbar .page-title {
  font-weight: 700;
  font-size: 1.15rem;
  margin: 0;
  white-space: nowrap;
}

.voices-topbar .search-box {
  flex: 1;
  max-width: 360px;
}

.voices-topbar .topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.voices-content {
  padding: 24px;
  flex: 1;
}

/* ---------- Buttons ---------- */

.btn-voices {
  background-color: var(--voices-accent);
  border-color: var(--voices-accent);
  color: #16250A;
  font-weight: 600;
}

.btn-voices:hover,
.btn-voices:focus {
  background-color: var(--voices-accent-dark);
  border-color: var(--voices-accent-dark);
  color: #16250A;
}

.btn-outline-voices {
  color: var(--voices-accent-dark);
  border: 1px solid var(--voices-accent);
  background: transparent;
  font-weight: 600;
}

.btn-outline-voices:hover {
  background: rgba(126, 211, 33, 0.12);
}

/* ---------- Cards ---------- */

.card-voices {
  background: var(--voices-card-bg);
  border: 1px solid var(--voices-border);
  border-radius: var(--voices-radius);
  box-shadow: var(--voices-shadow);
  transition: box-shadow 0.15s ease;
}

.card-voices:hover {
  box-shadow: var(--voices-shadow-hover);
}

.card-voices .card-header {
  background: transparent;
  border-bottom: 1px solid var(--voices-border);
  font-weight: 600;
}

.stat-card {
  background: var(--voices-card-bg);
  border: 1px solid var(--voices-border);
  border-radius: var(--voices-radius);
  box-shadow: var(--voices-shadow);
  padding: 18px 20px;
  height: 100%;
}

.stat-card .stat-label {
  color: var(--voices-text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.stat-card .stat-value {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-card .stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(126, 211, 33, 0.15);
  color: var(--voices-accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* ---------- Badges ---------- */

.badge-soft-success { background: rgba(25, 135, 84, 0.12); color: #146c43; }
.badge-soft-danger { background: rgba(220, 53, 69, 0.12); color: #b02a37; }
.badge-soft-warning { background: rgba(255, 193, 7, 0.18); color: #7a5b00; }
.badge-soft-info { background: rgba(13, 202, 240, 0.14); color: #087990; }
.badge-soft-secondary { background: rgba(108, 117, 125, 0.14); color: #4d5257; }
.badge-soft-primary { background: rgba(126, 211, 33, 0.16); color: #4c7d10; }
.badge-soft-dark { background: rgba(20, 23, 26, 0.12); color: #14171a; }

/* ---------- Misc ---------- */

.text-accent { color: var(--voices-accent-dark) !important; }
.bg-voices-soft { background: rgba(126, 211, 33, 0.10) !important; }

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--voices-text-muted);
}

.empty-state i {
  font-size: 2.4rem;
  color: var(--voices-accent);
  margin-bottom: 12px;
}

.step-indicator {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.step-indicator .step {
  padding: 6px 14px;
  border-radius: 999px;
  background: #EEF1EF;
  color: var(--voices-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.step-indicator .step.active {
  background: var(--voices-accent);
  color: #16250A;
}

.transcript-box {
  background: #F8FAF7;
  border: 1px solid var(--voices-border);
  border-radius: 10px;
  padding: 16px;
  white-space: pre-wrap;
  font-size: 0.92rem;
  line-height: 1.6;
}

.fake-audio-player {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F8FAF7;
  border: 1px dashed var(--voices-border);
  border-radius: 10px;
  padding: 14px 16px;
  color: var(--voices-text-muted);
}

/* ---------- Dialogo de confirmacion personalizado ---------- */

.voices-confirm-modal {
  border: none;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(20, 23, 26, 0.28);
  overflow: hidden;
}

.voices-confirm-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto;
  border-radius: 50%;
  background: rgba(220, 53, 69, 0.12);
  color: #DC3545;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  animation: voicesConfirmPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes voicesConfirmPop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.voices-confirm-title {
  font-weight: 700;
  font-size: 1.2rem;
}

.voices-confirm-message {
  font-size: 0.92rem;
  line-height: 1.5;
}

.btn-voices-danger {
  background-color: #DC3545;
  border-color: #DC3545;
  color: #fff;
  font-weight: 600;
  border-radius: 10px;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn-voices-danger:hover,
.btn-voices-danger:focus {
  background-color: #B02A37;
  border-color: #B02A37;
  color: #fff;
}

.btn-voices-danger:active {
  transform: scale(0.97);
}

#voicesConfirmModal .modal-dialog {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

@media (max-width: 991px) {
  .voices-sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .voices-sidebar.open {
    transform: translateX(0);
  }
  .voices-main {
    margin-left: 0;
  }
}

/* ---------- Trazabilidad de entrevistas (transcripcion / linea de tiempo) ---------- */

.nav-tabs-voices {
  border-bottom: 1px solid var(--voices-border);
}

.nav-tabs-voices .nav-link {
  color: var(--voices-text-muted);
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.nav-tabs-voices .nav-link.active {
  color: var(--voices-accent-dark);
  border-bottom: 2px solid var(--voices-accent);
  background: transparent;
}

.transcript-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
}

.transcript-turn {
  max-width: 85%;
  border-radius: 12px;
  padding: 8px 12px;
  background: #F8FAF7;
  border: 1px solid var(--voices-border);
}

.transcript-turn-user {
  align-self: flex-end;
  background: var(--voices-bg-soft, rgba(126, 211, 33, 0.10));
}

.transcript-turn-header {
  font-weight: 600;
  margin-bottom: 2px;
}

.transcript-turn-message {
  font-size: 0.9rem;
  white-space: pre-wrap;
}

.timeline-voices {
  border-left: 2px solid var(--voices-border);
  padding-left: 16px;
}

.timeline-voices li {
  position: relative;
}

.timeline-voices li::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--voices-accent);
}
}
