/* ============================================================
   components.css — Componentes reutilizáveis do Hub PJ
   Hero, cards, tools, chips, botões, busca, status
   ============================================================ */

/* ---------- Botão voltar ---------- */
.top { margin-bottom: 20px; }

.back {
  display: inline-flex;
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--nav-surface);
  border: 1px solid rgba(19,171,37,.14);
  box-shadow: var(--shadow);
  font-weight: 700;
}

/* ---------- Hero (páginas de setor) ---------- */
.hero {
  padding: 26px;
  margin-bottom: 22px;
}

.tag {
  display: inline-flex;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green-start), var(--green-end));
  color: #fff;
  font-weight: 700;
}

.hero h1 {
  margin: 14px 0 8px;
}

/* ---------- Hero (home) ---------- */
.hero-home {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 24px;
  padding: 32px;
  margin-bottom: 28px;
}

.hero-home h1 {
  max-width: 12ch;
}

.eyebrow {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--green-end);
  background: rgba(19,171,37,.08);
  border: 1px solid rgba(19,171,37,.12);
  font-size: .84rem;
  font-weight: 700;
  text-transform: uppercase;
}

body.dark .eyebrow {
  color: #b9f5c7;
  background: rgba(30,215,96,.10);
  border-color: rgba(30,215,96,.16);
}

.hero-meta { display: grid; gap: 14px; }

.meta-card {
  padding: 22px;
  min-height: 112px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--card-border-soft);
  background: var(--surface-card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
}

.meta-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.2rem;
  color: var(--text);
}

.gradient-line {
  width: 96px;
  height: 5px;
  border-radius: 999px;
  margin-bottom: 10px;
  background: linear-gradient(90deg, var(--green-start), var(--green-end));
}

.section-intro {
  margin-bottom: 14px;
}

/* ---------- Busca ---------- */
.search-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: var(--surface-card);
  border: 1px solid var(--card-border-soft);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  transition: .2s ease;
}

.search-panel:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.search-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(145deg, var(--green-start), var(--green-end));
  font-size: .78rem;
  flex-shrink: 0;
}

.search-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  background: var(--search-bg);
  color: var(--text);
}

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

/* ---------- Lista de setores (home) ---------- */
.sector-list { display: grid; gap: 14px; }

.sector-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--card-border-soft);
  background: var(--surface-card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  text-align: left;
  cursor: pointer;
  transition: .2s ease;
}

.sector-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.sector-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, var(--green-start), var(--green-end));
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sector-content h3 { margin: 0 0 4px; font-size: 1rem; }
.sector-content p  { margin: 0; font-size: .92rem; }

.sector-arrow {
  color: var(--green-end);
  font-weight: 700;
  white-space: nowrap;
}

body.dark .sector-arrow { color: #b9f5c7; }

/* ---------- Grid de ferramentas (páginas de setor) ---------- */
.tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tool {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* ---------- Chips ---------- */
.chip {
  display: inline-block;
  margin: 0 8px 12px 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(19,171,37,.12);
  color: var(--green-end);
  font-size: .85rem;
  font-weight: 700;
}

body.dark .chip {
  background: rgba(255,255,255,.05);
  color: #b9f5c7;
  border-color: rgba(30,215,96,.14);
}

.chip-status {
  background: var(--amber-bg);
  border-color: var(--amber-border);
  color: var(--amber);
}

/* ---------- Botões ---------- */
.btn {
  display: inline-block;
  margin-top: 12px;
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green-start), var(--green-end));
  color: #fff;
  font-weight: 700;
}

.btn-disabled {
  background: #cfd8d3;
  color: #6d7f78;
  cursor: not-allowed;
  pointer-events: none;
}

body.dark .btn-disabled {
  background: #2c3934;
  color: #9cb0a8;
}

/* ---------- Responsivo ---------- */
@media (max-width: 940px) {
  .hero-home {
    grid-template-columns: 1fr;
  }

  .hero-home h1 {
    max-width: 100%;
  }

  .sector-card {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

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