/* ============================================================
   CodeJato - Area logada (login, cadastro, painel)
   Estende os tokens de styles.v2.css. Carregar APOS o styles.v2.css.
   ============================================================ */

.auth-page {
  background: var(--cream-bg);
  color: var(--black);
  font-family: var(--font-stack);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar simples da area logada */
.auth-topbar {
  padding: 1rem clamp(1rem, 3vw, 1.5rem);
  border-bottom: 2px solid var(--black);
  background: var(--white);
}

.auth-topbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-topbar__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 900;
  text-decoration: none;
  color: var(--black);
  font-size: 1.1rem;
}

.auth-topbar__logo img { height: 28px; width: auto; }

.auth-topbar__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* Na landing o .top-bar__doc some no mobile (≤639px). No admin/painel esses
   botões são navegação funcional (Painel, Testar providers): mantém visíveis,
   apenas com fonte/padding um pouco menores para caber em telas estreitas. */
.auth-topbar__actions .top-bar__doc {
  display: inline-flex;
}
@media (max-width: 480px) {
  .auth-topbar__actions .top-bar__doc {
    font-size: 0.72rem;
    padding: 0.45rem 0.7rem;
  }
}

/* Badges de uso do plano dos providers (só /admin.html). Cor pela pior
   janela: verde < 60% usado, amarelo 60–85%, vermelho > 85%.
   O contorno é um anel de progresso: conic-gradient em border-box que o
   admin.js preenche via --sweep ao longo do ciclo de refresh — contorno
   completo = valor prestes a atualizar. */
.prov-usage {
  --sweep: 0deg;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}
.prov-usage__badge {
  --badge-bg: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--t-micro);
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background:
    linear-gradient(var(--badge-bg), var(--badge-bg)) padding-box,
    conic-gradient(var(--black) var(--sweep), rgba(17, 17, 17, 0.28) var(--sweep)) border-box;
  white-space: nowrap;
  cursor: default;
}
.prov-usage__badge strong { text-transform: uppercase; }
.prov-usage__badge--ok { --badge-bg: #C8F0CE; color: #14532D; }
.prov-usage__badge--warn { --badge-bg: #FFE8C2; color: #7A4A00; }
.prov-usage__badge--danger { --badge-bg: #FAD2C7; color: #8A1C00; }
/* --off precisa de fundo OPACO: o anel (border-box) vaza por padding-box
   transparente e pintaria a pill inteira. */
.prov-usage__badge--off { --badge-bg: var(--white); color: var(--black); }
@media (max-width: 640px) {
  .prov-usage__badge { font-size: 0.62rem; padding: 0.2rem 0.45rem; }
}

/* ============================================================
   Cartao de autenticacao (login/cadastro)
   ============================================================ */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 4rem) 1.25rem;
}

.auth-card {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-3d-lg);
  width: 100%;
  max-width: 440px;
  padding: clamp(1.75rem, 4vw, 2.5rem);
}

.auth-card__head {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-card__title {
  font-size: var(--t-section);
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 0.5rem;
}

.auth-card__subtitle {
  font-size: var(--t-body);
  color: var(--black-mute-65);
  margin: 0;
}

.auth-card__title .c-orange { color: var(--orange-500); }

/* ============================================================
   Formulario
   ============================================================ */
.auth-form { display: flex; flex-direction: column; gap: 1.25rem; }

.field { display: flex; flex-direction: column; gap: 0.4rem; }

.field__label {
  font-size: var(--t-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field__input {
  font-family: var(--font-stack);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--black);
  border-radius: var(--radius-badge);
  background: var(--cream-bg);
  color: var(--black);
  transition: box-shadow 0.15s var(--ease-out-soft), border-color 0.15s var(--ease-out-soft);
}

.field__input:focus {
  outline: none;
  border-color: var(--orange-500);
  box-shadow: var(--orange-tint-15) 0 0 0 4px;
}

.field__input::placeholder { color: var(--black-mute-40); }

/* Toggle de visibilidade de senha */
.field--password { position: relative; }
.field__toggle {
  position: absolute;
  right: 0.5rem;
  bottom: 0.4rem;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--orange-500);
  padding: 0.5rem;
}

/* Botao do form ocupa largura toda */
.auth-form .btn-cartoon { width: 100%; }

/* Mensagens de feedback */
.auth-msg {
  font-size: var(--t-label);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-badge);
  border: 2px solid var(--black);
  display: none;
}
.auth-msg.is-visible { display: block; }
.auth-msg--error { background: #FDE7E0; color: #8A1C00; }
.auth-msg--success { background: #E3F6E5; color: #14532D; }

/* Rodape do cartao com link para alternar */
.auth-card__foot {
  text-align: center;
  margin-top: 1.5rem;
  font-size: var(--t-label);
  color: var(--black-mute-65);
}
.auth-card__foot a { color: var(--orange-500); font-weight: 700; }

/* Estado de loading do botao */
.btn-cartoon[aria-busy="true"] { opacity: 0.7; pointer-events: none; }

/* ============================================================
   Painel (area logada)
   ============================================================ */
.dash-main {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) 1.25rem;
}

.dash-welcome {
  margin-bottom: 2rem;
}
.dash-welcome__title {
  font-size: var(--t-section);
  font-weight: 900;
  margin: 0 0 0.35rem;
}
.dash-welcome__sub {
  font-size: var(--t-body);
  color: var(--black-mute-65);
  margin: 0;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
  .dash-card--token { grid-column: 1 / -1; }
}

.dash-card {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-3d-md);
  padding: 1.5rem;
}

