/* ============================================================
   PREMIUM UI - IA BOLTS
   Design system: #020617 bg, #0b1120 cards, #24a8ff accent
   ============================================================ */

/* ---- SIDEBAR TRANSITION ---- */
.sidebar-jax {
  transition: width .28s cubic-bezier(.4,0,.2,1), min-width .28s, max-width .28s;
  overflow: hidden;
}

/* Sidebar: profundidade e borda refinada */
.sidebar-jax.sidebar-jax-premium {
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.5) 0%, var(--jax-bg-card, #0b1120) 38%, #05080f 100%);
  border-right: 1px solid rgba(51, 65, 85, 0.45);
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.12);
}

/* ---- SIDEBAR BRAND WRAP ---- */
.sidebar-brand-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 0.9rem 0.95rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  gap: 0.5rem;
}
.sidebar-brand-wrap .sidebar-brand {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border-bottom: none;
}
.sidebar-brand--logo-only {
  justify-content: flex-start;
}
.sidebar-brand--logo-only .sidebar-brand-logo {
  max-height: 46px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}
.sidebar-brand-fallback {
  display: none;
  align-items: center;
  justify-content: center;
}
.nav-icon-sidebar--brand {
  font-size: 1.85rem !important;
  width: auto !important;
  color: var(--jax-accent, #58a6ff);
  opacity: 1 !important;
  filter: drop-shadow(0 0 14px rgba(36, 168, 255, 0.35));
}

/* Ícones em “slot” 40px — leitura forte, estilo produto premium */
.sidebar-jax-premium .nav-link-premium .nav-icon-sidebar.ti {
  font-size: 1.35rem;
  width: 2.5rem;
  min-width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: rgba(203, 213, 225, 0.92);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
}
.sidebar-jax-premium .nav-link-premium:hover .nav-icon-sidebar.ti {
  background: rgba(36, 168, 255, 0.1);
  border-color: rgba(36, 168, 255, 0.22);
  color: #e0f2fe;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 14px rgba(0, 0, 0, 0.2);
}
.sidebar-jax-premium .nav-link-premium.active .nav-icon-sidebar.ti {
  background: linear-gradient(145deg, rgba(36, 168, 255, 0.22), rgba(36, 168, 255, 0.08));
  border-color: rgba(36, 168, 255, 0.4);
  color: #f0f9ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 0 1px rgba(36, 168, 255, 0.15);
}
.sidebar-jax .nav-parent-chevron.ti {
  font-size: 0.85rem;
  opacity: 0.55;
  width: auto;
  min-width: auto;
  height: auto;
  border: none;
  background: transparent;
  box-shadow: none;
}
.sidebar-jax .nav-link-parent[aria-expanded="true"] .nav-parent-chevron {
  opacity: 0.85;
}

.sidebar-user-dropdown {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 10px;
  padding: 0.35rem;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}
.sidebar-user-dropdown .dropdown-item {
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  color: #e6edf3;
}
.sidebar-user-dropdown .dropdown-item:hover {
  background: rgba(110, 118, 129, 0.18);
  color: #f0f6fc;
}
.sidebar-user-dropdown .dropdown-divider {
  border-color: rgba(48, 54, 61, 0.95);
  margin: 0.35rem 0;
}
.sidebar-dd-ico {
  color: #58a6ff;
  font-size: 1rem;
  vertical-align: -0.1em;
}

/* ---- AMBIENTE (luxo): compacto — linha ícone + texto ---- */
.sb-account-wrap {
  padding: 0 0.65rem 0.55rem;
  margin-top: 0.1rem;
}
.sb-account-lux__head {
  margin-bottom: 0.35rem;
  padding-left: 0.08rem;
}
.sb-account-lux__kicker {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.85);
  font-family: ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, Consolas, monospace;
}
.sb-account-lux__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.sb-account-lux__card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  padding: 0.42rem 0.45rem 0.42rem 0.42rem;
  border-radius: 11px;
  text-decoration: none !important;
  color: rgba(203, 213, 225, 0.82);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.04) 0%, rgba(15, 23, 42, 0.5) 100%);
  border: 1px solid rgba(51, 65, 85, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 12px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.2s cubic-bezier(0.34, 1.2, 0.64, 1),
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.18s ease;
}
.sb-account-lux__card:hover:not(.is-active) {
  transform: translateY(-1px);
  border-color: rgba(100, 116, 139, 0.65);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06) 0%, rgba(30, 41, 59, 0.45) 100%);
  color: #e2e8f0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 4px 16px rgba(0, 0, 0, 0.22);
}
.sb-account-lux__card:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.65);
  outline-offset: 1px;
}
/* Glifo: quadrado fixo pequeno */
.sb-account-lux__glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.05rem;
  height: 2.05rem;
  min-width: 2.05rem;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(148, 163, 184, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: inherit;
}
.sb-account-lux__svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.sb-account-lux__copy {
  display: flex;
  flex-direction: column;
  gap: 0.06rem;
  min-width: 0;
  text-align: left;
  flex: 1;
}
.sb-account-lux__title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #f1f5f9;
}
.sb-account-lux__card:not(.is-active) .sb-account-lux__title {
  color: rgba(226, 232, 240, 0.78);
}
.sb-account-lux__card.is-active .sb-account-lux__title {
  color: #f8fafc;
}
.sb-account-lux__hint {
  font-size: 0.52rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.72);
  line-height: 1.2;
}
/* Simulador ativo — azul gelo */
.sb-account-lux__card--sim.is-active {
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(155deg, rgba(14, 116, 144, 0.22) 0%, rgba(15, 23, 42, 0.85) 55%, rgba(8, 47, 73, 0.35) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(56, 189, 248, 0.1),
    0 4px 18px rgba(8, 47, 73, 0.35);
}
.sb-account-lux__card--sim.is-active .sb-account-lux__glyph {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.06));
  border-color: rgba(125, 211, 252, 0.35);
  color: #7dd3fc;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 14px rgba(56, 189, 248, 0.12);
}
.sb-account-lux__card--sim.is-active .sb-account-lux__hint {
  color: rgba(125, 211, 252, 0.85);
}
/* Conta real ativo — esmeralda */
.sb-account-lux__card--real.is-active {
  border-color: rgba(52, 211, 153, 0.42);
  background: linear-gradient(155deg, rgba(6, 78, 59, 0.28) 0%, rgba(15, 23, 42, 0.88) 55%, rgba(6, 95, 70, 0.28) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(52, 211, 153, 0.08),
    0 4px 18px rgba(6, 78, 59, 0.32);
}
.sb-account-lux__card--real.is-active .sb-account-lux__glyph {
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.18), rgba(16, 185, 129, 0.08));
  border-color: rgba(110, 231, 183, 0.32);
  color: #6ee7b7;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 14px rgba(52, 211, 153, 0.1);
}
.sb-account-lux__card--real.is-active .sb-account-lux__hint {
  color: rgba(167, 243, 208, 0.88);
}
@media (max-width: 360px) {
  .sb-account-lux__title {
    font-size: 0.65rem;
  }
  .sb-account-lux__svg {
    width: 16px;
    height: 16px;
  }
  .sb-account-lux__glyph {
    width: 1.85rem;
    height: 1.85rem;
    min-width: 1.85rem;
  }
}

