/* Globoplay Autoscale Profiler — dashboard elegante (shadow mode) */
:root {
  --bg: #0b1220;
  --bg-soft: #0f1830;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --ink: #0e1726;
  --ink-soft: #33405a;
  --muted: #7a879e;
  --line: #e6ebf3;
  --line-strong: #d2dae7;
  --brand: #2f6df0;
  --brand-2: #ff7a1a;
  --ok: #12b76a;
  --warn: #f79009;
  --danger: #f04438;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 8px 24px rgba(16,24,40,.06);
  --shadow-lg: 0 12px 40px rgba(16,24,40,.12);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --accent: var(--brand);        /* muda por perfil */
  --accent-2: var(--brand-2);
  --accent-soft: rgba(47,109,240,.10);
}
body[data-profile="brazil"] {
  --accent: #00a86b;
  --accent-2: #ffcb05;
  --accent-soft: rgba(0,168,107,.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
a { color: var(--accent); text-decoration: none; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.brand .dot {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 14px var(--accent-soft);
  transition: background .5s ease;
}
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.header-spacer { flex: 1; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 7px 12px; border-radius: 8px; color: var(--ink-soft);
  font-size: 13.5px; font-weight: 500; transition: background .2s, color .2s;
}
.nav-links a:hover { background: var(--surface-2); color: var(--ink); }

/* ---------- Segmented profile toggle ---------- */
.segmented {
  display: inline-flex; padding: 4px; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px;
}
.segmented button {
  border: 0; cursor: pointer; font-family: var(--font);
  padding: 7px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); background: transparent; transition: all .25s ease;
  display: inline-flex; align-items: center; gap: 7px;
}
.segmented button .ico { font-size: 15px; }
.segmented button[aria-pressed="true"] {
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
}
.segmented button[data-p="football"][aria-pressed="true"] { color: var(--brand); }
.segmented button[data-p="brazil"][aria-pressed="true"] { color: #00875a; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #eaf0fb;
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(47,109,240,.35), transparent 60%),
    radial-gradient(900px 500px at 10% 120%, rgba(255,122,26,.22), transparent 55%),
    linear-gradient(180deg, #0b1220, #0f1830);
  padding: clamp(48px, 8vw, 96px) clamp(16px, 4vw, 48px) clamp(60px, 8vw, 110px);
}
body[data-profile="brazil"] .hero {
  background:
    radial-gradient(1100px 500px at 80% -10%, rgba(0,168,107,.35), transparent 60%),
    radial-gradient(900px 500px at 10% 120%, rgba(255,203,5,.20), transparent 55%),
    linear-gradient(180deg, #071a13, #0a1f18);
}
.hero .wrap { max-width: 1180px; margin: 0 auto; }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #d7e2f5;
}
.badge.live { background: rgba(18,183,106,.16); border-color: rgba(18,183,106,.4); color: #7ff0b6; }
.badge .pulse { width: 8px; height: 8px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 0 rgba(18,183,106,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(18,183,106,.5)} 70%{box-shadow:0 0 0 8px rgba(18,183,106,0)} 100%{box-shadow:0 0 0 0 rgba(18,183,106,0)} }
.hero h1 { font-size: clamp(30px, 5vw, 52px); font-weight: 800; max-width: 18ch; }
.hero h1 .accent { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin-top: 20px; max-width: 62ch; font-size: clamp(15px, 2vw, 18px); color: #b9c6df; }
.hero .cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  padding: 11px 18px; border-radius: 11px; border: 1px solid transparent; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 10px 26px var(--accent-soft); }
.btn-ghost { background: rgba(255,255,255,.06); color: #eaf0fb; border-color: rgba(255,255,255,.16); }

/* ---------- Layout ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 80px; }
.section { margin-top: clamp(44px, 6vw, 72px); }
.section-head { margin-bottom: 22px; }
.section-head .eyebrow { color: var(--accent); font-weight: 700; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(22px, 3vw, 30px); margin-top: 6px; }
.section-head p { color: var(--ink-soft); max-width: 76ch; margin-top: 10px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: clamp(18px, 2.4vw, 28px); }

/* KPI grid */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-top: -50px; position: relative; z-index: 5; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 20px; }
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; display: flex; align-items: center; gap: 7px; }
.kpi .value { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; margin-top: 10px; letter-spacing: -0.03em; }
.kpi .sub { color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
.kpi .value.accent { color: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.chip.high { background: rgba(18,183,106,.12); color: #087443; }
.chip.mid { background: rgba(247,144,9,.14); color: #b54708; }
.chip.low { background: rgba(240,68,56,.12); color: #b42318; }

/* Chart holders */
.chart-wrap { position: relative; width: 100%; }
.chart-wrap.tall { height: 380px; }
.chart-wrap.mid { height: 340px; }
.legend-inline { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; color: var(--ink-soft); font-size: 13px; }
.legend-inline span { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.swatch.dot { width: 10px; height: 10px; border-radius: 50%; }

/* Spotlight: observadas vs recomendadas */
.spotlight {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: clamp(12px, 3vw, 34px);
  padding: clamp(20px, 3vw, 30px) clamp(20px, 4vw, 40px); margin-bottom: 20px;
  background: linear-gradient(120deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.spot { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.spot-label { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.spot-num { font-size: clamp(34px, 5.2vw, 54px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
.spot-sub { font-size: 12.5px; color: var(--muted); }
.spot.obs .spot-num { color: #667085; }
.spot.rec .spot-num { color: var(--accent); }
.spot.delta .spot-num { color: var(--accent-2); }
.spot-arrow { font-size: 30px; color: var(--line-strong); font-weight: 700; }
.spot-div { width: 1px; align-self: stretch; background: var(--line); }
@media (max-width: 820px) {
  .spotlight { grid-template-columns: 1fr 1fr; gap: 18px; }
  .spot-arrow, .spot-div { display: none; }
}

/* Highlight obs/rec columns */
table.data th.col-rec, table.data td.col-rec { background: var(--accent-soft); }
table.data td.col-rec { font-weight: 800; color: var(--accent); font-size: 15px; }
table.data td.col-obs { font-weight: 700; color: #475467; }
.delta-up { color: #087443; font-weight: 700; }
.delta-flat { color: var(--muted); font-weight: 600; }

/* Two column */
.grid-2 { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* Table */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { padding: 11px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; position: sticky; top: 0; background: var(--surface); }
table.data td:first-child, table.data th:first-child { text-align: left; }
table.data tbody tr:hover, table.data tr:hover td { background: var(--surface-2); }
.svc-name { font-weight: 600; color: var(--ink); }
.bar-cell { display: flex; align-items: center; gap: 9px; justify-content: flex-end; }
.minibar { height: 8px; border-radius: 4px; background: var(--accent); opacity: .85; }
.minibar.track { background: var(--line); flex: 0 0 90px; overflow: hidden; }
.headroom-badge { font-weight: 700; padding: 3px 9px; border-radius: 8px; font-size: 12.5px; }

/* Controls */
.control-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
select.picker {
  font-family: var(--font); font-size: 14px; font-weight: 600; color: var(--ink);
  padding: 9px 36px 9px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface);
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a879e' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}

/* Plan timeline */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--line-strong); }
.tl-item { position: relative; padding: 10px 0; display: grid; grid-template-columns: 88px 1fr auto; gap: 14px; align-items: center; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 50%; transform: translateY(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.tl-item.up::before { border-color: var(--ok); }
.tl-item.down::before { border-color: var(--muted); }
.tl-item.initial::before { border-color: var(--accent-2); }
.tl-min { font-weight: 800; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.tl-min small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.tl-dir { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 7px; }
.dir-up { background: rgba(18,183,106,.13); color: #087443; }
.dir-down { background: var(--surface-2); color: var(--muted); }
.dir-initial { background: var(--accent-soft); color: var(--accent); }

/* Explain cards */
.explain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.explain { padding: 22px; }
.explain .icn { width: 40px; height: 40px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 20px; margin-bottom: 14px; }
.explain h3 { font-size: 16px; }
.explain p { color: var(--ink-soft); font-size: 14px; margin-top: 8px; }
.formula { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; background: var(--bg); color: #d7e2f5; padding: 16px 18px; border-radius: 12px; overflow-x: auto; line-height: 1.7; }
.formula .k { color: #ffab5e; } .formula .v { color: #7fd1ff; } .formula .c { color: #7a879e; }

/* Callout */
.callout { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: linear-gradient(0deg, var(--surface), var(--surface)); box-shadow: var(--shadow); }
.callout .icn { font-size: 22px; flex: 0 0 auto; }
.callout.tip { border-left: 4px solid var(--accent); }
.callout h3 { font-size: 15px; } .callout p { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }

/* Events */
.events-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.event-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.event-card .when { color: var(--accent); font-weight: 700; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.event-card .ttl { font-weight: 600; font-size: 14px; margin-top: 4px; }
.event-card .sig { color: var(--muted); font-size: 12px; margin-top: 6px; font-family: ui-monospace, monospace; }

/* Footer */
footer { border-top: 1px solid var(--line); margin-top: 70px; padding: 32px clamp(16px,4vw,48px); color: var(--muted); font-size: 13px; }
footer .wrap { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }

.fade { animation: fade .45s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .nav-links { display: none; } .kpis { margin-top: -30px; } }