.dash-card__label {
  font-size: var(--t-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--black-mute-65);
  margin: 0 0 0.5rem;
}

.dash-card__value {
  font-size: 1.5rem;
  font-weight: 900;
  margin: 0;
}

/* Badge de status do plano */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--t-micro);
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--black);
}
.status-badge--active { background: #C8F0CE; color: #14532D; }
.status-badge--pending { background: #FFE8C2; color: #7A4A00; }
.status-badge--expired,
.status-badge--canceled { background: #FAD2C7; color: #8A1C00; }
.status-badge--source { background: transparent; color: var(--black); }
.status-badge--source.status-badge--codeall { background: #ECECEC; color: var(--black); }
.status-badge--source.status-badge--codemax { background: #FDECE3; color: #C1440C; }

/* ============================================================
   Guias do admin (Funções / Validar Fraudes)
   ============================================================ */
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.admin-tab {
  font-family: inherit;
  font-weight: 800;
  font-size: var(--t-label);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.6rem 1.1rem;
  background: var(--white);
  color: var(--black);
  border: 2px solid var(--black);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-3d-sm);
  cursor: pointer;
  transition: transform 0.05s ease;
}
.admin-tab:hover { transform: translateY(-1px); }
.admin-tab.is-active {
  background: var(--orange-500);
  color: var(--white);
}

.admin-panel {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ── Relatório de validação de fraudes ── */
.fraud-report { margin-top: 1rem; }
.fraud-section { margin-top: 1.5rem; }
.fraud-section:first-child { margin-top: 0; }
.fraud-section__title {
  font-size: var(--t-label);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--black-mute-65);
  margin: 0 0 0.75rem;
}
.fraud-cluster {
  border: 2px solid var(--black);
  border-radius: var(--radius-card);
  background: var(--cream-bg);
  padding: 1rem;
  margin-bottom: 1rem;
}
.fraud-cluster__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.fraud-cluster__ip {
  font-weight: 900;
  font-size: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}
.fraud-cluster__count {
  font-weight: 700;
  font-size: var(--t-label);
  color: var(--black-mute-65);
}
.fraud-cluster__src {
  font-size: var(--t-micro);
  color: var(--black-mute-65);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Token box (mascarado + revelar + copiar) */
.token-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: var(--cream-bg);
  border: 2px dashed var(--black);
  border-radius: var(--radius-badge);
  padding: 0.85rem 1rem;
}
.token-box__value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  word-break: break-all;
  flex: 1;
  min-width: 12ch;
}
.token-box__actions { display: inline-flex; gap: 0.5rem; }
.token-btn {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius-badge);
  box-shadow: var(--shadow-3d-sm);
  cursor: pointer;
  font-family: var(--font-stack);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.5rem 0.75rem;
  transition: transform 0.12s var(--ease-out-soft), box-shadow 0.12s var(--ease-out-soft);
}
.token-btn:hover { transform: translateY(2px); box-shadow: 0 1px 0 var(--black); }

.dash-actions { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }

/* Skeleton de carregamento */
.dash-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--black-mute-65);
  font-weight: 700;
}

.is-hidden { display: none !important; }

/* ── Upsell de planos no painel ─────────────────────────────────── */
.dash-upsell {
  background: var(--card-dark);
  border: 2px solid var(--card-border-orange);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-3d-lg);
  color: var(--gray-text);
  margin-top: 2rem;
  padding: 2rem 1.5rem;
  text-align: center;
}

