/* style.css — LIGHT VIBRANT (substitui o seu atual) */
.value-flat{ color:#0b1f33; font-weight:1000; }

:root{
  /* Base clara */
  --bg0: #eef6ff;
  --bg1: #f7fbff;

  /* Cards e superfícies */
  --card: rgba(255,255,255,0.92);
  --card2: rgba(255,255,255,0.98);

  --border: rgba(30, 80, 160, 0.14);
  --border2: rgba(30, 80, 160, 0.22);

  /* Texto */
  --text: #0b1f33;
  --muted: #4b6a86;

  /* Acentos */
  --accent:  #2f80ff;
  --accent2: #22d3ee;
  --accent3: #34d399;

  /* Alertas */
  --good: #16a34a;
  --bad:  #ef4444;
  --warn: #f59e0b;

  --shadow: 0 18px 45px rgba(13, 45, 90, .12);
  --shadow2: 0 10px 24px rgba(13, 45, 90, .10);

  --radius: 18px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--text);

  /* Fundo CLARO e vivo */
  background:
    radial-gradient(1200px 700px at 10% 0%, rgba(47,128,255,.18), transparent 55%),
    radial-gradient(900px 600px at 90% 0%, rgba(34,211,238,.16), transparent 55%),
    radial-gradient(900px 600px at 50% 105%, rgba(52,211,153,.12), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

a{ color: inherit; text-decoration:none; }
a:hover{ text-decoration:none; }

.container{
  max-width: 1280px;
  margin: 26px auto;
  padding: 0 18px 28px;
}

/* HEADER */
.header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.brand{ display:flex; flex-direction:column; gap:6px; }
.brand h1{
  margin:0;
  font-size: 22px;
  letter-spacing: .2px;
  color: #06213f;
}
.brand p{
  margin:0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

/* BADGE */
.badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 12px;
  border:1px solid rgba(47,128,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  box-shadow: 0 10px 22px rgba(13,45,90,.10);
  color: #0b2a55;
  font-size: 12px;
  white-space: nowrap;
  font-weight: 800;
}

/* GRID */
.grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
  margin-bottom: 14px;
}
@media (max-width: 980px){ .grid{ grid-template-columns: 1fr; } }

/* CARD */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.card .card-head{
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(30,80,160,0.10);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.card .card-title{
  font-weight: 900;
  letter-spacing:.2px;
  color:#06213f;
}

.card .card-sub{
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

/* CONTROLS */
.controls{
  padding: 12px 14px 14px;
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  align-items:center;
}

/* INPUTS */
.input, .select, .btn{
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(47,128,255,.18);
  background: rgba(255,255,255,.92);
  color: var(--text);
  padding: 0 12px;
  outline:none;
  transition: transform .10s ease, border-color .15s ease, box-shadow .15s ease, filter .15s ease;
}

.input{ flex: 1; min-width: 240px; }
.select{ min-width: 190px; }

.input:focus, .select:focus{
  border-color: rgba(47,128,255,.55);
  box-shadow: 0 0 0 4px rgba(47,128,255,.12);
}

/* BUTTONS */
.btn{
  cursor:pointer;
  font-weight: 900;
  letter-spacing: .2px;
  user-select:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 0 14px;
  white-space: nowrap;
}

.btn:hover{ filter: brightness(1.03); box-shadow: var(--shadow2); }
.btn:active{ transform: translateY(1px); }

/* PRIMARY (bem vivo) */
.btn-primary{
  border: none;
  color: #ffffff;
  background: linear-gradient(135deg, #2f80ff, #22d3ee);
  box-shadow: 0 14px 22px rgba(47,128,255,.22);
}
.btn-primary:hover{
  background: linear-gradient(135deg, #3b8bff, #34d399);
}

/* GHOST */
.btn-ghost{
  background: rgba(47,128,255,.08);
  border: 1px solid rgba(47,128,255,.18);
  color:#0b2a55;
}

/* CTA */
.cta-wrap{ padding: 12px 14px 14px; display:grid; gap: 10px; }
.cta-compact{ padding-top: 10px; }

.btn-cta{
  height: 56px;
  border-radius: 16px;
  border: 1px solid rgba(47,128,255,.18);
  background:
    radial-gradient(900px 220px at 15% 0%, rgba(34,211,238,.22), transparent 60%),
    linear-gradient(135deg, rgba(47,128,255,.16), rgba(34,211,238,.12));
  box-shadow: 0 16px 26px rgba(13,45,90,.12);
  font-size: 13px;

  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  padding: 10px 14px;
  gap: 4px;
  color:#06213f;
}

.btn-cta:hover{
  transform: translateY(-1px);
  box-shadow: 0 20px 30px rgba(13,45,90,.14);
  border-color: rgba(47,128,255,.30);
}

.btn-cta small{
  display:block;
  font-weight: 800;
  color: rgba(11,31,51,.72);
}

/* Flow: premium */
.btn-cta-strong{
  border-color: rgba(52,211,153,.28);
  background:
    radial-gradient(900px 260px at 18% 0%, rgba(52,211,153,.20), transparent 62%),
    linear-gradient(135deg, rgba(52,211,153,.18), rgba(47,128,255,.16), rgba(34,211,238,.12));
}

/* Separador */
.cta-sep{
  height: 1px;
  width: 100%;
  background: rgba(30,80,160,0.14);
  margin: 10px 0 6px;
  border-radius: 999px;
}

/* MUTED CTA */
.btn-cta-muted{
  background: rgba(47,128,255,.07);
  border-color: rgba(47,128,255,.14);
  opacity: .95;
}

/* TOAST */
.toast{
  padding: 10px 14px;
  color: #0b2a55;
  font-size: 12px;
}

/* TABLE */
.table-wrap{ overflow:auto; }

table{
  width:100%;
  border-collapse: separate;
  border-spacing:0;
  min-width: 980px;
  background: rgba(255,255,255,.92);
}

thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  text-align:left;
  font-size: 12px;
  color: #06213f;
  font-weight: 900;
  letter-spacing: .35px;

  background:
    linear-gradient(180deg, rgba(47,128,255,.12), rgba(34,211,238,.08));
  border-bottom: 1px solid rgba(30,80,160,0.12);
  padding: 12px 12px;
}

tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(30,80,160,0.08);
  vertical-align: top;
  font-size: 13px;
  color: #0b1f33;
}

tbody tr:nth-child(odd){ background: rgba(47,128,255,0.03); }
tbody tr:hover{ background: rgba(34,211,238,0.08); }

/* PILL */
.pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(47,128,255,.18);
  background: rgba(47,128,255,.08);
  color: #0b2a55;
  font-size: 12px;
  white-space: nowrap;
  font-weight: 800;
}

.event{
  font-weight: 900;
  letter-spacing: .2px;
  line-height: 1.25;
  color:#06213f;
}
.event-sub{
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.right{ text-align:right; }
.muted{ color: var(--muted); }

/* STARS — coloridas por nível
   (usa data-imp no span via JS? não tem.
   então aqui colorimos por “tamanho” usando classes de linhas abaixo) */
.stars{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: 1px;
  font-weight: 900;
}

/* Para a gente conseguir pintar por nível sem mexer no JS,
   usamos :has() se o browser suportar (Chrome moderno sim).
   Se não suportar, vai ficar dourado padrão. */
td:has(.stars:contains("★★★")) .stars { color: var(--bad); }
td:has(.stars:contains("★★")) .stars  { color: var(--warn); }
td:has(.stars:contains("★")) .stars   { color: var(--good); }

/* Fallback geral */
.stars{ color: #f59e0b; }

/* valores */
.value-pos{ color: var(--good); font-weight: 900; }
.value-neg{ color: var(--bad); font-weight: 900; }

.footer{
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.error{
  color: #b91c1c;
  padding: 12px 14px;
}

/* =========================================================
   BLOCO IA (caso você use na analisar_us.php)
   ========================================================= */
.ai-box{
  border: 1px solid rgba(47,128,255,.16);
  background: rgba(255,255,255,.92);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.ai-section-title{
  margin: 14px 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(34,211,238,.22), rgba(47,128,255,.18));
  border-left: 6px solid rgba(47,128,255,.55);
  font-weight: 900;
  letter-spacing: .2px;
  color:#06213f;
}

.ai-p{ margin: 10px 0; line-height: 1.65; color:#0b1f33; }
.ai-list{ margin: 8px 0 12px 18px; padding: 0; }
.ai-list li{ margin: 6px 0; line-height: 1.6; color:#0b1f33; }

.meta-row{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.meta-chip{
  display:flex;
  gap:8px;
  align-items:center;
  padding:8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(47,128,255,.18);
  background: rgba(47,128,255,.08);
  color:#0b2a55;
  font-weight: 800;
}

/* tonalidade do 1º título */
.ai-tone-bullish .ai-section-title:first-of-type{
  border-left-color: rgba(22,163,74,.8);
  background: linear-gradient(90deg, rgba(52,211,153,.22), rgba(47,128,255,.12));
}
.ai-tone-bearish .ai-section-title:first-of-type{
  border-left-color: rgba(239,68,68,.85);
  background: linear-gradient(90deg, rgba(239,68,68,.16), rgba(47,128,255,.10));
}
.ai-tone-neutral .ai-section-title:first-of-type{
  border-left-color: rgba(75,106,134,.55);
  background: linear-gradient(90deg, rgba(75,106,134,.14), rgba(47,128,255,.10));
}
