/* =====================================================
   PORTAL REDE — R&S (Recrutamento e Seleção)
   Vagas · Kanban de triagem · Página pública
   ===================================================== */

/* ---------- Cards de vaga ---------- */

.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.job-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--success);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.job-card:hover { transform: translateY(-2px); }
.job-card.expired { border-top-color: var(--danger); }
.job-card.closed { border-top-color: var(--line-strong); }

.job-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.job-dept {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--pine);
}
.job-status {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
}
.job-status.open { background: var(--success-soft); color: var(--success); }
.job-status.expired { background: var(--danger-soft); color: var(--danger); }
.job-status.closed { background: var(--paper); color: var(--ink-faint); }

.job-card h3 { font-size: 16.5px; }
.job-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin: 0; }
.job-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-faint); }
.job-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: auto;
}

/* ---------- Kanban ---------- */

.kb-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 16px;
  align-items: flex-start;
}
.kb-col {
  flex: 0 0 280px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.kb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  padding: 11px 14px;
}
.kb-count {
  background: rgba(255, 255, 255, .25);
  border-radius: var(--radius-pill);
  padding: 1px 9px;
  font-size: 12px;
}
.kb-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  max-height: 64vh;
  overflow-y: auto;
}
.kb-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.kb-card:hover { border-color: var(--pine); transform: translateY(-1px); text-decoration: none; }
.kb-name { font-weight: 700; font-size: 13.5px; }
.kb-meta { font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-job {
  display: inline-block;
  background: var(--pine-soft);
  color: var(--pine);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  margin-top: 6px;
}
.kb-when { font-size: 11px; color: var(--ink-faint); margin-top: 5px; }
.kb-empty { text-align: center; color: var(--ink-faint); font-size: 12.5px; padding: 24px 0; }

/* ---------- Respostas (Q&A) ---------- */

.qa-item { padding: 11px 0; border-bottom: 1px solid var(--line); }
.qa-item:last-child { border-bottom: none; }
.qa-q { font-weight: 700; font-size: 13px; color: var(--ink-soft); }
.qa-a { font-size: 14px; margin-top: 3px; white-space: pre-line; }

/* ---------- Página pública ---------- */

.rsp-body { background: var(--paper); }
.rsp-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.rsp-logo { max-height: 38px; border-radius: 8px; }
.rsp-chip {
  background: var(--lime);
  color: var(--pine-deep);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
}

.rsp-hero {
  position: relative;
  background: linear-gradient(120deg, var(--pine-deep), var(--pine));
  color: #fff;
  text-align: center;
  padding: 56px 20px 120px;
  overflow: hidden;
}
.rsp-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rsp-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 51, 68, .72);
}
.rsp-hero-inner { position: relative; z-index: 2; max-width: 680px; margin: 0 auto; }
.rsp-dept {
  display: inline-block;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 14px;
  margin-bottom: 12px;
}
.rsp-hero h1 { color: #fff; font-size: clamp(26px, 4vw, 38px); letter-spacing: -0.02em; }
.rsp-hero-desc { color: rgba(255, 255, 255, .8); font-size: 15px; line-height: 1.6; margin-top: 12px; }
.rsp-hero-meta {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, .75);
}

.rsp-main { max-width: 680px; margin: -70px auto 40px; padding: 0 16px; position: relative; z-index: 3; }
.rsp-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 18px;
}
.rsp-card h2 { font-size: 18px; margin-bottom: 14px; }
.rsp-desc { font-size: 14.5px; line-height: 1.75; white-space: pre-line; }

