/* =====================================================================
   EcoFila · Design System — ecofila-components.css
   Componentes reutilizáveis (versão "em fluxo", sem posições absolutas).
   CÓPIA PARA O SITE: todas as classes e keyframes levam o prefixo "ef-" (ex.: .ef-brand-bar)
   para não colidirem com as classes existentes do site (.btn, etc.).
   Requer ecofila-tokens.css.
   ===================================================================== */

/* ---------- Barra de marca ---------- */
.ef-brand-bar { height: 4px; width: 72px; border-radius: 4px; background: var(--brand-grad); transform-origin: 0 50%; }
.ef-brand-bar.ef-full { width: 100%; }

/* ---------- Cabeçalho de cena ---------- */
.ef-scene-header .ef-brand-bar { margin-bottom: 22px; }
.ef-sh-title {
  margin: 0;
  font-family: var(--f-head); font-weight: 800;
  font-size: var(--t-display); line-height: 1.08; letter-spacing: var(--track-tight);
  color: var(--fila);
}
.ef-sh-title .ef-sh-num { color: var(--eco); }
.ef-sh-title .ef-sh-dot { color: var(--cinza); opacity: .55; font-weight: 700; }
.ef-sh-sub { margin: 14px 0 0; font-size: var(--t-sub); font-weight: 400; color: var(--cinza); }

/* revelação palavra-a-palavra (ver EcoMotion.splitWords) */
.ef-w-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.ef-w { display: inline-block; } /* sem will-change: fica sempre nítido ao ampliar */

/* ---------- Texto ---------- */
.ef-eyebrow {
  font-family: var(--f-head); font-weight: 700;
  font-size: var(--t-eyebrow); letter-spacing: .16em; text-transform: uppercase;
  color: var(--cinza);
}
.ef-statement { font-family: var(--f-head); font-weight: 800; font-size: var(--t-statement); letter-spacing: var(--track-tight); color: var(--fila); line-height: 1.12; }
.ef-statement .ef-accent, .ef-accent { color: var(--eco); }
.ef-lead { font-size: var(--t-lead); font-weight: 500; color: var(--tinta); }
.ef-mono { font-family: var(--f-mono); font-size: var(--t-mono); color: var(--cinza); }

/* ---------- Cartões ---------- */
.ef-card {
  background: var(--branco);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 30px 34px;
}
.ef-card-mist { background: var(--nevoa); border-color: transparent; box-shadow: none; }
.ef-card-accent { border-color: color-mix(in srgb, var(--eco) 30%, transparent); }
.ef-panel-head { display: flex; align-items: center; justify-content: space-between; }
.ef-panel-title { font-family: var(--f-head); font-weight: 800; font-size: var(--t-panel); color: var(--fila); margin-top: 6px; }

/* ---------- Chip / badge ---------- */
.ef-chip, .ef-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 12px;
  border-radius: var(--r-pill);
  background: var(--branco);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-family: var(--f-head); font-weight: 700; font-size: var(--t-chip); letter-spacing: .12em; text-transform: uppercase;
  color: var(--fila); white-space: nowrap;
}
.ef-chip .ef-chip-ico { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--nevoa); color: var(--eco); }
.ef-chip .ef-chip-ico .ef-ico { width: 18px; height: 18px; }
.ef-badge { color: var(--eco); border: 0; box-shadow: var(--shadow-md); padding-left: 10px; }
.ef-badge .ef-ck { width: 30px; height: 30px; background: var(--eco); border-color: var(--eco); color: #fff; }
.ef-badge .ef-ck .ef-ico { width: 17px; height: 17px; }

/* ---------- Botões ---------- */
.ef-btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 36px; border-radius: var(--r-pill);
  background: var(--fila); color: #fff;
  font-family: var(--f-head); font-weight: 700; font-size: 16px; letter-spacing: .16em; text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(35, 57, 118, .28);
  transition: transform var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.ef-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(35, 57, 118, .34); }
.ef-btn:focus-visible { outline: 3px solid var(--lima); outline-offset: 4px; }
.ef-btn[disabled] { opacity: .45; cursor: default; transform: none; }
.ef-btn-ghost {
  background: rgba(255, 255, 255, .95); color: var(--fila);
  border: 1px solid var(--line-strong); box-shadow: var(--shadow-sm);
  padding: 12px 24px; font-size: 14px; letter-spacing: .14em;
}

/* ---------- Ícones ---------- */
.ef-ico { width: 24px; height: 24px; display: block; flex: none; }

/* ---------- Estados ---------- */
.ef-status-ok       { --st: var(--ok);   --st-soft: var(--ok-soft); }
.ef-status-info     { --st: var(--info); --st-soft: var(--info-soft); }
.ef-status-warning  { --st: var(--warn); --st-soft: var(--warn-soft); }
.ef-status-critical { --st: var(--crit); --st-soft: var(--crit-soft); }
.ef-status-offline  { --st: var(--off);  --st-soft: var(--off-soft); }
.ef-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: var(--st, var(--eco));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--st, var(--eco)) 16%, transparent);
}
.ef-dot.ef-live { animation: ef-dotPulse 2.4s ease-in-out infinite; }
@keyframes ef-dotPulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--st, var(--eco)) 18%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in srgb, var(--st, var(--eco)) 6%, transparent); }
}

