/* Segla — Tour de treinamento (holofote). Carregado no App.razor. */
/* pointer-events:none → a cortina é só visual; o usuário PODE preencher o campo
   destacado (e qualquer campo) durante o tour. O coach-mark é clicável à parte. */
.sgtour-mask { position: fixed; inset: 0; z-index: 20000; display: none; background: transparent; pointer-events: none; }
.sgtour-mask.on { display: block; }

/* Recorte: o próprio box-shadow gigante escurece tudo, menos o campo */
.sgtour-spot {
  position: fixed; z-index: 20001; top: 0; left: 0; width: 0; height: 0; display: none;
  border-radius: 8px; border: 2px solid #6366f1;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.60);
  pointer-events: none;
  transition: top .18s ease, left .18s ease, width .18s ease, height .18s ease;
}

.sgtour-coach {
  position: fixed; z-index: 20002; display: none; width: 344px; max-width: 92vw;
  background: #ffffff; color: #1f2937; border-radius: 12px;
  box-shadow: 0 14px 44px rgba(2, 6, 23, 0.30); border: 1px solid #e5e7eb;
  padding: 14px 16px 15px; font-family: 'DM Sans', 'Segoe UI', Arial, sans-serif;
}
.sgtour-coach-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.sgtour-step { font-size: 11px; font-weight: 700; color: #6366f1; background: #eef2ff; border-radius: 20px; padding: 2px 9px; }
.sgtour-tipo { font-size: 10.5px; font-weight: 700; color: #0f766e; background: #ccfbf1; border-radius: 20px; padding: 2px 9px; }
.sgtour-req { font-size: 10.5px; font-weight: 700; color: #b91c1c; background: #fee2e2; border-radius: 20px; padding: 2px 8px; }
.sgtour-ro { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 700; color: #475569; background: #e2e8f0; border-radius: 20px; padding: 2px 9px; }
.sgtour-lock { font-size: 12px; line-height: 1; }
.sgtour-x { margin-left: auto; border: none; background: transparent; font-size: 20px; line-height: 1; color: #94a3b8; cursor: pointer; padding: 0 2px; }
.sgtour-x:hover { color: #475569; }
.sgtour-title { font-size: 15px; font-weight: 700; color: #0f172a; letter-spacing: -0.2px; margin-bottom: 8px; }
.sgtour-line { font-size: 13px; line-height: 1.55; color: #334155; margin-bottom: 6px; }
.sgtour-line b { color: #0f172a; font-weight: 600; }
.sgtour-why { color: #475569; }
.sgtour-nav { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
/* Botões no estilo limpo do PainelMedicoes: transparente + borda, hover suave,
   SEM outline padrão (o retângulo azul feio ao clicar) — anel só no foco por teclado. */
.sgtour-btn { font-size: 13px; font-weight: 600; border-radius: 7px; padding: 8px 15px; cursor: pointer;
  border: 1px solid #cbd5e1; background: transparent; color: #334155; outline: none;
  transition: background 140ms, color 140ms, border-color 140ms; }
.sgtour-btn:hover:not([disabled]) { background: #f1f5f9; }
.sgtour-btn:focus { outline: none; }
.sgtour-btn:focus-visible { box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.28); }
.sgtour-btn[disabled] { opacity: .45; cursor: default; }
.sgtour-btn--primary { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.sgtour-btn--primary:hover:not([disabled]) { background: #4338ca; border-color: #4338ca; }

/* ── Painel de HISTÓRICO de treinamento (lado direito) ───────────────────── */
.sgtreino-backdrop { position: fixed; inset: 0; z-index: 15000; background: rgba(2,6,23,0.28); animation: sgtreino-fade .3s ease both; }
.sgtreino-backdrop--closing { animation: sgtreino-fade-out 1.5s ease both; }
.sgtreino-panel {
  position: fixed; top: 16px; right: 16px; bottom: 16px; width: 420px; max-width: 94vw; z-index: 15001;
  background: #fff; box-shadow: -14px 0 44px rgba(2,6,23,0.22); display: flex; flex-direction: column;
  border-radius: 16px; overflow: hidden;
  font-family: 'DM Sans','Segoe UI',Arial,sans-serif; animation: sgtreino-slide 1.5s cubic-bezier(.22,.61,.36,1) both;
}
.sgtreino-panel--closing { animation: sgtreino-slide-out 1.5s cubic-bezier(.22,.61,.36,1) both; }
@keyframes sgtreino-slide     { from { transform: translateX(calc(100% + 24px)); opacity: .4; } to { transform: translateX(0); opacity: 1; } }
@keyframes sgtreino-slide-out { from { transform: translateX(0); opacity: 1; } to { transform: translateX(calc(100% + 24px)); opacity: .3; } }
@keyframes sgtreino-fade      { from { opacity: 0; } to { opacity: 1; } }
@keyframes sgtreino-fade-out  { from { opacity: 1; } to { opacity: 0; } }

.sgtreino-header { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border-bottom: 1px solid #eef2f7; }
.sgtreino-header-icon { font-size: 22px; color: #4f46e5; }
.sgtreino-header-text { flex: 1; min-width: 0; }
.sgtreino-header-title { font-size: 15px; font-weight: 700; color: #0f172a; }
.sgtreino-header-sub { font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgtreino-close { border: none; background: transparent; color: #94a3b8; cursor: pointer; font-size: 16px; padding: 4px; border-radius: 6px; }
.sgtreino-close:hover { background: #f1f5f9; color: #475569; }

.sgtreino-progress { padding: 16px 18px 14px; border-bottom: 1px solid #eef2f7; }
.sgtreino-pct { font-size: 30px; font-weight: 800; color: #4f46e5; line-height: 1; letter-spacing: -0.5px; }
.sgtreino-pct span { font-size: 16px; font-weight: 700; margin-left: 2px; }
.sgtreino-bar { height: 8px; background: #eef2f7; border-radius: 6px; overflow: hidden; margin: 10px 0 7px; }
.sgtreino-bar > i { display: block; height: 100%; background: linear-gradient(90deg,#6366f1,#4f46e5); border-radius: 6px; transition: width .3s ease; }
.sgtreino-count { font-size: 12px; color: #64748b; }

.sgtreino-body { flex: 1; overflow-y: auto; padding: 8px 10px; }
.sgtreino-item { display: flex; align-items: center; gap: 9px; padding: 8px 8px; border-radius: 8px; }
.sgtreino-item:hover { background: #f8fafc; }
.sgtreino-ic { font-size: 16px; color: #cbd5e1; flex-shrink: 0; }
.sgtreino-item--done .sgtreino-ic,
.sgtreino-item--done .sgtreino-ic::before { color: #16a34a; }
.sgtreino-num { font-size: 10.5px; font-weight: 700; color: #94a3b8; min-width: 20px; }
.sgtreino-label { flex: 1; min-width: 0; font-size: 13px; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgtreino-item--done .sgtreino-label { color: #0f172a; font-weight: 500; }
.sgtreino-tipo { font-size: 9.5px; font-weight: 700; color: #0f766e; background: #ccfbf1; border-radius: 20px; padding: 2px 8px; flex-shrink: 0; }
.sgtreino-ro { font-size: 13px; color: #94a3b8; flex-shrink: 0; }

.sgtreino-footer { display: flex; gap: 9px; padding: 14px 18px; border-top: 1px solid #eef2f7; }
.sgtreino-btn { flex: 1; font-size: 13px; font-weight: 600; border-radius: 8px; padding: 9px 14px; cursor: pointer;
  border: 1px solid #cbd5e1; background: transparent; color: #334155; outline: none; transition: background 140ms, color 140ms, border-color 140ms; }
.sgtreino-btn:hover { background: #f1f5f9; }
.sgtreino-btn:focus-visible { box-shadow: 0 0 0 3px rgba(79,70,229,0.28); }
.sgtreino-btn--primary { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.sgtreino-btn--primary:hover { background: #4338ca; border-color: #4338ca; }