.rsp-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  margin: 26px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.rsp-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--pine);
  color: #fff;
  font-size: 13px;
  flex-shrink: 0;
}
.rsp-options { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.rsp-stars { display: flex; gap: 4px; }
.rsp-stars label { cursor: pointer; }
.rsp-stars input { display: none; }
.rsp-stars span { font-size: 30px; color: var(--line-strong); transition: color .15s var(--ease), transform .15s var(--ease); }
.rsp-stars label:hover span { transform: scale(1.15); color: var(--warn); }
.rsp-stars input:checked + span { color: var(--warn); }
.rsp-stars label:has(~ label input:checked) span { color: var(--warn); }

.rsp-footer { text-align: center; font-size: 12.5px; color: var(--ink-faint); padding: 20px; }

/* ---------- Home estilo app store ---------- */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.app-tile-1 .mod-ico { background: #E0F4F8; color: #0C6478; }
.app-tile-2 .mod-ico { background: #E9F6EE; color: #15803D; }
.app-tile-3 .mod-ico { background: #FBF1DE; color: #B07C10; }
.app-tile-4 .mod-ico { background: #F2EBFB; color: #6D28D9; }
.app-tile-5 .mod-ico { background: #FBEAE5; color: #C2452D; }
.app-tile-6 .mod-ico { background: #E7EEFB; color: #2563EB; }
.app-tile-7 .mod-ico { background: #FDEEF3; color: #BE185D; }
.app-tile-8 .mod-ico { background: #EAF7F1; color: #0F766E; }

.apps-section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--ink-faint);
  margin: 26px 0 12px;
}
.apps-section-label:first-of-type { margin-top: 4px; }

/* =====================================================
   Home estilo store — hero de marketing
   ===================================================== */

.store-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  align-items: center;
  background: var(--pine-deep);
  border-radius: 20px;
  padding: 42px 44px;
  margin-bottom: 22px;
}
@media (max-width: 920px) {
  .store-hero { grid-template-columns: 1fr; padding: 32px 26px; }
  .store-featured { display: none; }
}

/* Decoração própria do banner: barra diagonal, grade de pontos e monograma */
.store-hero-deco { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.deco-bar {
  position: absolute;
  top: -40%; right: 16%;
  width: 120px; height: 200%;
  background: rgba(59, 214, 232, .10);
  transform: rotate(18deg);
}
.deco-bar::after {
  content: "";
  position: absolute;
  left: 150px; top: 0;
  width: 40px; height: 100%;
  background: rgba(59, 214, 232, .07);
}
.deco-dots {
  position: absolute;
  left: 30px; bottom: 22px;
  width: 130px; height: 70px;
  background-image: radial-gradient(rgba(255,255,255,.18) 1.6px, transparent 1.6px);
  background-size: 15px 15px;
}
.deco-wm {
  position: absolute;
  right: -18px; bottom: -56px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 220px;
  line-height: 1;
  letter-spacing: -0.06em;
  color: rgba(255, 255, 255, .035);
  user-select: none;
}

.store-hero-content { position: relative; z-index: 1; }
.store-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  margin-bottom: 16px;
}
.store-eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--lime);
  display: inline-block;
}
.store-hero-content h1 {
  color: #fff;
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}
/* Palavra com marcação tipo caneta (quebra o padrão "IA") */
.store-hero-content h1 .mark {
  font-style: normal;
  position: relative;
  white-space: nowrap;
  color: var(--pine-deep);
  padding: 0 6px;
  z-index: 0;
}
.store-hero-content h1 .mark::before {
  content: "";
  position: absolute;
  inset: 4% -2px 6%;
  background: var(--lime);
  transform: skewX(-7deg) rotate(-1.2deg);
  border-radius: 3px;
  z-index: -1;
}
.store-hero-content > p {
  color: rgba(255, 255, 255, .72);
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 560px;
  margin: 0 0 22px;
}

.store-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 4px 4px 4px 18px;
  max-width: 480px;
  color: var(--ink-faint);
}
.store-search input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  padding: 12px 4px;
}
.store-search input::placeholder { color: var(--ink-faint); }

.store-stats {
  display: flex;
  gap: 26px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.store-stats span { font-size: 13px; color: rgba(255, 255, 255, .6); }
.store-stats strong {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 19px;
  color: #fff;
  margin-right: 4px;
}

/* Tiles em destaque: pilha levemente inclinada (cara de coleção montada à mão) */
.store-featured {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feat-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 14px;
  padding: 15px 18px;
  text-decoration: none;
  color: #fff;
  transition: transform .22s var(--ease);
}
/* Cascata: o 1º é sólido e os seguintes desvanecem, criando profundidade.
   O tilt fica na propriedade `rotate`; a flutuação anima só o `transform`. */
.feat-a { background: #0C6478; margin-right: 26px; opacity: 1;   rotate: -1.5deg; animation: feat-float 6s ease-in-out infinite; }
.feat-b { background: #1D4E89; margin-left: 16px;  opacity: .78; rotate: 1.2deg;  animation: feat-float 6s ease-in-out -1.5s infinite; }
.feat-c { background: #6D28D9; margin-right: 6px;  opacity: .52; rotate: -0.8deg; animation: feat-float 6s ease-in-out -3s infinite; }
.feat-d { background: #0E7C66; margin-left: 30px;  opacity: .28; rotate: 1.4deg;  animation: feat-float 6s ease-in-out -4.5s infinite; }
.feat-tile:hover { opacity: 1; animation-play-state: paused; text-decoration: none; }

@keyframes feat-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: reduce) {
  .feat-tile { animation: none; }
}
.feat-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, .16);
}
.feat-texts { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.feat-name { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; }
.feat-sub { font-size: 12px; color: rgba(255, 255, 255, .68); }
.feat-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, .85);
  background: rgba(255, 255, 255, .16);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* Barra de categorias + saudação */
.store-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.store-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.store-pill {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .18s var(--ease);
}
.store-pill:hover { border-color: var(--pine); color: var(--pine); }
.store-pill.on { background: var(--pine); border-color: var(--pine); color: #fff; }
.store-hello { font-size: 13px; color: var(--ink-faint); }

.store-section { margin-bottom: 26px; }
.store-section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.store-section-head h2 { font-size: 18px; letter-spacing: -0.01em; }
.store-section-sub { font-size: 13px; color: var(--ink-faint); }

/* =====================================================
   Assinatura eletrônica
   ===================================================== */

.sig-banner {
  border-radius: var(--radius);
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}
.sig-banner.ok { background: var(--success-soft); color: var(--success); border: 1px solid var(--success); }
.sig-banner.bad { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); }

.sig-doc-frame { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }

/* Termo jurídico */
.sig-term {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--pine);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* Pad de assinatura */
.sig-pad { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--surface); }
.sig-tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.sig-tab {
  flex: 1;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .15s var(--ease);
}
.sig-tab.on { background: var(--pine); border-color: var(--pine); color: #fff; }
.sig-canvas-wrap { position: relative; }
.sig-pad canvas {
  width: 100%;
  height: 180px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}
.sig-canvas-hint {
  position: absolute;
  left: 0; right: 0; bottom: 8px;
  text-align: center;
  font-size: 11.5px;
  color: var(--ink-faint);
  pointer-events: none;
}

/* Certificado */
.cert-sheet {
  max-width: 820px;
  margin: 28px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 46px;
}
.cert-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--pine); padding-bottom: 16px; margin-bottom: 18px; }
.cert-kicker { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--pine); }
.cert-head h1 { font-size: 23px; margin-top: 4px; }
.cert-intro { font-size: 13.5px; line-height: 1.7; color: var(--ink-soft); }
.cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; margin: 18px 0; }
.cert-grid > div { font-size: 13px; }
.cert-grid span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.cert-grid .cert-hash { grid-column: span 2; }
.cert-grid .cert-hash strong { font-size: 11px; word-break: break-all; font-weight: 500; }
.cert-section { font-size: 14px; margin: 22px 0 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.cert-signer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cert-signer .cn { font-weight: 700; font-size: 14px; }
.cert-signer .cm { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.cert-signature { display: flex; align-items: center; gap: 14px; }
.cert-signature img { max-height: 56px; max-width: 180px; border-bottom: 1px solid var(--ink); }
.cert-initials { display: flex; flex-direction: column; align-items: center; }
.cert-initials img { max-height: 42px; max-width: 90px; }
.cert-initials small { font-size: 10px; color: var(--ink-faint); }
.cert-trail { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.cert-trail td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cert-foot { font-size: 11.5px; color: var(--ink-faint); margin-top: 22px; line-height: 1.6; }

@media print {
  body { background: #fff !important; }
  .cert-sheet { border: none; margin: 0; max-width: 100%; }
  .no-print { display: none !important; }
}

/* Tag de categoria dentro do card de app */
.mod-tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--pine);
  background: var(--pine-soft);
  padding: 2px 10px;
  border-radius: var(--radius-pill);
}

/* ---------- Configurações da rede ---------- */

.cfg-modules { display: flex; flex-direction: column; }
.cfg-module-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.cfg-module-row:last-child { border-bottom: none; }
.cfg-tri { width: auto; min-width: 210px; flex-shrink: 0; }
.cfg-module-name { display: block; font-weight: 700; font-size: 14.5px; }
.cfg-module-desc { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }

/* Switch profissional */
.toggle { position: relative; display: inline-flex; flex-shrink: 0; }
.toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.toggle-track {
  width: 46px; height: 26px;
  border-radius: var(--radius-pill);
  background: var(--line-strong);
  transition: background-color .2s var(--ease);
  display: inline-block;
  position: relative;
}
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s var(--ease);
}
.toggle input:checked + .toggle-track { background: var(--pine); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(20px); }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--lime); outline-offset: 2px; }

/* Matriz de permissões */
.cfg-members .cfg-th { text-align: center; font-size: 10.5px; }
.cfg-members .cfg-check { text-align: center; }
.cfg-members .cfg-check input {
  width: 17px; height: 17px;
  accent-color: var(--pine);
  cursor: pointer;
}