/* ---------- Check redondo (pending → active → done) ---------- */
.ef-ck {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  border: 2px solid var(--line-strong); color: transparent; background: var(--branco);
  transition: background var(--dur-base) ease, border-color var(--dur-base) ease, color var(--dur-fast) ease, transform var(--dur-base) var(--ease-back);
}
.ef-ck .ef-ico { width: 20px; height: 20px; stroke-width: 2.6; }
[data-state="active"] > .ef-ck, .ef-ck[data-state="active"] { border-color: var(--oceano); border-top-color: transparent; animation: ef-spin .9s linear infinite; }
[data-state="done"] > .ef-ck, .ef-ck[data-state="done"] { background: var(--eco); border-color: var(--eco); color: #fff; animation: none; }
@keyframes ef-spin { to { transform: rotate(360deg); } }

/* ---------- Lista de passos / checklist ---------- */
.ef-steps { list-style: none; margin: 0; padding: 18px 0 0; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); }
.ef-step { display: flex; align-items: center; gap: 16px; min-height: 50px; }
.ef-step .ef-st-num { font-family: var(--f-mono); font-size: 13px; color: var(--cinza); width: 22px; }
.ef-step .ef-st-label { flex: 1; font-size: var(--t-body); font-weight: 500; color: var(--cinza); transition: color var(--dur-base); }
.ef-step[data-state="active"] .ef-st-label, .ef-step[data-state="done"] .ef-st-label { color: var(--tinta); }
.ef-step .ef-st-tag { font-family: var(--f-head); font-weight: 700; font-size: 11px; letter-spacing: .14em; color: var(--eco); opacity: 0; transition: opacity .3s; }
.ef-step[data-state="done"] .ef-st-tag { opacity: 1; }

/* ---------- Pílula de conclusão ---------- */
.ef-done-pill {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 22px; border-radius: var(--r-md);
  background: var(--ok-soft); color: var(--tinta);
  font-family: var(--f-head); font-weight: 700; font-size: 22px;
}
.ef-done-pill .ef-ck { background: var(--eco); border-color: var(--eco); color: #fff; }

/* ---------- KPI tile ---------- */
.ef-ktile { position: relative; background: var(--nevoa); border-radius: 18px; padding: 18px 22px 16px; overflow: hidden; transition: background .4s; }
.ef-ktile small { font-family: var(--f-head); font-weight: 700; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--cinza); }
.ef-ktile b { display: block; font-family: var(--f-head); font-weight: 800; font-size: var(--t-kpi); color: var(--tinta); margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.ef-ktile .ef-kst { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 500; color: var(--tinta); }
.ef-ktile .ef-kst .ef-dot { width: 9px; height: 9px; }
.ef-ktile.ef-status-warning { background: var(--warn-soft); }

/* ---------- Passos de incidente (alert → active → done) ---------- */
.ef-inc-step { padding: 12px 14px; border-radius: var(--r-sm); background: var(--nevoa); font-family: var(--f-head); font-weight: 700; font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--cinza); display: flex; align-items: center; gap: 8px; min-height: 52px; transition: background var(--dur-base), color var(--dur-base); }
.ef-inc-step .ef-ico { width: 18px; height: 18px; }
.ef-inc-step[data-state="alert"]  { background: var(--warn-soft); color: var(--warn-text); }
.ef-inc-step[data-state="active"] { background: var(--info-soft); color: var(--oceano); }
.ef-inc-step[data-state="done"]   { background: var(--ok-soft);   color: var(--ok-text); }

/* ---------- Cartão de chamada (senha) ---------- */
.ef-callcard { display: flex; align-items: center; gap: 18px; background: var(--fila); color: #fff; border-radius: var(--r-sm); padding: 16px 20px; }
.ef-callcard b { font-family: var(--f-head); font-weight: 800; font-size: 40px; line-height: 1; }
.ef-callcard small { display: block; font-size: 11px; letter-spacing: .14em; font-weight: 600; opacity: .75; text-transform: uppercase; }
.ef-callcard span { font-size: 17px; font-weight: 600; }

/* ---------- Alerta ---------- */
.ef-alert-chip { display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px 12px 12px; border-radius: 14px; background: #fff; border: 1px solid rgba(214, 146, 28, .45); box-shadow: var(--shadow-md); font-size: 18px; font-weight: 600; color: var(--tinta); }
.ef-alert-chip .ef-ai { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); }
.ef-alert-chip .ef-ai .ef-ico { width: 22px; height: 22px; }

/* ---------- Hub (símbolo com anel gradiente) ---------- */
.ef-hub { position: relative; width: 190px; height: 190px; }
.ef-hub-core { position: absolute; inset: 0; border-radius: 50%; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: grid; place-items: center; }
.ef-hub-core img { width: 55%; height: auto; }
.ef-hub-ring { position: absolute; inset: -10px; border-radius: 50%; border: 2px solid transparent; background: var(--brand-conic) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: ef-spin 14s linear infinite; }
.ef-hub-pulse { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(47, 126, 175, .35); animation: ef-hubPulse 3s ease-out infinite; }
.ef-hub-pulse.ef-p2 { animation-delay: 1.5s; }
@keyframes ef-hubPulse { from { transform: scale(1); opacity: .9; } to { transform: scale(1.75); opacity: 0; } }

/* ---------- Legenda ---------- */
.ef-caption {
  display: inline-block; padding: 12px 26px; border-radius: 10px;
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px);
  box-shadow: 0 2px 16px rgba(22, 33, 63, .08);
  font-weight: 500; font-size: var(--t-caption); line-height: 1.36; color: var(--tinta); text-align: center;
}

/* ---------- Marca de água ---------- */
.ef-watermark { position: absolute; opacity: .06; pointer-events: none; }
