/* ==========================================================================
   MIX — Gestão de Risco | estilos base
   ========================================================================== */

:root {
  color-scheme: dark;
}

html, body {
  min-height: 100%;
}

body {
  background-color: #05070a;
  background-image:
    radial-gradient(60rem 30rem at 15% -10%, rgba(28, 174, 107, 0.16), transparent 60%),
    radial-gradient(50rem 26rem at 110% 10%, rgba(63, 202, 135, 0.10), transparent 60%),
    linear-gradient(180deg, #05070a 0%, #070a0f 40%, #05070a 100%);
}

/* grid técnico sutil de fundo */
.bg-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 85%);
}

/* cartão "glass" */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(14px);
}

.glass-strong {
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(18px);
}

/* linha de destaque no topo dos cards */
.top-glow::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(63,202,135,0.7), transparent);
}

/* scrollbar customizada */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1cae6b, #128d57);
  border-radius: 8px;
  border: 2px solid #05070a;
}
::-webkit-scrollbar-thumb:hover { background: #3fca87; }

/* range slider customizado */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #1cae6b var(--fill, 50%), rgba(255,255,255,0.09) var(--fill, 50%));
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eefcf5;
  border: 3px solid #1cae6b;
  box-shadow: 0 0 0 4px rgba(28,174,107,0.25);
  cursor: pointer;
  transition: transform .15s ease;
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.12); }
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #eefcf5; border: 3px solid #1cae6b;
  box-shadow: 0 0 0 4px rgba(28,174,107,0.25);
  cursor: pointer;
}
input[type="range"]::-moz-range-track {
  height: 6px; border-radius: 999px; background: rgba(255,255,255,0.09);
}

/* toggle switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.12);
  transition: background .2s ease;
}
.switch .thumb {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: #cbd5e1; transition: transform .2s ease, background .2s ease;
}
.switch input:checked + .track { background: rgba(28,174,107,0.9); border-color: rgba(63,202,135,0.6); }
.switch input:checked + .track .thumb { transform: translateX(20px); background: #eefcf5; }

/* status dot pulsante */
.dot-live {
  position: relative;
  width: 9px; height: 9px; border-radius: 50%;
  background: #3fca87;
  box-shadow: 0 0 0 0 rgba(63,202,135,0.6);
  animation: dotPulse 1.8s infinite;
}
@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(63,202,135,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(63,202,135,0); }
  100% { box-shadow: 0 0 0 0 rgba(63,202,135,0); }
}

/* numeros monoespaçados de painel */
.tabular { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* fade-up utilitário para entrada dos cards */
.reveal { opacity: 0; transform: translateY(14px); animation: revealIn .6s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes revealIn { to { opacity: 1; transform: translateY(0); } }

/* tooltip simples */
[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f141d;
  border: 1px solid rgba(255,255,255,0.12);
  color: #e2e8f0;
  font-size: 12px;
  line-height: 1.4;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 50;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.6);
}

/* botão copiar - feedback */
.copied-flash { animation: copyFlash .9s ease; }
@keyframes copyFlash {
  0% { background-color: rgba(63,202,135,0.35); }
  100% { background-color: transparent; }
}

/* barras de progressão do martingale */
.step-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}
.step-bar > span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg,#128d57,#3fca87);
  transition: width .5s cubic-bezier(.2,.8,.2,1);
}

/* tabs */
.tab-btn { transition: all .2s ease; }
.tab-btn[aria-selected="true"] {
  color: #eefcf5;
  background: linear-gradient(180deg, rgba(28,174,107,0.22), rgba(28,174,107,0.06));
  border-color: rgba(63,202,135,0.45);
}

@media (max-width: 640px) {
  .step-bar { height: 8px; }
}