/* ---- SIDEBAR TOGGLE BUTTON ---- */
.sidebar-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(148, 163, 184, 0.95);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover {
  background: rgba(36, 168, 255, 0.12);
  border-color: rgba(36, 168, 255, 0.25);
  color: #f8fafc;
  box-shadow: 0 0 0 1px rgba(36, 168, 255, 0.15);
}
.sidebar-toggle-icon {
  font-size: 1.15rem;
  transition: transform 0.28s ease;
}
.sidebar-jax.is-collapsed .sidebar-toggle-icon {
  transform: scaleX(-1);
}

/* ---- SIDEBAR AVATAR ---- */
.sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(36, 168, 255, 0.22), rgba(36, 168, 255, 0.08));
  border: 1px solid rgba(36, 168, 255, 0.22);
  color: #7dd3fc;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

/* ---- SIDEBAR USER BUTTON ---- */
.sidebar-user-btn {
  padding: .5rem .75rem;
  border-radius: 10px;
  transition: background .18s;
}
.sidebar-user-btn:hover {
  background: rgba(255,255,255,.05);
}

/* ---- SIDEBAR TOOLTIP ---- */
.sidebar-nav-tooltip {
  position: fixed;
  z-index: 9999;
  background: #0d1525;
  color: #f4f5fa;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 9px;
  padding: .4rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  animation: sbTipIn .12s ease;
}
@keyframes sbTipIn {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: none; }
}

