/* WorkShift — Design tokens e componentes compartilhados
   Azul #2563EB é a cor de acento oficial (laranja/coral testado e rejeitado — não usar).
   Incluir em toda página nova do app: <link rel="stylesheet" href="/css/brand.css">
*/
:root {
  --navy: #0F1F3D;
  --navy-soft: #1E3A5F;
  --blue: #2563EB;
  --blue-dark: #1D4ED8;
  --blue-light: #EEF3FF;
  --green: #059669;
  --green-bg: #ECFDF5;
  --red: #DC2626;
  --red-bg: #FEF2F2;
  --amber: #B45309;
  --amber-bg: #FFFBEB;
  --gray-1: #F0F2F5;
  --gray-2: #E2E6ED;
  --gray-3: #9AA3B0;
  --gray-4: #4B5563;
  --text: #111827;
  --bg: #FBF9F6;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 20px 60px rgba(15, 31, 61, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

h1, h2, h3, .ws-serif {
  font-family: 'DM Serif Display', Georgia, serif;
  color: var(--navy) !important;
  margin: 0 0 12px;
}

a { color: var(--blue); }

.ws-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.ws-narrow {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Nav ---------- */
.ws-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: #fff;
  border-bottom: 1px solid var(--gray-2);
}
.ws-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  color: var(--navy) !important;
  text-decoration: none !important;
}
.ws-logo span { color: var(--blue) !important; }
.ws-nav-links { display: flex; align-items: center; gap: 24px; }
.ws-nav-links a {
  color: var(--navy) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  transition: color .15s ease;
}
.ws-nav-links a:hover { color: var(--blue) !important; }
.ws-nav-links a.is-active { color: var(--blue) !important; }

/* ---------- Nav — mobile toggle ---------- */
.ws-nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.ws-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy) !important;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.ws-nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ws-nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.ws-nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.ws-nav-backdrop { display: none; }

@media (max-width: 760px) {
  .ws-nav-toggle { display: flex; }
  .ws-nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: min(78vw, 300px);
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    padding: 90px 28px 28px;
    box-shadow: -10px 0 40px rgba(15,31,61,0.14);
    transition: right .25s ease;
    z-index: 210;
    gap: 26px;
  }
  .ws-nav-links.is-open { right: 0; }
  .ws-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15,31,61,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 200;
  }
  .ws-nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
}

/* ---------- Cards / panels ---------- */
.ws-card {
  background: #fff !important;
  border: 1.5px solid var(--gray-2) !important;
  border-radius: var(--radius) !important;
  padding: 32px !important;
  box-shadow: var(--shadow);
}

/* ---------- Forms ---------- */
.ws-field { margin-bottom: 18px; }
.ws-field label {
  display: block;
  font-weight: 700 !important;
  font-size: 14px !important;
  color: var(--navy) !important;
  margin-bottom: 6px !important;
}
.ws-field input,
.ws-field select,
.ws-field textarea {
  width: 100% !important;
  padding: 13px 16px !important;
  border: 1.5px solid var(--gray-2) !important;
  border-radius: var(--radius-sm) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 15px !important;
  color: var(--text) !important;
  background: #fff !important;
  transition: border-color 0.15s ease;
}
.ws-field input:focus,
.ws-field select:focus,
.ws-field textarea:focus {
  outline: none !important;
  border-color: var(--blue) !important;
}
.ws-field small { color: var(--gray-3) !important; font-size: 13px !important; }
.ws-field-error input { border-color: var(--red) !important; }
.ws-error-text { color: var(--red) !important; font-size: 13px !important; margin-top: 4px !important; }

/* ---------- Buttons ---------- */
.ws-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 13px 26px !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  border: none !important;
  cursor: pointer !important;
  text-decoration: none !important;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.ws-btn-primary {
  background: var(--blue) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28) !important;
}
.ws-btn-primary:hover { background: var(--blue-dark) !important; }
.ws-btn-primary:disabled { opacity: 0.6 !important; cursor: not-allowed !important; box-shadow: none !important; }
.ws-btn-secondary {
  background: #fff !important;
  color: var(--navy) !important;
  border: 1.5px solid var(--gray-2) !important;
}
.ws-btn-secondary:hover { border-color: var(--blue) !important; color: var(--blue) !important; }
.ws-btn-danger {
  background: var(--red-bg) !important;
  color: var(--red) !important;
  border: 1.5px solid #FCA5A5 !important;
}
/* Applied state — used in place of the Apply button on job cards once the
   candidate already has an application on file for that role (see the
   "botão Apply" fix, rodada 25/2026-07-14). Deliberately not a disabled
   look — it's a confirmation, not an error, so it links through to the
   candidate's applications instead of dead-ending. */
.ws-btn-applied {
  background: var(--green-bg) !important;
  color: var(--green) !important;
  border: 1.5px solid var(--green-bg) !important;
  cursor: pointer;
}
.ws-btn-applied:hover { border-color: var(--green) !important; }
/* Blocked-by-verification state — used in place of the Apply button when the
   candidate needs to complete/wait on identity verification (rodada 27,
   15/07/2026, substitui o antigo popup). Two variants: a clickable link to
   /site/verify.html when there's an action to take (no submission yet, or
   rejected), and a non-clickable span when the candidate just needs to wait
   out the 72h review window after approval — nothing to click there. */