.dash-upsell__badge {
  background: var(--orange-500);
  border: 2px solid var(--black);
  border-radius: var(--radius-pill);
  color: var(--white);
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.35rem 1rem;
  text-transform: uppercase;
}

.dash-upsell__title {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 900;
  margin-top: 0.9rem;
}

.dash-upsell__sub {
  color: var(--gray-text);
  margin: 0.5rem auto 1.75rem;
  max-width: 480px;
}

.dash-upsell__plans {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .dash-upsell__plans { grid-template-columns: 1fr 1fr; }
}

.dash-upsell__plan {
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.75rem 1.25rem 1.5rem;
  position: relative;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-upsell__plan:hover {
  border-color: var(--orange-500);
  box-shadow: var(--shadow-glow-orange);
  transform: translateY(-3px);
}

.dash-upsell__plan--featured { border-color: var(--orange-500); }

.dash-upsell__plan-tag {
  background: var(--orange-500);
  border: 2px solid var(--black);
  border-radius: var(--radius-badge);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 800;
  left: 50%;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  position: absolute;
  text-transform: uppercase;
  top: -0.9rem;
  transform: translateX(-50%);
  white-space: nowrap;
}

.dash-upsell__plan-name {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 800;
}

.dash-upsell__plan-devices {
  color: var(--gray-text);
  font-size: 0.85rem;
}

.dash-upsell__plan-price {
  color: var(--orange-500);
  font-size: 2rem;
  font-weight: 900;
  margin-top: 0.4rem;
}

.dash-upsell__plan-price small {
  font-size: 0.95rem;
  font-weight: 700;
}

.dash-upsell__plan-bill {
  color: var(--gray-text);
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.dash-upsell__more {
  color: var(--gray-text);
  font-size: 0.9rem;
  margin-top: 1.5rem;
}

.dash-upsell__more a {
  color: var(--orange-500);
  font-weight: 800;
  text-decoration: none;
}

.dash-upsell__more a:hover { text-decoration: underline; }

/* ============================================================
   Admin — secao Cadastrados
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.users-search-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.users-search {
  flex: 1;
  min-width: 200px;
  font-family: var(--font-stack);
  font-size: 0.9rem;
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--black);
  border-radius: var(--radius-badge);
  background: var(--cream-bg);
  color: var(--black);
}

.users-search:focus {
  outline: none;
  border-color: var(--orange-500);
  box-shadow: var(--orange-tint-15) 0 0 0 3px;
}

/* Table wrapper enables horizontal scroll on small viewports */
.users-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-badge);
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 640px;
}

.users-table thead tr {
  background: var(--black);
  color: var(--white);
}

.users-table thead th {
  padding: 0.65rem 0.9rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Linha de filtros por coluna (Origem/Status/Plano) no cabeçalho */
.users-filter-row th {
  padding: 0 0.9rem 0.55rem;
  text-transform: none;
  letter-spacing: 0;
}
.col-filter {
  width: 100%;
  min-width: 88px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.4rem;
  border: 2px solid var(--white);
  border-radius: var(--radius-pill, 999px);
  background: var(--white);
  color: var(--black);
  cursor: pointer;
}
.col-filter:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--cream-bg, #f3ead6);
}

.users-table tbody tr {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  transition: background 0.1s ease;
}

.users-table tbody tr:last-child {
  border-bottom: none;
}

.users-table tbody tr:hover {
  background: var(--cream-bg);
}

.users-table td {
  padding: 0.7rem 0.9rem;
  vertical-align: middle;
  color: var(--black);
}

/* Flex vai num DIV interno (.users-actions), nunca no <td> — um <td> com
   display:flex sai do modelo de colunas da tabela e desalinha o cabeçalho. */
.users-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}

/* Botões de ação nunca quebram em 2 linhas */
.users-table .token-btn {
  white-space: nowrap;
}

/* Coluna Ações: encolhe ao conteúdo; os dois botões ficam lado a lado sem quebrar */
.users-table td[data-label="Ações"],
.users-table th:last-child {
  white-space: nowrap;
  width: 1%;
  text-align: right;
}

/* Email com fonte reduzida para não espremer as demais colunas. */
.users-table td[data-label="Email"] {
  font-size: 0.72rem;
  max-width: 460px;
}

.token-btn--danger {
  border-color: #8A1C00;
  color: #8A1C00;
}

.token-btn--danger:hover {
  background: #FDE7E0;
}

