/* ============================================================
   LIDERAIA LIBRARY — COMPONENTS.CSS
   Sidebar, Hero, Busca, Cards, Badges, Botões, Accordion
   ============================================================ */

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
  transition: transform var(--transition-base);
}

.sidebar-top {
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-brand-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: -0.01em;
}

.sidebar-brand-sub {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--sidebar-text);
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast), background var(--transition-fast);
  margin-bottom: 2px;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--color-orange);
  transform: scaleY(0);
  transition: transform var(--transition-base);
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: rgba(255,255,255,0.30);
  transition: color var(--transition-fast);
}

.nav-label { transition: color var(--transition-fast); }

.nav-item:hover {
  background: var(--sidebar-item-hover);
  color: var(--sidebar-text-hover);
}

.nav-item:hover .nav-icon { color: var(--color-orange); }

.nav-item.active {
  background: var(--sidebar-item-active);
  color: var(--color-white);
}

.nav-item.active::before { transform: scaleY(1); }
.nav-item.active .nav-icon { color: var(--color-orange); }

.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-dark-2);
  color: var(--color-white);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.10);
}

.sidebar-footer-info { flex: 1; min-width: 0; }

.sidebar-footer-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.70);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-footer-tagline {
  display: block;
  font-size: 10px;
  color: rgba(255,255,255,0.30);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-version {
  font-size: 10px;
  color: rgba(255,255,255,0.20);
  flex-shrink: 0;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: var(--color-bg);
  padding: var(--space-16) var(--space-12) var(--space-10);
  border-bottom: 1px solid var(--color-border);
}

.hero-inner { max-width: 720px; }

.hero-title {
  font-size: var(--text-hero);
  font-weight: 800;
  color: var(--color-dark-2);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--color-mid);
  margin-top: var(--space-2);
  font-weight: 400;
}

.hero-desc {
  font-size: 14px;
  color: var(--color-light);
  margin-top: var(--space-3);
  max-width: 560px;
  line-height: 1.65;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.metric-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 22px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
  min-width: 90px;
}

.metric-card:hover {
  border-color: var(--color-orange);
  box-shadow: 0 2px 8px rgba(232,104,16,0.15);
  transform: translateY(-1px);
}

.metric-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-orange);
  letter-spacing: -0.02em;
  line-height: 1;
  display: flex;
  align-items: center;
}

.metric-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ============================================================
   BUSCA
   ============================================================ */
.search-wrapper {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px var(--space-12);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.search-container {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
}

.search-icon-left {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
}

.search-input {
  width: 100%;
  height: 52px;
  padding: 0 44px 0 46px;
  font-size: 15px;
  font-family: var(--font-sans);
  color: var(--color-dark-2);
  background: var(--color-bg-card);
  border: 1.5px solid var(--color-border);
  border-radius: 14px;
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.search-input::placeholder { color: var(--color-muted); }

.search-input:focus {
  border-color: var(--color-orange);
  box-shadow: var(--shadow-orange);
}

.search-container:focus-within .search-icon-left { color: var(--color-orange); }

.search-clear {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  color: var(--color-light);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.search-clear:hover {
  background: var(--color-border);
  color: var(--color-dark-2);
}

.search-clear .lucide { width: 14px; height: 14px; }

#search-results:not([hidden]) {
  animation: fadeSlideIn var(--transition-base) forwards;
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   PROMPT CARDS
   ============================================================ */
.prompt-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.prompt-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px) scale(1.005);
}

.prompt-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-6) var(--space-4);
}

.prompt-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--color-orange);
  color: var(--color-white);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  margin-top: 2px;
}

.prompt-meta { flex: 1; min-width: 0; }

.prompt-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.prompt-nivel {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  line-height: 1.6;
}

.nivel-1 { color: #2E7D32; background: #E8F5E9; }
.nivel-2 { color: #F57F17; background: #FFF8E1; }
.nivel-3 { color: #6A1B9A; background: #F3E5F5; }

.prompt-tempo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--color-light);
  font-weight: 500;
}

.prompt-tempo .lucide { width: 12px; height: 12px; }

.prompt-titulo {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-dark-2);
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: var(--space-2);
}

.prompt-objetivo-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}

.prompt-objetivo {
  font-size: 13px;
  color: var(--color-mid);
  line-height: 1.5;
}

.prompt-card-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 var(--space-6) var(--space-3);
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-orange);
  padding: 6px 14px;
  border: 1.5px solid var(--color-orange);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-copy .lucide { width: 13px; height: 13px; }

.btn-copy:hover {
  background: var(--color-orange);
  color: var(--color-white);
}

.btn-copy.copied {
  background: #2E7D32;
  border-color: #2E7D32;
  color: var(--color-white);
}

.prompt-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: var(--space-1) var(--space-6) var(--space-4);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.prompt-informa,
.prompt-recebera { padding: var(--space-4) 0; }