.ws-btn-verify {
  background: var(--amber-bg) !important;
  color: var(--amber) !important;
  border: 1.5px solid #FDE68A !important;
}
.ws-btn-verify:hover { border-color: var(--amber) !important; }
.ws-btn-disabled {
  background: var(--gray-1) !important;
  color: var(--gray-3) !important;
  border: 1.5px solid var(--gray-2) !important;
  cursor: default !important;
}
.ws-btn-block { width: 100% !important; }
.ws-btn-sm { padding: 8px 16px !important; font-size: 13px !important; }

/* ---------- Alerts / badges ---------- */
.ws-alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 18px;
  display: none;
}
.ws-alert.is-visible { display: block; }
.ws-alert-error { background: var(--red-bg) !important; color: var(--red) !important; border: 1px solid #FCA5A5 !important; }
.ws-alert-success { background: var(--green-bg) !important; color: var(--green) !important; border: 1px solid #6EE7B7 !important; }
.ws-alert-warning { background: var(--amber-bg) !important; color: var(--amber) !important; border: 1px solid #FCD34D !important; }
.ws-alert-info { background: var(--blue-light) !important; color: var(--blue-dark) !important; border: 1px solid #BFDBFE !important; }

.ws-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ws-badge-pending { background: var(--amber-bg); color: var(--amber); }
.ws-badge-approved { background: var(--green-bg); color: var(--green); }
.ws-badge-rejected { background: var(--red-bg); color: var(--red); }
.ws-badge-new { background: var(--green-bg); color: var(--green); }
.ws-badge-neutral { background: var(--gray-1); color: var(--gray-4); }

/* ---------- Loading spinner ---------- */
.ws-spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ws-spin 0.7s linear infinite;
  display: inline-block;
}
.ws-spinner-dark { border-color: rgba(15,31,61,0.15); border-top-color: var(--navy); }
@keyframes ws-spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.ws-footer {
  padding: 40px 32px;
  text-align: center;
  color: var(--gray-3);
  font-size: 13px;
  border-top: 1px solid var(--gray-2);
  margin-top: 60px;
}
.ws-footer a { color: var(--gray-4); text-decoration: none; margin: 0 10px; }

/* ---------- Rich footer (with social links) ---------- */
.ws-footer-rich { background: #fff; border-top: 1px solid var(--gray-2); padding: 48px 32px 24px; margin-top: 60px; }
.ws-footer-inner { max-width: 1200px; margin: 0 auto; }
.ws-footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.ws-footer-brand .ws-f-logo { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--navy) !important; margin-bottom: 10px; }
.ws-footer-brand .ws-f-logo span { color: var(--blue) !important; }
.ws-footer-brand p { color: var(--gray-3); font-size: 13px; line-height: 1.6; max-width: 260px; margin: 0 0 16px; }
.ws-footer-social { display: flex; gap: 10px; }
.ws-footer-social a {
  width: 34px; height: 34px; border-radius: 8px; background: var(--gray-1) !important;
  display: flex; align-items: center; justify-content: center; color: var(--navy-soft) !important;
  transition: background .2s, color .2s; margin: 0 !important;
}
.ws-footer-social a:hover { background: var(--blue) !important; color: #fff !important; }
.ws-footer-social svg { width: 16px; height: 16px; fill: currentColor; }
.ws-footer-col h5 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-3) !important; margin-bottom: 12px; font-weight: 800; }
.ws-footer-col a { display: block; font-size: 14px; color: var(--gray-4) !important; text-decoration: none !important; margin: 0 0 10px !important; }
.ws-footer-col a:hover { color: var(--blue) !important; }
.ws-footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 20px; border-top: 1px solid var(--gray-2); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.ws-footer-bottom .f-copy { font-size: 13px; color: var(--gray-3); }
.ws-footer-bottom .f-legal { display: flex; gap: 18px; }
.ws-footer-bottom .f-legal a { font-size: 13px; color: var(--gray-3) !important; text-decoration: none !important; margin: 0 !important; }
.ws-footer-bottom .f-legal a:hover { color: var(--navy) !important; }
@media (max-width: 780px) { .ws-footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .ws-footer-top { grid-template-columns: 1fr; } }

/* ---------- Shared modal (used by admin panel and apply/verify flows) ---------- */
.ws-modal-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(15,31,61,0.55);
  align-items: center; justify-content: center; z-index: 300; padding: 20px;
}
.ws-modal-backdrop.is-open { display: flex; }
.ws-modal { background: #fff; border-radius: var(--radius); padding: 28px; max-width: 560px; width: 100%; max-height: 88vh; overflow-y: auto; }
.ws-modal-close { float: right; cursor: pointer; font-size: 20px; color: var(--gray-3); }

@media (max-width: 640px) {
  .ws-nav { padding: 16px 20px; }
  .ws-nav-links { gap: 14px; }
  .ws-card { padding: 22px !important; }
}

/* ==========================================================================
   Sistema Global de Feedback Visual (js/feedback.js)
   Toasts, botão em processamento, overlay crítico, barra de progresso de
   topo, skeleton loading. Compartilhado por todas as páginas do site.
   ========================================================================== */

/* ---------- Toasts ---------- */
#wsToastRegion {
  position: fixed !important; top: 16px !important; right: 16px !important; z-index: 9999 !important;
  display: flex !important; flex-direction: column !important; gap: 10px !important;
  max-width: 380px !important; width: calc(100% - 32px) !important; pointer-events: none !important;
}
.ws-toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 14px 14px 16px; border-radius: var(--radius-sm); background: #fff;
  box-shadow: 0 10px 30px rgba(15,31,61,0.18), 0 2px 6px rgba(15,31,61,0.10);
  border-left: 4px solid var(--navy); font-size: 14px; font-weight: 600; color: var(--navy);
  opacity: 0; transform: translateY(-8px); transition: opacity 0.22s ease, transform 0.22s ease;
}
.ws-toast.is-visible { opacity: 1; transform: translateY(0); }
.ws-toast.is-leaving { opacity: 0 !important; transform: translateY(-8px) scale(0.98) !important; }
.ws-toast-success { border-left-color: var(--green); }
.ws-toast-error { border-left-color: var(--red); }
.ws-toast-warning { border-left-color: var(--amber); }
.ws-toast-info { border-left-color: var(--blue); }
.ws-toast-icon {
  flex: none; width: 22px; height: 22px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
  color: #fff !important; margin-top: 1px;
}
.ws-toast-success .ws-toast-icon { background: var(--green) !important; }
.ws-toast-error .ws-toast-icon { background: var(--red) !important; }
.ws-toast-warning .ws-toast-icon { background: var(--amber) !important; }
.ws-toast-info .ws-toast-icon { background: var(--blue) !important; }
.ws-toast-body { flex: 1; line-height: 1.4; padding-top: 1px; }
.ws-toast-close {
  flex: none; background: none !important; border: none !important; color: var(--gray-3) !important;
  cursor: pointer !important; font-size: 18px !important; line-height: 1 !important; padding: 0 2px !important;
}
.ws-toast-close:hover { color: var(--navy) !important; }
@media (max-width: 640px) {
  #wsToastRegion { left: 12px !important; right: 12px !important; top: 12px !important; max-width: none !important; }
}