.users-empty {
  font-size: 0.9rem;
  color: var(--black-mute-65);
  padding: 1rem 0;
  margin: 0;
}

/* Mobile: stack table rows as labeled cards */
@media (max-width: 640px) {
  .users-table-wrap {
    overflow-x: unset;
  }

  .users-table,
  .users-table thead,
  .users-table tbody,
  .users-table th,
  .users-table td,
  .users-table tr {
    display: block;
  }

  /* No modo cartão a tabela não tem colunas: zera o min-width de 640px do
     desktop (senão cada "cartão" fica com 640px e estoura o viewport, jogando
     os valores para fora da tela à direita). */
  .users-table {
    min-width: 0;
    width: 100%;
    font-size: 0.85rem;
  }

  /* Reseta os overrides de coluna do desktop que quebram o layout de cartão:
     a coluna Ações encolhia a 1% e Email limitava a 320px. */
  .users-table td[data-label="Ações"],
  .users-table td[data-label="Email"] {
    width: auto;
    max-width: none;
    text-align: left;
    font-size: 0.85rem;
  }

  /* Email longo quebra dentro do cartão em vez de empurrar a largura. */
  .users-table .user-link {
    white-space: normal;
    word-break: break-all;
    text-align: left;
  }

  .users-table thead tr:first-child {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  /* A linha de filtros continua visível como uma barra no card-layout mobile. */
  .users-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    background: var(--black);
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius-badge);
    margin-bottom: 0.75rem;
  }
  .users-filter-row th {
    padding: 0;
  }
  .users-filter-row th:empty {
    display: none;
  }
  .users-filter-row .col-filter {
    min-width: 0;
    flex: 1 1 28%;
  }

  .users-table tbody tr {
    border: 2px solid var(--black);
    border-radius: var(--radius-badge);
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: var(--white);
  }

  .users-table td {
    padding: 0.35rem 0;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .users-table td::before {
    content: attr(data-label);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--black-mute-65);
    flex-shrink: 0;
  }

  .users-actions {
    justify-content: flex-end;
    width: 100%;
  }
}

/* ============================================================
   #users-card breakout — largura maior no desktop
   ============================================================ */
@media (min-width: 980px) {
  #users-card {
    width: min(2400px, 98vw);
    margin-left: 50%;
    transform: translateX(-50%);
  }
}

/* ============================================================
   Modal de e-mail
   ============================================================ */
.email-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.email-modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--cream-bg, #faf8f3);
  border: 3px solid var(--black, #050505);
  border-radius: var(--radius-card, 1rem);
  padding: 1.75rem;
  box-shadow: 6px 6px 0 var(--black, #050505);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.email-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.email-modal-label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--black-mute-65, rgba(5,5,5,.65));
}

.email-modal-input {
  width: 100%;
}

.email-modal-textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  font-family: var(--font-stack);
}

