/* Admin + Onboarding — tokens MIV / site Upya (banda light) */
:root {
  --bg: #f3f5ef;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: rgba(20, 25, 20, 0.1);
  --border-strong: rgba(20, 25, 20, 0.2);
  --text: #141914;
  --text-muted: #5a6354;
  --green: #7aab1a;
  --green-bright: #9acd32;
  --green-dim: rgba(122, 171, 26, 0.12);
  --on-green: #ffffff;
  --ink: #141914;
  --sidebar: #141914;
  --sidebar-text: #f5f5f5;
  --danger: #b91c1c;
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --max-width: 1120px;
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

.adm-shell { display: flex; min-height: 100vh; }
.adm-sidebar {
  width: 240px;
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 1.25rem 1rem;
  flex-shrink: 0;
  transition: width .2s ease, padding .2s ease;
}
.adm-sidebar .brand {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1.5rem; font-weight: 700; color: #fff;
}
.adm-sidebar .brand img { height: 36px; width: auto; flex-shrink: 0; border-radius: 8px; }
.adm-sidebar .brand .adm-brand-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-sidebar nav a {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: rgba(255,255,255,.78);
  padding: .55rem .75rem;
  border-radius: var(--radius-sm);
  margin-bottom: .25rem;
  text-decoration: none;
  position: relative;
}
.adm-sidebar nav a:hover,
.adm-sidebar nav a.is-active {
  background: rgba(154,205,50,.18);
  color: #fff;
  text-decoration: none;
}
.adm-nav-icon {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.adm-nav-icon-svg { width: 1.15rem; height: 1.15rem; display: block; }
.adm-nav-label { min-width: 0; }
.adm-nav-collapse {
  display: none;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.85);
  cursor: pointer;
  padding: 0;
}
.adm-nav-collapse:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.adm-nav-collapse .adm-nav-icon-svg {
  width: 1rem;
  height: 1rem;
  transition: transform .2s ease;
}
.adm-shell.is-nav-collapsed .adm-nav-collapse .adm-nav-icon-svg {
  transform: rotate(180deg);
}
.adm-sidebar-backdrop,
.adm-menu-toggle,
.adm-nav-close { display: none; }
.adm-main { flex: 1; padding: 1.5rem 1.75rem; max-width: 100%; min-width: 0; }
.adm-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1.25rem; gap: 1rem; flex-wrap: wrap;
}
.adm-top-start {
  display: flex; align-items: center; gap: .75rem; min-width: 0;
}
.adm-top h1 { margin: 0; font-size: 1.5rem; }
.adm-top-user { min-width: 0; }

@media (min-width: 801px) {
  .adm-nav-collapse { display: inline-flex; }

  .adm-shell.is-nav-collapsed .adm-sidebar {
    width: 76px;
    padding-left: .7rem;
    padding-right: .7rem;
  }
  .adm-shell.is-nav-collapsed .adm-brand-text,
  .adm-shell.is-nav-collapsed .adm-company-label,
  .adm-shell.is-nav-collapsed .adm-nav-label {
    display: none;
  }
  .adm-shell.is-nav-collapsed .adm-sidebar .brand {
    flex-direction: column;
    gap: .55rem;
    margin-bottom: 1rem;
  }
  .adm-shell.is-nav-collapsed .adm-sidebar nav a {
    justify-content: center;
    padding: .7rem .5rem;
  }
  .adm-shell.is-nav-collapsed .adm-sidebar nav a .nav-badge {
    position: absolute;
    top: .2rem;
    right: .15rem;
    margin: 0;
  }
}


.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem;
  border: none; cursor: pointer;
  background: var(--green); color: var(--on-green);
  padding: .65rem 1.15rem;
  border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; color: #fff; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn-secondary:hover { color: var(--text); }
.btn-danger { background: var(--danger); }
.btn-sm { padding: .4rem .85rem; font-size: .85rem; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left; padding: .7rem .5rem;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }

label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .9rem; }
.help { color: var(--text-muted); font-size: .85rem; margin: .25rem 0 .5rem; }
.form-row { margin-bottom: 1rem; }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%;
  padding: .7rem .85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  color: var(--text);
}
.password-field {
  position: relative;
  display: block;
}
.password-field input {
  padding-right: 2.75rem;
}
.password-toggle {
  position: absolute;
  right: .35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
}
.password-toggle:hover {
  color: var(--text);
  background: rgba(20, 25, 20, 0.06);
}
.password-toggle.is-visible {
  color: var(--green);
}
textarea { min-height: 100px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

/* Mobile: menu suspenso (drawer) + grids/cards/tabelas */
@media (max-width: 800px) {
  .adm-shell { position: relative; }

  .adm-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex-shrink: 0;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    color: var(--text);
    cursor: pointer;
    padding: 0;
  }
  .adm-menu-toggle-bars,
  .adm-menu-toggle-bars::before,
  .adm-menu-toggle-bars::after {
    display: block;
    width: 1.1rem;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    position: relative;
  }
  .adm-menu-toggle-bars::before,
  .adm-menu-toggle-bars::after {
    content: '';
    position: absolute;
    left: 0;
  }
  .adm-menu-toggle-bars::before { top: -.35rem; }
  .adm-menu-toggle-bars::after { top: .35rem; }

  .adm-nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-left: auto;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
  }

  .adm-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(20, 25, 20, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
  }

  .adm-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    z-index: 999;
    transform: translateX(-105%);
    transition: transform .22s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: none;
  }

  .adm-shell.is-nav-open .adm-sidebar {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0,0,0,.28);
  }
  .adm-shell.is-nav-open .adm-sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .adm-shell.is-nav-open {
    overflow: hidden;
  }
  body.adm-nav-lock {
    overflow: hidden;
    touch-action: none;
  }

  .adm-main { padding: 1rem; }
  .adm-top {
    flex-wrap: nowrap;
    gap: .75rem;
    margin-bottom: 1rem;
  }
  .adm-top h1 { font-size: 1.25rem; }
  .adm-top-user {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .9rem;
  }

  .card {
    padding: 1rem;
  }
  .card:has(table.table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .grid-2,
  .grid-3 { grid-template-columns: 1fr; }
  .actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .actions .btn { width: 100%; }

  .dash-kpis { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .dash-charts { grid-template-columns: 1fr; gap: .75rem; }
  .dash-chart-card--wide { grid-column: auto; }
  .dash-chart-body--donut { height: 200px; }
  .dash-chart-body--donut-sm { height: 160px; max-width: 220px; }
  .dash-chart-body--bar { height: 240px; }
  .dash-chart-body--funnel { height: 280px; }
  .dash-kpi { padding: .85rem 1rem; }
  .dash-kpi-value { font-size: 1.5rem; }
  .dash-chart-head p { font-size: .85rem; }
  .dash-footnote code {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .table {
    min-width: 560px;
  }
  .table th, .table td {
    padding: .6rem .4rem;
    font-size: .9rem;
  }

  .ranking-subnav {
    gap: .4rem;
    margin-bottom: 1rem;
  }
  .ranking-subnav a {
    padding: .35rem .7rem;
    font-size: .85rem;
  }
}

.flash { padding: .75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.flash-ok { background: var(--green-dim); color: #3f6212; }
.flash-err { background: #fee2e2; color: #991b1b; }
.badge {
  display: inline-block; padding: .15rem .55rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600; background: var(--green-dim); color: #3f6212;
}
.badge-muted { background: rgba(90,99,84,.12); color: var(--text-muted); }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-done { background: #dcfce7; color: #166534; }

.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 1.5rem;
  background: linear-gradient(160deg, #f3f5ef 0%, #e8eedc 50%, #f3f5ef 100%);
}
.login-card { width: min(420px, 100%); }

/* Onboarding público */
.onb-hero {
  padding: 2rem 1.25rem 1rem;
  text-align: center;
}
.onb-hero img { height: 36px; margin-bottom: 1rem; }
.onb-hero h1 { margin: 0 0 .5rem; font-size: clamp(1.5rem, 4vw, 2rem); }
.onb-hero p { margin: 0 auto; max-width: 36rem; color: var(--text-muted); }
.onb-wrap { max-width: 640px; margin: 0 auto; padding: 0 1.25rem 3rem; }
.progress {
  height: 6px; background: rgba(20,25,20,.08); border-radius: 999px; overflow: hidden; margin: 1.25rem 0;
}
.progress > span { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.25rem; }
.muted { color: var(--text-muted); }
.error-field { color: var(--danger); font-size: .85rem; margin-top: .25rem; }

.ranking-subnav {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: 1.25rem;
}
.ranking-subnav a {
  display: inline-block;
  padding: .4rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--text);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
}
.ranking-subnav a:hover { text-decoration: none; background: var(--green-dim); }
.ranking-subnav a.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.ranking-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 800px) {
  .ranking-podium { grid-template-columns: 1fr; }
}
.ranking-podium .podium-card {
  text-align: center;
  padding: 1.25rem 1rem;
}
.ranking-podium .podium-place {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .35rem;
}
.ranking-podium .podium-card.is-first { border-color: rgba(122,171,26,.45); background: var(--green-dim); }
.pct-bar {
  height: 8px; background: rgba(20,25,20,.08); border-radius: 999px; overflow: hidden; min-width: 80px;
}
.pct-bar > span { display: block; height: 100%; background: var(--green); border-radius: 999px; }

/* —— Game UI (app + gestão) —— */
.game-place-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .02em;
  background: var(--green-dim, rgba(122, 171, 26, 0.12));
  color: var(--green, #4d7010);
  border: 1px solid rgba(122, 171, 26, 0.35);
  white-space: nowrap;
}
.game-place-badge.is-gold {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(154, 205, 50, 0.2));
  border-color: rgba(251, 191, 36, 0.55);
  color: #a16207;
}
.game-place-badge.is-silver {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.4);
  color: #64748b;
}
.game-place-badge.is-bronze {
  background: rgba(217, 119, 6, 0.15);
  border-color: rgba(217, 119, 6, 0.4);
  color: #b45309;
}
.game-meta {
  margin-top: .65rem;
}
.game-meta-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .35rem;
}
.game-meta-top strong {
  color: var(--green, #4d7010);
  font-size: .95rem;
}
.game-mission-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm, 10px);
  border: 1px solid rgba(122, 171, 26, 0.28);
  background: var(--green-dim, rgba(122, 171, 26, 0.08));
}
.game-mission-card .game-mission-tag {
  display: block;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green, #4d7010);
  margin-bottom: .25rem;
}
.game-mission-card strong {
  display: block;
  font-size: .95rem;
  color: var(--text);
  line-height: 1.3;
}
.game-mission-pts {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--green, #4d7010);
  white-space: nowrap;
}
.game-minirank {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin-top: .75rem;
}
.game-minirank-row {
  display: grid;
  grid-template-columns: 1.75rem 1fr auto;
  gap: .5rem;
  align-items: center;
  padding: .45rem .6rem;
  border-radius: 8px;
  font-size: .88rem;
  background: rgba(20, 25, 20, 0.03);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.game-minirank-row.is-you {
  background: var(--green-dim, rgba(122, 171, 26, 0.12));
  border-color: rgba(122, 171, 26, 0.35);
  color: var(--text);
  font-weight: 600;
}
.table tr.is-you td {
  background: rgba(122, 171, 26, 0.1);
}
.table tr.is-you td:first-child {
  box-shadow: inset 3px 0 0 var(--green, #6f9b1e);
}
.game-minirank-row.is-gold {
  background: linear-gradient(90deg, rgba(251, 191, 36, 0.12), transparent);
  border-color: rgba(251, 191, 36, 0.35);
  color: var(--text);
  font-weight: 700;
}
.game-minirank-row .gm-place {
  font-weight: 800;
  color: var(--green, #4d7010);
}
.game-streak {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.35);
  color: #b45309;
}
.game-pts-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .1rem;
  padding: .65rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(122, 171, 26, 0.35);
  background: var(--green-dim, rgba(122, 171, 26, 0.12));
}
.game-pts-chip strong {
  font-size: 1.15rem;
  color: var(--green, #4d7010);
}
.podium-card .game-meta { text-align: left; margin-top: .75rem; }
.table .game-place-badge { font-size: .68rem; }

/* —— Game UI onda 1: hero, quest, chest, motion —— */
@keyframes game-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes game-pop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes game-fill {
  from { width: 0; }
  to { width: var(--p, 100%); }
}
@keyframes game-live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
  50% { opacity: 0.85; box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}
@keyframes game-flash-up {
  0% { box-shadow: 0 0 0 0 rgba(154, 205, 50, 0.55); }
  100% { box-shadow: 0 0 0 18px rgba(154, 205, 50, 0); }
}

.pct-bar > span.game-fill-anim {
  width: 0;
  animation: game-fill 0.85s ease-out forwards;
}

.ranking-podium .podium-card {
  animation: game-rise 0.5s ease-out both;
}
.ranking-podium .podium-card.is-second { animation-delay: 0.05s; }
.ranking-podium .podium-card.is-first { animation-delay: 0.12s; }
.ranking-podium .podium-card.is-third { animation-delay: 0.18s; }
.ranking-podium .podium-card.is-first {
  position: relative;
}
.ranking-podium .podium-card.is-first::after {
  content: "★";
  position: absolute;
  top: .65rem;
  right: .75rem;
  font-size: 1rem;
  color: #c49212;
  opacity: 0.85;
}

.game-hero {
  display: grid;
  grid-template-columns: auto 1.2fr 0.8fr;
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 1rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius, 14px);
  border: 1px solid rgba(122, 171, 26, 0.28);
  background:
    radial-gradient(ellipse 70% 80% at 0% 0%, rgba(154, 205, 50, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 60% at 100% 100%, rgba(251, 191, 36, 0.1), transparent 50%),
    var(--bg-card, #fff);
  animation: game-pop 0.45s ease-out both;
}
@media (max-width: 800px) {
  .game-hero { grid-template-columns: 1fr; }
}
.game-hero-art {
  width: 88px;
  height: 88px;
  align-self: center;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(122, 171, 26, 0.08);
  border: 1px solid rgba(122, 171, 26, 0.2);
  box-shadow: 0 10px 24px rgba(18, 28, 12, 0.08);
}
.game-hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-hero-kicker {
  margin: 0 0 .35rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.game-hero-name {
  margin: 0 0 .75rem;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text);
  line-height: 1.15;
}
.game-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  margin-bottom: .85rem;
}
.game-hero-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: .85rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(122, 171, 26, 0.22);
  background: rgba(122, 171, 26, 0.06);
}
.game-hero-side .game-pts-chip {
  align-self: flex-end;
  width: 100%;
  align-items: flex-start;
}
.game-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.game-quest {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem 1.2rem;
  margin-bottom: .85rem;
  border-radius: var(--radius-sm, 10px);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
  animation: game-rise 0.4s ease-out both;
}
.game-quest:hover {
  border-color: rgba(122, 171, 26, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(18, 28, 12, 0.08);
}
.game-quest.is-done {
  border-color: rgba(122, 171, 26, 0.35);
  background: var(--green-dim, rgba(122, 171, 26, 0.08));
}
.game-quest-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  overflow: hidden;
  background: rgba(122, 171, 26, 0.12);
  color: var(--green, #4d7010);
  border: 1px solid rgba(122, 171, 26, 0.3);
}
.game-quest-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-quest.is-done .game-quest-icon {
  background: rgba(34, 197, 94, 0.16);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.35);
}
.game-quest-body { flex: 1; min-width: 0; }
.game-quest-side {
  text-align: right;
  flex-shrink: 0;
}

.game-chest-card {
  position: relative;
  flex: 1;
  min-width: 160px;
  text-align: center;
  padding: 1.25rem 1rem 1.15rem;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.game-chest-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(18, 28, 12, 0.12);
}
.game-chest-card.is-ready {
  border-color: rgba(122, 171, 26, 0.45);
  box-shadow: 0 0 0 1px rgba(122, 171, 26, 0.2), 0 12px 28px rgba(122, 171, 26, 0.12);
}
.game-chest-icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto .65rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #8a5a00;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.25), rgba(154, 205, 50, 0.18));
  border: 1px solid rgba(251, 191, 36, 0.4);
  box-shadow: 0 8px 18px rgba(196, 146, 18, 0.15);
}
.game-chest-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-art-inline {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  overflow: hidden;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  background: rgba(122, 171, 26, 0.08);
  border: 1px solid rgba(122, 171, 26, 0.2);
}
.game-art-inline img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.podium-card .game-art-inline {
  width: 3.25rem;
  height: 3.25rem;
  margin: .55rem auto .15rem;
  display: grid;
}
.game-chest-card .btn {
  box-shadow: 0 8px 22px rgba(122, 171, 26, 0.28);
}