/* ---------- Overlay de bloqueio (só operações críticas) ---------- */
#wsOverlay {
  position: fixed; inset: 0; background: rgba(15,31,61,0.55); display: flex;
  align-items: center; justify-content: center; z-index: 10000;
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
}
#wsOverlay.is-visible { opacity: 1; pointer-events: auto; }
.ws-overlay-box {
  background: #fff; border-radius: var(--radius); padding: 28px 34px; display: flex;
  flex-direction: column; align-items: center; gap: 14px; box-shadow: 0 20px 50px rgba(15,31,61,0.30);
  max-width: 320px; text-align: center;
}
.ws-overlay-box .ws-spinner-dark { width: 26px; height: 26px; border-width: 3px; }
.ws-overlay-msg { font-size: 14px; font-weight: 700; color: var(--navy); }

/* ---------- Barra de progresso de topo ---------- */
#wsTopbar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--navy)); z-index: 10001;
  opacity: 0; transition: width 0.25s ease, opacity 0.2s ease;
  box-shadow: 0 0 8px rgba(37,99,235,0.6);
}
#wsTopbar.is-visible { opacity: 1; }
#wsTopbar.is-indeterminate { animation: ws-topbar-indeterminate 1.1s ease-in-out infinite; }
@keyframes ws-topbar-indeterminate {
  0% { width: 0%; margin-left: 0%; }
  50% { width: 40%; margin-left: 30%; }
  100% { width: 0%; margin-left: 100%; }
}

/* ---------- Skeleton loading ---------- */
.ws-skel {
  position: relative; overflow: hidden; background: var(--gray-1) !important; border-radius: 6px;
}
.ws-skel::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  animation: ws-skel-shimmer 1.4s ease-in-out infinite;
}
@keyframes ws-skel-shimmer { 100% { transform: translateX(100%); } }
.ws-skel-line { height: 12px; margin-bottom: 8px; }
.ws-skel-line.short { width: 35%; }
.ws-skel-line.med { width: 60%; }
.ws-skel-line.full { width: 100%; }
.ws-skel-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--gray-1); }
.ws-skel-row:last-child { border-bottom: none; }
.ws-skel-circle { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.ws-skel-card { padding: 16px; border: 1px solid var(--gray-2); border-radius: var(--radius-sm); margin-bottom: 12px; }
tr.ws-skel-tr td { border-top: 1px solid var(--gray-1); padding: 12px 10px; }

/* ---------- Botão em processamento ---------- */
.ws-btn.is-busy { pointer-events: none !important; opacity: 0.85 !important; }

@media (prefers-reduced-motion: reduce) {
  .ws-skel::after, #wsTopbar.is-indeterminate, .ws-spinner, .ws-toast { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