/* ---- COLLAPSED STATE ---- */
.sidebar-jax.is-collapsed .sidebar-hide-when-collapsed,
.sidebar-jax.is-collapsed .nav-label,
.sidebar-jax.is-collapsed .nav-section,
.sidebar-jax.is-collapsed .sb-account-wrap,
.sidebar-jax.is-collapsed .user-name,
.sidebar-jax.is-collapsed .nav-parent-chevron,
.sidebar-jax.is-collapsed .nav-item-submenu { display: none !important; }

.sidebar-jax.is-collapsed .sidebar-brand-wrap {
  justify-content: center;
  padding: .8rem .5rem;
}
.sidebar-jax.is-collapsed .sidebar-brand {
  justify-content: center;
  flex: unset;
}
.sidebar-jax.is-collapsed .nav-link-premium {
  justify-content: center;
  padding: 0.55rem 0;
  margin: 0 0.35rem;
}
.sidebar-jax.is-collapsed .nav-icon-sidebar.ti {
  width: 2.4rem;
  min-width: 2.4rem;
  height: 2.4rem;
  font-size: 1.28rem;
}
.sidebar-jax.is-collapsed .sidebar-footer {
  padding: .65rem .5rem;
}
.sidebar-jax.is-collapsed .sidebar-footer .dropdown > a {
  justify-content: center;
  padding: .5rem;
}
.sidebar-jax.is-collapsed .sidebar-toggle-btn {
  margin: 0 auto;
  display: flex;
}

/* ============================================================
   ROBOT KPI GRID
   ============================================================ */
.robot-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.robot-kpi-card {
  background: linear-gradient(145deg, #0d1627, #0b1120);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 1.35rem 1.4rem;
  position: relative;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  cursor: default;
}
.robot-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  border-color: rgba(255,255,255,0.15);
}
.robot-kpi-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  border-radius: 16px 16px 0 0;
}
.robot-kpi-card::after {
  content: '';
  position: absolute; top: -40px; right: -20px;
  width: 120px; height: 120px;
  border-radius: 50%;
  opacity: 0.06;
}