.email-modal-footer {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ============================================================
   Dropdown de ações
   ============================================================ */
.actions-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 200;
  background: var(--cream-bg, #faf8f3);
  border: 2px solid var(--black, #050505);
  border-radius: var(--radius-badge, 0.5rem);
  box-shadow: 4px 4px 0 var(--black, #050505);
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  min-width: 160px;
  white-space: nowrap;
}

.actions-dropdown__item {
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--black, #050505);
  transition: background 0.1s;
}

.actions-dropdown__item:hover {
  background: var(--orange-500, #F94E03);
  color: #fff;
}

.actions-dropdown__item--danger {
  color: #8A1C00;
}

.actions-dropdown__item--danger:hover {
  background: #8A1C00;
  color: #fff;
}

/* ============================================================
   Validade clicável (edição inline)
   ============================================================ */
.expiry-cell {
  cursor: pointer;
  text-decoration: underline dotted var(--black-mute-65, rgba(5,5,5,.65));
  text-underline-offset: 3px;
}

.expiry-cell:hover {
  color: var(--orange-500, #F94E03);
}

.expiry-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.expiry-date-input {
  font-family: var(--font-stack);
  font-size: 0.82rem;
  padding: 0.25rem 0.4rem;
  border: 2px solid var(--black, #050505);
  border-radius: var(--radius-badge, 0.5rem);
  background: var(--cream-bg, #faf8f3);
  color: var(--black, #050505);
  cursor: pointer;
}

.expiry-date-input:focus {
  outline: none;
  border-color: var(--orange-500, #F94E03);
}

.expiry-ok-btn {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
}

/* ============================================================
   Link de e-mail clicável na tabela de usuários
   ============================================================ */
.user-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline dotted transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s ease, color 0.15s ease;
  text-align: left;
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.user-link:hover {
  color: var(--orange-500, #F94E03);
  text-decoration: underline dotted var(--orange-500, #F94E03);
}

/* ============================================================
   Modal de detalhes do usuário
   ============================================================ */
.user-detail-overlay {
  align-items: flex-start;
  padding: 2rem 1rem;
  overflow-y: auto;
}

.user-detail-card {
  width: 100%;
  max-width: min(1280px, 95vw);
  background: var(--cream-bg, #faf8f3);
  border: 3px solid var(--black, #050505);
  border-radius: var(--radius-card, 1rem);
  padding: 1.75rem;
  box-shadow: 6px 6px 0 var(--black, #050505);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  /* margem automática no topo para centralizar verticalmente quando cabe */
  margin: auto;
}

.user-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.user-detail-header .dash-card__label {
  margin: 0;
  word-break: break-all;
  flex: 1;
}

.user-detail-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.user-detail-close-btn {
  background: none;
  border: 2px solid var(--black, #050505);
  border-radius: var(--radius-badge, 0.5rem);
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 900;
  cursor: pointer;
  color: var(--black, #050505);
  line-height: 1;
  transition: background 0.12s ease, color 0.12s ease;
}

.user-detail-close-btn:hover {
  background: var(--black, #050505);
  color: var(--cream-bg, #faf8f3);
}

/* Seções internas */
.user-detail-section {
  border-top: 1px solid rgba(5, 5, 5, 0.12);
  padding-top: 1rem;
}

.user-detail-section:first-child {
  border-top: none;
  padding-top: 0;
}

.user-detail-section-title {
  font-size: var(--t-label, 0.72rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--black-mute-65, rgba(5,5,5,.65));
  margin: 0 0 0.65rem;
}

/* Definition list de perfil / plano */
.user-detail-dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.3rem;
  margin: 0;
}

.user-detail-dl__row {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.4;
  flex-wrap: wrap;
}

.user-detail-dl__row dt {
  font-weight: 700;
  color: var(--black-mute-65, rgba(5,5,5,.65));
  min-width: 160px;
  flex-shrink: 0;
}

.user-detail-dl__row dd {
  margin: 0;
  color: var(--black, #050505);
  word-break: break-all;
}

/* Stat cards de uso */
.user-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .user-detail-stats {
    grid-template-columns: 1fr;
  }
}

.user-detail-stat {
  background: var(--white, #fff);
  border: 2px solid var(--black, #050505);
  border-radius: var(--radius-badge, 0.5rem);
  box-shadow: 3px 3px 0 var(--black, #050505);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.user-detail-stat__label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--black-mute-65, rgba(5,5,5,.65));
  margin-bottom: 0.3rem;
}

.user-detail-stat__value {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--black, #050505);
  line-height: 1.15;
}

.user-detail-stat__sub {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--black-mute-65, rgba(5,5,5,.65));
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

/* Gráfico SVG */
.user-detail-chart-wrap {
  width: 100%;
  overflow: hidden;
}

.user-detail-chart {
  display: block;
  width: 100%;
  height: 80px;
}

/* Status breakdown */
.user-detail-status-row {
  font-size: 0.85rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.user-detail-status--ok {
  color: #14532D;
  background: #E3F6E5;
  border: 1px solid #14532D;
  border-radius: var(--radius-pill, 999px);
  padding: 0.15rem 0.6rem;
  font-size: 0.78rem;
}

.user-detail-status--err {
  color: #8A1C00;
  background: #FDE7E0;
  border: 1px solid #8A1C00;
  border-radius: var(--radius-pill, 999px);
  padding: 0.15rem 0.6rem;
  font-size: 0.78rem;
}

/* Estados de loading / erro */
.user-detail-loading,
.user-detail-error,
.user-detail-empty {
  font-size: 0.88rem;
  color: var(--black-mute-65, rgba(5,5,5,.65));
  margin: 0;
  padding: 0.5rem 0;
}

.user-detail-error {
  color: #8A1C00;
}

/* ── IPs usados ─────────────────────────────────────────────────────── */
.ip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.ip-list__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.84rem;
  line-height: 1.4;
}

.ip-list__addr {
  font-family: monospace;
  font-weight: 700;
  color: var(--black, #050505);
  word-break: break-all;
}

.ip-list__meta {
  font-size: 0.78rem;
  color: var(--black-mute-65, rgba(5,5,5,.65));
}

/* Badges de origem de IP */
.ip-badge {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-pill, 999px);
  padding: 0.15rem 0.55rem;
  border: 1.5px solid currentColor;
  flex-shrink: 0;
}

.ip-badge--uso {
  color: #14532D;
  background: #E3F6E5;
}

.ip-badge--cadastro {
  color: #1e40af;
  background: #dbeafe;
}

/* ── Suspeita de conta duplicada ─────────────────────────────────────── */
.dup-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.84rem;
  margin-bottom: 0.6rem;
}

.dup-label {
  font-weight: 700;
  color: var(--black-mute-65, rgba(5,5,5,.65));
}

/* Badges Sim/Não de duplicata */
.dup-badge {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-pill, 999px);
  padding: 0.2rem 0.65rem;
  border: 2px solid currentColor;
  flex-shrink: 0;
}

.dup-badge--sim {
  color: #8A1C00;
  background: #FDE7E0;
}

.dup-badge--nao {
  color: #14532D;
  background: #E3F6E5;
}

.dup-siblings {
  margin-top: 0.4rem;
}

.dup-siblings__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--black-mute-65, rgba(5,5,5,.65));
  margin: 0 0 0.3rem;
}

.dup-siblings__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Links de e-mail sibling — botão visualmente inline */
.sibling-link {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: #F94E03;
  text-decoration: underline;
  cursor: pointer;
  text-align: left;
  word-break: break-all;
}

.sibling-link:hover {
  color: #050505;
}

/* ── Validar fraude (modal por usuário) ──────────────────────────────── */
.fraud-check-verdict {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md, 12px);
  border: 2px solid currentColor;
  margin-bottom: 1.25rem;
}

.fraud-check-verdict__label {
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fraud-check-verdict__detail {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--black-mute-65, rgba(5,5,5,.65));
}

.fraud-check-verdict--suspeito {
  color: #8A1C00;
  background: #FDE7E0;
}

.fraud-check-verdict--atencao {
  color: #7A4A00;
  background: #FFF1D6;
}

.fraud-check-verdict--ok {
  color: #14532D;
  background: #E3F6E5;
}

.fraud-check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--black-mute-12, rgba(5,5,5,.12));
}

.fraud-check-row:first-of-type {
  border-top: none;
}

.fraud-check-row__text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.fraud-check-row__title {
  font-size: 0.86rem;
  font-weight: 800;
  color: #050505;
}

.fraud-check-row__evidence {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--black-mute-65, rgba(5,5,5,.65));
}

/* ── Gráfico: cabeçalho, legenda e seletor de janela ─────────────────── */
.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chart-legend-item {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill, 999px);
  border: 1.5px solid currentColor;
}

.chart-legend-item--in {
  color: #b83600;
  background: #fff0eb;
}

.chart-legend-item--out {
  color: #050505;
  background: rgba(5,5,5,.09);
}

.chart-legend-item--req {
  color: #1d4ed8;
  background: #dbeafe;
}

.chart-legend-item--cache {
  color: #0d9488;
  background: #ccfbf1;
}

/* Linha de economia estimada por cache (seção Cache) */
.user-detail-cache-savings {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f766e;
}

.user-detail-cache-note {
  font-weight: 500;
  color: rgba(5, 5, 5, 0.45);
}

/* Botões de janela temporal */
.chart-window-selector {
  display: flex;
  gap: 0.25rem;
}

.chart-window-btn {
  background: var(--cream-bg, #faf8f3);
  border: 2px solid var(--black, #050505);
  border-radius: var(--radius-badge, 0.5rem);
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  color: var(--black, #050505);
  transition: background 0.1s ease, color 0.1s ease;
  box-shadow: 2px 2px 0 var(--black, #050505);
}

.chart-window-btn:hover {
  background: var(--black, #050505);
  color: var(--cream-bg, #faf8f3);
}

.chart-window-btn--active {
  background: #F94E03;
  color: #fff;
  border-color: #F94E03;
  box-shadow: 2px 2px 0 rgba(5,5,5,.4);
}

.chart-window-btn--active:hover {
  background: #d43a00;
  border-color: #d43a00;
  color: #fff;
}

/* Rótulo do eixo Y */
.chart-axis-y-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--black-mute-65, rgba(5,5,5,.65));
  text-align: right;
  margin-bottom: 0.15rem;
  padding-right: 0.25rem;
}

/* Gráfico SVG — altura segue o aspect ratio do viewBox (escala uniforme, sem distorção) */
.user-detail-chart {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
}

/* Estado vazio do gráfico (usuário sem atividade no período) */
.chart-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--black-mute-65, rgba(5,5,5,.5));
  background: rgba(5,5,5,.02);
  border: 1px dashed rgba(5,5,5,.14);
  border-radius: 10px;
}

/* Linha de sumário do período */
.chart-summary {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--black-mute-65, rgba(5,5,5,.65));
  margin-top: 0.4rem;
}

.chart-summary strong {
  color: var(--black, #050505);
}

/* ── Prompts do cliente ─────────────────────────────────────────────── */

/* Controles: label + input + presets + botão de análise */
.prompts-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.prompts-hours-label {
  color: var(--black-mute-65, rgba(5,5,5,.65));
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.prompts-hours-input {
  background: var(--white, #fff);
  border: 2px solid var(--black, #050505);
  border-radius: var(--radius-badge, 0.5rem);
  box-shadow: 2px 2px 0 var(--black, #050505);
  color: var(--black, #050505);
  font-family: var(--font-stack);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  width: 4.5rem;
  /* ocultar spinner nativo para visual limpo */
  -moz-appearance: textfield;
}

.prompts-hours-input::-webkit-inner-spin-button,
.prompts-hours-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.prompts-hours-input:focus {
  outline: 2px solid #F94E03;
  outline-offset: 1px;
}

/* Grupo de botões preset 24h/48h/72h — reutiliza .chart-window-btn */
.prompts-presets {
  display: flex;
  gap: 0.25rem;
}

/* Estado ativo dos presets — espelha .chart-window-btn--active */
.prompts-preset-btn--active {
  background: #F94E03;
  border-color: #F94E03;
  box-shadow: 2px 2px 0 rgba(5,5,5,.4);
  color: #fff;
}

.prompts-preset-btn--active:hover {
  background: #d43a00;
  border-color: #d43a00;
  color: #fff;
}

/* Botão "Analisar prompts" — herda .token-btn; margem inline-start automática */
.prompts-analyze-btn {
  margin-inline-start: auto;
}

/* Área de resultado */
.prompts-result {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Linha de sumário ──────────────────────────────────────────────── */
.prompts-summary {
  color: var(--black-mute-65, rgba(5,5,5,.65));
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0;
}

.prompts-summary strong {
  color: var(--black, #050505);
}

.prompts-summary__cap {
  color: #8A1C00;
}

/* ── Tabela de prompts ─────────────────────────────────────────────── */
.prompts-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.prompts-table {
  border-collapse: collapse;
  font-size: 0.82rem;
  min-width: 0;
  width: 100%;
}

.prompts-table th {
  background: var(--black, #050505);
  border: 1px solid var(--black, #050505);
  color: var(--cream-bg, #faf8f3);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.6rem;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.prompts-table td {
  border: 1px solid rgba(5,5,5,.15);
  color: var(--black, #050505);
  line-height: 1.4;
  padding: 0.35rem 0.6rem;
  vertical-align: top;
}

/* Zebra */
.prompts-table tbody tr:nth-child(even) td {
  background: rgba(5,5,5,.035);
}

.prompts-table tbody tr:hover td {
  background: rgba(249,78,3,.07);
}

/* Coluna # (índice) — estreita e centralizada */
.prompts-col-num {
  color: var(--black-mute-65, rgba(5,5,5,.65));
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  width: 2.5rem;
}

/* Coluna Hora UTC — monospace compacto */
.prompts-col-hora {
  font-family: monospace;
  font-size: 0.78rem;
  white-space: nowrap;
  width: 9rem;
}

/* Coluna Prompt — wrap com truncamento via max-width */
.prompts-col-prompt {
  max-width: 0; /* força célula a respeitar largura relativa */
  width: 100%;
  word-break: break-word;
}

/* Truncamento é feito no JS (corte ~200 chars + botão "ver mais"); aqui só o wrap. */
.prompts-prompt-trunc {
  word-break: break-word;
}

.prompts-expand-btn {
  background: none;
  border: none;
  color: #F94E03;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  margin-top: 0.2rem;
  padding: 0;
  text-decoration: underline;
}

.prompts-expand-btn:hover {
  color: #050505;
}

/* Coluna Envios — estreita, centralizada */
.prompts-col-envios {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  width: 4rem;
}

/* Coluna Modelo — compacto */
.prompts-col-modelo {
  font-family: monospace;
  font-size: 0.78rem;
  white-space: nowrap;
  width: 8rem;
}

/* ── Estados: loading / empty / erro / busy ────────────────────────── */
.prompts-state-msg {
  color: var(--black-mute-65, rgba(5,5,5,.65));
  font-size: 0.88rem;
  margin: 0;
  padding: 0.5rem 0;
}

.prompts-state-msg--error {
  color: #8A1C00;
}

/* Segmentos do sumário usados pelo JS */
.prompts-summary__main {
  color: var(--black, #050505);
}

.prompts-summary__warn {
  color: #8A1C00;
}

/* Modal de status de providers (admin → Testar Providers) */
.providers-modal-card {
  max-width: 620px;
}

.providers-modal-card .email-modal-body {
  max-height: 60vh;
  overflow-y: auto;
}

.provider-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(5, 5, 5, 0.12);
}

.provider-row:last-child {
  border-bottom: 0;
}

.provider-row__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.provider-row__id {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1 1 auto;
  min-width: 0;
}

.provider-row__id strong {
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

.provider-row__type {
  font-size: 0.8rem;
  opacity: 0.7;
  overflow-wrap: anywhere;
}

.provider-row__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.provider-row__detail {
  font-size: 0.8rem;
  opacity: 0.75;
  min-width: 4.5rem;
  text-align: right;
}

.provider-row__retest {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
}

.provider-row__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  font-size: 0.78rem;
}

.provider-row__quota {
  opacity: 0.8;
}

.provider-row__limit {
  font-weight: 800;
  color: #8A1C00;
  background: #FDE2C7;
  border: 1px solid #F94E03;
  padding: 0.1rem 0.55rem;
  border-radius: 9999px;
}

.provider-row__models-toggle {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  color: #F94E03;
  text-decoration: underline;
}

.provider-row__models {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-top: 0.2rem;
}

.model-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(5, 5, 5, 0.25);
}

.model-chip--up {
  background: #C8F0CE;
  color: #14532D;
}

.model-chip--down {
  background: #FAD2C7;
  color: #8A1C00;
  border-color: #8A1C00;
}

/* ============================================================
   Aba "Métricas" — dashboard agregado de uso
   Estilo cartoon: reusa chart-window-btn/token-btn e as cards
   .dash-card; barras horizontais próprias.
   ============================================================ */
.metrics-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.metrics-control-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.metrics-control-label {
  font-size: var(--t-micro, 0.7rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--black-mute-65, rgba(5, 5, 5, 0.65));
}

.metrics-btn-group {
  display: flex;
  gap: 0.25rem;
}

.metrics-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--black, #050505);
  cursor: pointer;
  user-select: none;
}

.metrics-toggle input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--orange-500, #F94E03);
  cursor: pointer;
}

.metrics-refresh-btn {
  margin-inline-start: auto;
}

/* Grid responsivo dos cards de totais */
.metrics-totals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.metrics-total-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.85rem 1rem;
  background: var(--cream-bg, #faf8f3);
  border: 2px solid var(--black, #050505);
  border-radius: var(--radius-badge, 0.5rem);
  box-shadow: 2px 2px 0 var(--black, #050505);
}

.metrics-total-label {
  font-size: var(--t-micro, 0.7rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--black-mute-65, rgba(5, 5, 5, 0.65));
}

.metrics-total-value {
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--black, #050505);
}

/* Barras horizontais (quem usa mais / combos / providers) */
.metrics-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.metrics-bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metrics-bar-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.metrics-bar-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--black, #050505);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metrics-bar-meta {
  flex-shrink: 0;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--black-mute-65, rgba(5, 5, 5, 0.65));
}

.metrics-bar-track {
  position: relative;
  height: 0.85rem;
  background: rgba(5, 5, 5, 0.06);
  border: 1.5px solid var(--black, #050505);
  border-radius: 9999px;
  overflow: hidden;
}

.metrics-bar-fill {
  display: block;
  height: 100%;
  min-width: 3px;
  background: var(--orange-500, #F94E03);
  border-radius: 9999px;
}

.metrics-empty {
  font-weight: 700;
}

/* ── Revogar + Blacklist (picker de sinais) + desbloqueio em lote ───────── */
.revoke-bl-card {
  max-width: 34rem;
}

.revoke-bl__signal {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.2rem;
  cursor: pointer;
}

.revoke-bl__signal input {
  flex: 0 0 auto;
}

.revoke-bl__sig-value {
  flex: 1 1 auto;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.revoke-bl__contexts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.blacklist-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.6rem;
}