.prompt-informa {
  padding-right: var(--space-4);
  border-right: 1px solid var(--color-border);
}

.prompt-recebera { padding-left: var(--space-4); }

.prompt-informa-label,
.prompt-recebera-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

.prompt-informa-list,
.prompt-recebera-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.prompt-informa-list li,
.prompt-recebera-list li {
  font-size: 12px;
  color: var(--color-mid);
  padding-left: 14px;
  position: relative;
  line-height: 1.4;
}

.prompt-informa-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-orange);
  font-size: 10px;
  top: 1px;
}

.prompt-recebera-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #2E7D32;
  font-size: 10px;
  top: 1px;
}

.prompt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: var(--space-3) var(--space-6);
}

.tag-pill {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-light);
  background: var(--color-bg);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}

.prompt-body {
  padding: 0 var(--space-6) var(--space-4);
}

.prompt-text-wrapper {
  position: relative;
  overflow: hidden;
  max-height: 68px;
  transition: max-height var(--transition-slow);
}

.prompt-text-wrapper.expanded { max-height: 2400px; }

.prompt-text {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--color-mid);
  line-height: 1.65;
  padding: var(--space-4);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  margin-top: var(--space-3);
}

.prompt-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 32px;
  background: linear-gradient(transparent, var(--color-bg-card));
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.prompt-text-wrapper.expanded .prompt-fade { opacity: 0; }

.btn-expand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-orange);
  margin-top: var(--space-2);
  padding: 4px 0;
  transition: opacity var(--transition-fast);
}

.btn-expand:hover { opacity: 0.75; }

.btn-expand-icon {
  display: inline-flex;
  transition: transform var(--transition-slow);
}

.btn-expand.expanded .btn-expand-icon { transform: rotate(180deg); }

.prompt-dica {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-orange-light);
  border-left: 3px solid var(--color-orange);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 12.5px;
  color: var(--color-mid);
  line-height: 1.5;
}

.prompt-dica-icon {
  font-weight: 700;
  color: var(--color-orange);
}

.prompt-para { margin-bottom: var(--space-3); }
.prompt-fields { margin-bottom: var(--space-3); }
.prompt-field-line { line-height: 1.6; }
.prompt-ol { margin-bottom: var(--space-3); }
.prompt-ol-item { padding-left: var(--space-4); margin-bottom: 3px; }
.bracket { font-weight: 600; color: var(--color-orange); }

/* ============================================================
   ESPECIALISTAS IA
   ============================================================ */
.especialista-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  position: relative;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.especialista-card:hover {
  border-color: var(--color-orange);
  box-shadow: 0 8px 24px rgba(232,104,16,0.08);
}

.especialista-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-orange);
  color: var(--color-white);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-5);
}

.especialista-badge .lucide { width: 11px; height: 11px; }

.especialista-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.especialista-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-dark-2);
  color: var(--color-white);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.especialista-header-info { flex: 1; }

.especialista-nome {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 3px;
}

.especialista-nome .lucide {
  width: 14px;
  height: 14px;
  color: var(--color-orange);
}

.especialista-descricao {
  font-size: 13px;
  color: var(--color-mid);
}

.especialista-objetivo-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.especialista-objetivo {
  font-size: 14px;
  color: var(--color-mid);
  line-height: 1.55;
  margin-bottom: var(--space-5);
}

.especialista-body { margin-bottom: var(--space-5); }

.especialista-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.btn-conversar {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-orange);
  padding: 9px 18px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.btn-conversar .lucide { width: 14px; height: 14px; }
.btn-conversar:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-copy-especialista {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-mid);
  padding: 8px 14px;
  border: 1.5px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-copy-especialista .lucide { width: 13px; height: 13px; }

.btn-copy-especialista:hover {
  border-color: var(--color-orange);
  color: var(--color-orange);
}

.btn-copy-especialista.copied {
  background: #2E7D32;
  border-color: #2E7D32;
  color: var(--color-white);
}

/* ============================================================
   SECTION FEATURED (Comece por Aqui)
   ============================================================ */
.section--featured { background: var(--color-bg); }

/* ============================================================
   MOBILE RESPONSIVE — COMPONENTS
   ============================================================ */
@media (max-width: 767px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  }
  .search-wrapper { padding: 10px var(--space-4); }
  .search-input { height: 46px; font-size: 14px; }
  .hero { padding: var(--space-8) var(--space-4) var(--space-6); }
  .hero-title { font-size: 36px; }
  .metric-card { padding: 10px 16px; min-width: 70px; }
  .prompt-info-grid { grid-template-columns: 1fr; }
  .prompt-informa {
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding-right: 0;
    padding-bottom: var(--space-3);
  }
  .prompt-recebera { padding-left: 0; padding-top: var(--space-3); }
}