/* Color variants */
.robot-kpi-card--gain::before  { background: linear-gradient(90deg, #22c55e, #86efac); }
.robot-kpi-card--gain::after   { background: #22c55e; }
.robot-kpi-card--loss::before  { background: linear-gradient(90deg, #ef4444, #fca5a5); }
.robot-kpi-card--loss::after   { background: #ef4444; }
.robot-kpi-card--seq-gain::before { background: linear-gradient(90deg, #f97316, #fb923c); }
.robot-kpi-card--seq-gain::after  { background: #f97316; }
.robot-kpi-card--seq-loss::before { background: linear-gradient(90deg, #6366f1, #818cf8); }
.robot-kpi-card--seq-loss::after  { background: #6366f1; }
.robot-kpi-card--total::before { background: linear-gradient(90deg, #24a8ff, #60c8ff); }
.robot-kpi-card--total::after  { background: #24a8ff; }
.robot-kpi-card--acerto::before { background: linear-gradient(90deg, #06b6d4, #67e8f9); }
.robot-kpi-card--acerto::after  { background: #06b6d4; }

.robot-kpi-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
}
.robot-kpi-card--gain .robot-kpi-icon     { background: rgba(34,197,94,.15);  color: #22c55e; }
.robot-kpi-card--loss .robot-kpi-icon     { background: rgba(239,68,68,.15);   color: #ef4444; }
.robot-kpi-card--seq-gain .robot-kpi-icon { background: rgba(249,115,22,.15);  color: #fb923c; }
.robot-kpi-card--seq-loss .robot-kpi-icon { background: rgba(99,102,241,.15);  color: #818cf8; }
.robot-kpi-card--total .robot-kpi-icon    { background: rgba(36,168,255,.15);  color: #24a8ff; }
.robot-kpi-card--acerto .robot-kpi-icon   { background: rgba(6,182,212,.15);   color: #22d3ee; }

.robot-kpi-label {
  font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: rgba(163,163,163,0.9); margin-bottom: 0.5rem;
}
.robot-kpi-value {
  font-size: 1.6rem; font-weight: 800;
  letter-spacing: -0.03em; line-height: 1.1;
  color: #f4f5fa; margin-bottom: 0.3rem;
}
.robot-kpi-value.kv-gain   { color: #4ade80; }
.robot-kpi-value.kv-loss   { color: #f87171; }
.robot-kpi-value.kv-orange { color: #fb923c; }
.robot-kpi-value.kv-blue   { color: #60a5fa; }
.robot-kpi-value.kv-cyan   { color: #22d3ee; }
.robot-kpi-hint {
  font-size: 0.72rem; color: rgba(163,163,163,0.7);
  line-height: 1.3; margin-top: 0.2rem;
}

/* ---- STREAK VISUAL INDICATORS ---- */
.streak-bar {
  display: flex; gap: 3px; margin-top: 0.6rem; flex-wrap: wrap;
}
.streak-dot {
  width: 8px; height: 8px; border-radius: 2px;
  background: rgba(255,255,255,0.12);
  transition: transform .1s;
}
.streak-dot.active-gain { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,.5); }
.streak-dot.active-loss { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,.5); }

/* ---- PERFORMANCE SECTION HEADER ---- */
.perf-section-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(36,168,255,.08), transparent);
  border: 1px solid rgba(36,168,255,.15);
  border-radius: 14px;
}
.perf-section-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: rgba(36,168,255,.12); color: #24a8ff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.perf-section-title {
  font-size: 1.1rem; font-weight: 700; letter-spacing: -0.02em; margin: 0;
}
.perf-section-subtitle {
  font-size: 0.8rem; color: rgba(163,163,163,.8); margin: 0.2rem 0 0;
}

/* ============================================================
   PREMIUM CHECKOUT ENHANCEMENTS
   ============================================================ */
.checkout-plan-switch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.plan-switch-card {
  border: 2px solid rgba(255,255,255,0.1);
  border-radius: 14px; padding: 1rem 1.1rem;
  cursor: pointer; transition: all .2s;
  background: rgba(255,255,255,0.03);
  text-decoration: none; display: block;
  color: var(--jax-text);
}
.plan-switch-card:hover {
  border-color: rgba(36,168,255,0.5);
  background: rgba(36,168,255,0.07);
  transform: translateY(-2px);
  color: var(--jax-text);
}
.plan-switch-card.active {
  border-color: #24a8ff;
  background: rgba(36,168,255,0.12);
  box-shadow: 0 0 0 1px rgba(36,168,255,0.3), 0 8px 24px rgba(36,168,255,.1);
}
.plan-switch-name {
  font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: rgba(163,163,163,.8); margin-bottom: 0.4rem;
}
.plan-switch-price {
  font-size: 1.3rem; font-weight: 800; letter-spacing: -0.03em;
}
.plan-switch-suffix {
  font-size: 0.75rem; color: rgba(163,163,163,.7); font-weight: 500;
}
.plan-switch-badge {
  font-size: 0.65rem; font-weight: 700;
  padding: 0.18rem 0.55rem; border-radius: 6px;
  background: rgba(34,197,94,.15); color: #4ade80;
  border: 1px solid rgba(34,197,94,.25);
  display: inline-block; margin-top: 0.4rem;
}