.game-confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 2100;
  pointer-events: none;
  overflow: hidden;
}
.game-confetti-piece {
  position: absolute;
  top: -12px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  opacity: 0.95;
  animation: game-confetti-fall 1.6s ease-in forwards;
}
@keyframes game-confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(105vh) rotate(540deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ranking-podium .podium-card,
  .game-hero,
  .game-quest,
  .pct-bar > span.game-fill-anim,
  .game-confetti-piece {
    animation: none !important;
  }
  .ranking-podium .podium-card:hover,
  .game-quest:hover,
  .game-chest-card:hover {
    transform: none;
  }
  .pct-bar > span.game-fill-anim {
    width: var(--p, 100%) !important;
  }
}

/* Dashboard — KPIs + gráficos */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 100%;
}
.dash-kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  position: relative;
  overflow: hidden;
  min-width: 0;
}
.dash-kpi::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--green);
}
.dash-kpi-warn::before { background: #d97706; }
.dash-kpi-ok::before { background: #166534; }
.dash-kpi-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .35rem;
}
.dash-kpi-value {
  display: block;
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
}

.dash-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 100%;
}
.dash-chart-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  overflow: hidden;
}
.dash-chart-card--wide { grid-column: 1 / -1; }
.dash-chart-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.dash-chart-head p {
  margin: .35rem 0 0;
  font-size: .9rem;
}
.dash-chart-body {
  position: relative;
  margin-top: 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.dash-chart-body canvas {
  display: block;
  width: 100% !important;
  max-width: 100%;
}
.dash-chart-body--donut { height: 220px; }
.dash-chart-body--donut-sm { height: 180px; max-width: 280px; margin-left: auto; margin-right: auto; }
.dash-chart-body--bar { height: 280px; }
.dash-chart-body--funnel { height: 320px; }
.dash-footnote code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 520px) {
  .dash-kpis { grid-template-columns: 1fr; }
}

/* Fase 4 — nav badges, follow-ups, avisos festivos */
.nav-badge {
  display: inline-block;
  min-width: 1.25rem;
  padding: .1rem .4rem;
  margin-left: .25rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  background: var(--green, #16a34a);
  color: #fff;
  vertical-align: middle;
}
.nav-badge--warn {
  background: #dc2626;
  animation: nav-bell-pulse 1.6s ease-in-out infinite;
}
@keyframes nav-bell-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: .85; }
}
.meeting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  justify-content: flex-end;
}
.btn-xs {
  padding: .25rem .5rem;
  font-size: .75rem;
}
.is-active-bucket {
  border-color: var(--green, #16a34a) !important;
}
.fu-card-alert {
  border-color: #fca5a5 !important;
  background: linear-gradient(135deg, #fff 0%, #fef2f2 100%);
}
.fu-row-overdue td {
  background: #fef2f2;
}
.fu-row-today td {
  background: #fffbeb;
}
.badge-bell {
  font-weight: 700;
}
.aviso-hero {
  background:
    radial-gradient(circle at 12% 20%, rgba(34, 197, 94, .18), transparent 42%),
    radial-gradient(circle at 88% 10%, rgba(251, 191, 36, .2), transparent 40%),
    linear-gradient(135deg, #f0fdf4 0%, #fff7ed 55%, #fff 100%);
  border-color: #86efac;
}
.aviso-hero-kicker {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #166534;
}
.aviso-card--unread {
  border-color: var(--green, #16a34a);
  box-shadow: 0 0 0 1px rgba(22, 163, 74, .12);
}
.aviso-card--festive {
  background:
    linear-gradient(120deg, rgba(254, 243, 199, .55), rgba(220, 252, 231, .45) 50%, #fff 100%);
}
.aviso-pill {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  background: #166534;
  color: #fff;
}

.wl-domain-url-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  background: var(--bg-elevated);
}
.wl-domain-url-head {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  margin-bottom: .75rem;
}
.wl-domain-url-row {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
}
.wl-domain-url-row input {
  flex: 1;
  min-width: 220px;
}
.wl-dns-steps {
  margin: .5rem 0 0;
  padding-left: 1.25rem;
}
.wl-dns-steps li { margin: .35rem 0; }
.wl-dns-table code { font-size: .9rem; }
.wl-dns-warn {
  margin-top: 1.1rem;
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
}
.wl-dns-warn ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.wl-dns-warn li { margin: .2rem 0; }

