/* ============================================================
   FreevaMultcontas — tokens de design
   Conceito: backstage de operação. Cartão de acesso (crachá),
   luz de cabine âmbar como sinal de "ao vivo", rótulos em mono
   como uma ordem de palco (call sheet).
   ============================================================ */

:root {
  --bg: #0A0908;
  --bg-raised: #111009;
  --surface: #16140D;
  --surface-2: #1F1B10;
  --surface-3: #2C2615;
  --border: #2C2615;
  --border-soft: #1F1B10;

  --text: #F1EADA;
  --text-dim: #A99C7C;
  --text-faint: #6E644C;

  --accent: #C9A227;        /* dourado Freeva, para fundos sólidos (botões, pontos) */
  --accent-text: #DEBB4C;   /* dourado mais claro, para texto/ícones sobre fundo escuro */
  --accent-ink: #1A1408;    /* tinta escura sobre fundo dourado */
  --accent-soft: rgba(201, 162, 39, 0.16);

  --ok: #3DDC84;
  --ok-soft: rgba(61, 220, 132, 0.14);
  --danger: #E6614F;
  --danger-soft: rgba(230, 97, 79, 0.16);
  --info: #7FA8D9;
  --info-soft: rgba(127, 168, 217, 0.14);

  --telegram: #7FA8D9;
  --privacy: #D98BA6;
  --outro: #B79CFF;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --shadow-lift: 0 20px 60px -20px rgba(0,0,0,0.75);

  --font-display: 'Cinzel', 'Georgia', serif;
  --font-accent: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button { font-family: inherit; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------- toasts ---------------- */
.toast-stack {
  position: fixed; top: 16px; right: 16px; z-index: 999;
  display: flex; flex-direction: column; gap: 8px; max-width: 340px;
}
.toast {
  background: var(--surface-2); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 13.5px; box-shadow: var(--shadow-lift);
  animation: toast-in 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  overflow: hidden;
}
.toast.toast--leaving { animation: toast-out 0.22s ease both; }
.toast.toast--ok { border-left-color: var(--ok); }
.toast.toast--error { border-left-color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px) scale(0.96); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toast-out { from { opacity: 1; transform: translateX(0); max-height: 100px; margin-bottom: 8px; } to { opacity: 0; transform: translateX(16px); max-height: 0; margin-bottom: 0; } }

/* ---------------- tela de auth ---------------- */
.auth-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  padding: 24px;
}
.auth-backdrop { position: absolute; inset: 0; z-index: 0; }
.beam {
  position: absolute; width: 60vw; height: 60vw; border-radius: 50%;
  filter: blur(90px); opacity: 0.16;
}
.beam-a { background: var(--accent); top: -20%; left: -10%; }
.beam-b { background: var(--info); bottom: -25%; right: -10%; opacity: 0.10; }

/* Holofote: uma luz varrendo lentamente o palco de acesso, como um refletor
   de teatro sobre o crachá — a assinatura visual da tela de login. */
.spotlight {
  position: absolute; top: -30%; left: 50%; width: 140%; height: 160%;
  background: conic-gradient(from 200deg at 50% 0%, transparent 0deg, rgba(255,255,255,0.05) 8deg, transparent 26deg);
  transform-origin: 50% 0%;
  animation: sweep 9s ease-in-out infinite;
  pointer-events: none;
}
@keyframes sweep {
  0%, 100% { transform: translateX(-50%) rotate(-14deg); }
  50% { transform: translateX(-50%) rotate(14deg); }
}
@keyframes beam-drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.16; }
  50% { transform: translate(4%, 3%) scale(1.08); opacity: 0.22; }
}
@keyframes beam-drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.10; }
  50% { transform: translate(-3%, -4%) scale(1.05); opacity: 0.15; }
}
.beam-a { animation: beam-drift-a 12s ease-in-out infinite; }
.beam-b { animation: beam-drift-b 14s ease-in-out infinite; }

/* Marca d'água da deusa — presença discreta ao fundo da tela de acesso,
   como se ela observasse de longe. Usa mix-blend-mode pra só o traço
   dourado aparecer contra o fundo escuro, sem caixa visível. */
.auth-watermark {
  position: absolute; bottom: -14%; right: -10%; width: 720px; height: 720px;
  background-image: url('/logo-watermark.png');
  background-size: contain; background-position: center; background-repeat: no-repeat;
  -webkit-mask-image: radial-gradient(circle, black 34%, transparent 64%);
  mask-image: radial-gradient(circle, black 34%, transparent 64%);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  opacity: 0.12; mix-blend-mode: screen; pointer-events: none;
  animation: goddess-breathe-corner 8s ease-in-out infinite;
}
@keyframes goddess-breathe-corner {
  0%, 100% { transform: scale(0.94); opacity: 0.1; }
  50% { transform: scale(1); opacity: 0.15; }
}
@keyframes goddess-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.06; }
  50% { transform: translate(-50%, -50%) scale(0.96); opacity: 0.1; }
}

/* Transição de entrada — a deusa "se aproxima" no instante em que a pessoa
   entra no sistema (login/criação de conta bem-sucedidos), como se
   surgisse do fundo do palco antes da cortina abrir para o painel. */
.entry-transition {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.entry-transition.hidden { display: none; }
.entry-transition__goddess {
  width: 210px; height: 210px; opacity: 0;
  -webkit-mask-image: radial-gradient(circle, black 46%, transparent 72%);
  mask-image: radial-gradient(circle, black 46%, transparent 72%);
  filter: drop-shadow(0 0 30px rgba(201,162,39,0.6));
  animation: goddess-approach 0.85s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes goddess-approach {
  0% { transform: scale(0.4); opacity: 0; }
  35% { opacity: 1; }
  68% { transform: scale(1.35); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

.pass-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 400px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  padding: 28px 26px 20px;
  animation: card-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes card-rise {
  from { opacity: 0; transform: translateY(22px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.pass-card__stub {
  position: absolute; top: -13px; left: 24px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em;
  padding: 5px 10px; border-radius: 999px;
  display: flex; align-items: center; gap: 6px;
}
.pass-card__dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-ink);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.pass-card__head { margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand__mark--img {
  width: 36px; height: 36px; border-radius: 10px; object-fit: cover;
  background: #0A0908; border: 1px solid var(--border); padding: 0;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__text strong { font-family: var(--font-display); font-size: 16px; letter-spacing: 0.015em; font-weight: 600; }
.brand__text small { color: var(--text-dim); font-size: 11.5px; font-family: var(--font-mono); letter-spacing: 0.02em; }

.auth-loading { display: flex; align-items: center; gap: 10px; padding: 30px 0; color: var(--text-dim); font-size: 13.5px; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-form h1 { font-family: var(--font-display); font-size: 25px; margin: 0 0 4px; letter-spacing: 0.01em; font-weight: 600; }
.auth-sub { color: var(--text-dim); font-size: 15px; margin: 0 0 18px; line-height: 1.5; font-family: var(--font-accent); font-style: italic; font-weight: 500; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field span { font-size: 12.5px; color: var(--text-dim); font-weight: 500; }
.field input, .field select, .field textarea {
  background: var(--bg-raised); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 14px; font-family: var(--font-body);
  transition: border-color 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent); outline: none;
}
.field textarea { resize: vertical; min-height: 64px; }

.field-error {
  color: var(--danger); font-size: 12.5px; min-height: 16px; margin: -2px 0 10px;
}
.field-error:empty { display: none; }

.field-hint {
  color: var(--text-faint); font-size: 12px; line-height: 1.5; margin: -6px 0 14px;
}

.btn {
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: transform 0.08s ease, opacity 0.15s ease, background 0.15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--block { width: 100%; }
.btn--primary { background: var(--accent); color: var(--accent-ink); transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.15s ease; }
.btn--primary:hover:not(:disabled) { opacity: 0.94; box-shadow: 0 6px 20px -6px rgba(201,162,39,0.6); }
.btn--primary:active:not(:disabled) { transform: scale(0.97); }
.btn--ghost { background: transparent; color: var(--text-dim); border-color: var(--border); margin-top: 8px; }
.btn--ghost:hover { color: var(--text); border-color: var(--text-faint); }
.btn--danger { background: var(--danger-soft); color: var(--danger); }
.btn--danger:hover { background: rgba(255,92,92,0.24); }
.btn--sm { padding: 6px 10px; font-size: 12.5px; }

.link-btn {
  background: none; border: none; color: var(--text-faint); font-size: 12.5px;
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--text-dim); }

.pass-card__foot { margin-top: 14px; text-align: center; }

/* ---------------- app shell ---------------- */
.app-screen { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; position: relative; overflow-x: clip; }

/* Marca d'água da deusa no painel principal — gigante e centralizada,
   sangrando pra fora dos dois lados da tela (sem borda visível), como uma
   presença observando por trás de tudo. */
.app-watermark {
  position: fixed; bottom: -14%; right: -10%; width: 720px; height: 720px;
  background-image: url('/logo-watermark.png');
  background-size: contain; background-position: center; background-repeat: no-repeat;
  -webkit-mask-image: radial-gradient(circle, black 34%, transparent 64%);
  mask-image: radial-gradient(circle, black 34%, transparent 64%);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  opacity: 0.12; mix-blend-mode: screen; pointer-events: none; z-index: 0;
  animation: goddess-breathe-corner 11s ease-in-out infinite;
}
@media (max-width: 860px) {
  .app-watermark { display: none; }
}

.sidebar {
  background: var(--bg-raised); border-right: 1px solid var(--border-soft);
  display: flex; flex-direction: column; padding: 18px 14px;
  position: sticky; top: 0; height: 100vh; z-index: 1;
}
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 20px; }
.sidebar__nav { display: flex; flex-direction: column; gap: 3px; flex: 1; margin-top: 8px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  background: none; border: none; color: var(--text-dim);
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; text-align: left; cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, padding-left 0.18s ease;
}
.nav-item__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); transition: background 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.nav-item:hover { background: var(--surface-2); color: var(--text); transform: translateX(2px); }
.nav-item.active { background: var(--accent-soft); color: var(--accent-text); animation: nav-settle 0.3s ease; }
.nav-item.active .nav-item__dot { background: var(--accent); transform: scale(1.4); }
@keyframes nav-settle {
  from { background: transparent; }
  to { background: var(--accent-soft); }
}

.sidebar__user {
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--border-soft); padding-top: 14px; margin-top: 10px;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 13px; flex-shrink: 0;
}
.sidebar__user-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sidebar__user-info strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__user-info small { font-size: 11px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  background: none; border: 1px solid var(--border); color: var(--text-dim);
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 13px;
  flex-shrink: 0;
}
.icon-btn:hover { color: var(--danger); border-color: var(--danger); }

.content { padding: 28px 34px 60px; max-width: 1180px; min-width: 0; position: relative; z-index: 1; }
@keyframes view-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.content.view-enter { animation: view-enter 0.32s cubic-bezier(0.16, 1, 0.3, 1) both; }

.view-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 22px; gap: 16px; flex-wrap: wrap;
}
.view-head h1 { font-family: var(--font-display); font-size: 27px; margin: 0 0 4px; letter-spacing: 0.01em; font-weight: 600; }
.view-head p { color: var(--text-dim); font-size: 15px; margin: 0; font-family: var(--font-accent); font-style: italic; font-weight: 500; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.search-input {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 9px 12px; border-radius: var(--radius-sm); font-size: 13.5px; min-width: 220px;
}
.search-input:focus { outline: none; border-color: var(--accent); }
.chip-select {
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  padding: 9px 12px; border-radius: var(--radius-sm); font-size: 13.5px;
}

/* ---------------- estados ---------------- */
.empty-state {
  border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 46px 28px; text-align: center; color: var(--text-dim);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  animation: rise-to-stage 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.empty-state__icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 4px;
  animation: float-icon 3s ease-in-out infinite;
}
@keyframes float-icon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.empty-state h3 { margin: 0; color: var(--text); font-family: var(--font-display); font-size: 16px; }
.empty-state p { margin: 0; font-size: 13px; max-width: 340px; }

.error-state {
  border: 1px solid var(--danger); background: var(--danger-soft);
  border-radius: var(--radius); padding: 18px 20px; color: var(--danger); font-size: 13.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px;
}

.skeleton-row {
  height: 64px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; margin-bottom: 10px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------------- grupos de contas (call sheet) ---------------- */
.model-group { margin-bottom: 26px; }
.model-group__head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border-soft);
}
.model-group__head h2 { font-family: var(--font-accent); font-style: italic; font-size: 21px; margin: 0; letter-spacing: 0; font-weight: 600; }
.model-group__count { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }

.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }

/* Cortina revelando: cada cartão "sobe ao palco" em sequência, como atores
   entrando um a um — o momento de assinatura da tela de Contas. */
@keyframes rise-to-stage {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.account-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
  animation: rise-to-stage 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.account-grid .account-card:nth-child(1) { animation-delay: 0.02s; }
.account-grid .account-card:nth-child(2) { animation-delay: 0.07s; }
.account-grid .account-card:nth-child(3) { animation-delay: 0.12s; }
.account-grid .account-card:nth-child(4) { animation-delay: 0.17s; }
.account-grid .account-card:nth-child(n+5) { animation-delay: 0.2s; }
.account-card:hover {
  border-color: var(--surface-3);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgba(0,0,0,0.5);
}

.account-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.platform-tag {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 999px; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 5px;
}
.platform-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.platform-tag--privacy { background: rgba(255,111,168,0.14); color: var(--privacy); }
.platform-tag--privacy::before { background: var(--privacy); }
.platform-tag--telegram { background: rgba(111,168,255,0.14); color: var(--telegram); }
.platform-tag--telegram::before { background: var(--telegram); }
.platform-tag--outro { background: rgba(183,156,255,0.14); color: var(--outro); }
.platform-tag--outro::before { background: var(--outro); }

.restricted-badge {
  font-size: 10.5px; color: var(--text-faint); font-family: var(--font-mono);
  display: flex; align-items: center; gap: 4px;
}

.account-card__label { font-size: 14.5px; font-weight: 600; }
.account-card__hint { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); word-break: break-all; }
.account-card__notes { font-size: 12.5px; color: var(--text-dim); line-height: 1.4; }

.star-btn {
  background: none; border: none; color: var(--text-faint); font-size: 16px; cursor: pointer;
  line-height: 1; padding: 2px; transition: color 0.15s ease, transform 0.15s ease;
}
.star-btn:hover { color: var(--accent-text); transform: scale(1.15); }
.star-btn--active { color: var(--accent); }

.copy-inline-btn {
  background: none; border: none; color: var(--text-faint); cursor: pointer;
  font-size: 12px; padding: 0 0 0 4px; vertical-align: middle;
}
.copy-inline-btn:hover { color: var(--accent-text); }

.tag-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-pill {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim);
  background: var(--surface-2); border: 1px solid var(--border); padding: 2px 7px; border-radius: 999px;
}

.idle-warning {
  font-size: 11.5px; color: var(--text-faint); font-family: var(--font-mono);
}

.overview-strip { display: flex; gap: 8px; flex-wrap: wrap; margin: -8px 0 20px; }
.overview-chip {
  font-size: 12px; color: var(--text-dim); background: var(--surface); border: 1px solid var(--border);
  padding: 5px 10px; border-radius: 999px;
}
.overview-chip--warn { color: var(--accent-text); border-color: var(--accent-soft); }

.quick-search-results { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow-y: auto; }
.quick-search-item {
  display: flex; align-items: center; gap: 10px; text-align: left;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 13.5px; color: var(--text); cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.quick-search-item:hover { border-color: var(--accent); background: var(--surface-2); }

.ranking-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px; }
.ranking-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.ranking-card h3 { font-family: var(--font-display); font-size: 15px; margin: 0 0 10px; font-weight: 600; }
.ranking-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--border-soft); }
.ranking-item:last-child { border-bottom: none; }
.ranking-pos { font-family: var(--font-mono); color: var(--text-faint); font-size: 11.5px; width: 20px; flex-shrink: 0; }
.ranking-name { flex: 1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-count { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); flex-shrink: 0; }
@media (max-width: 860px) {
  .ranking-row { grid-template-columns: 1fr; }
}

.usage-chart { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 24px; }
.usage-chart h3 { font-family: var(--font-display); font-size: 15px; margin: 0 0 16px; font-weight: 600; }
.usage-bar-row { display: grid; grid-template-columns: 110px 1fr 30px; align-items: center; gap: 12px; margin-bottom: 10px; }
.usage-bar-label { font-size: 12.5px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-bar-track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.usage-bar-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-text));
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.usage-bar-count { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); text-align: right; }
@media (max-width: 860px) {
  .usage-bar-row { grid-template-columns: 80px 1fr 26px; gap: 8px; }
  .usage-bar-label { font-size: 11.5px; }
}

.account-card__actions { display: flex; gap: 8px; margin-top: 2px; }
.btn-open {
  flex: 1; background: var(--accent); color: var(--accent-ink); border: none;
  border-radius: var(--radius-sm); padding: 9px 12px; font-weight: 700; font-size: 13px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, opacity 0.15s ease;
}
.btn-open:hover { opacity: 0.95; box-shadow: 0 6px 18px -4px rgba(201,162,39,0.55); }
.btn-open:active { transform: scale(0.97); }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-ink);
  animation: pulse 1.4s ease-in-out infinite;
}
.icon-only-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--surface-2);
  border: 1px solid var(--border); color: var(--text-dim); cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-only-btn:hover { color: var(--text); border-color: var(--text-faint); }

/* ---------------- tabelas (equipe / atividade / modelos) ---------------- */
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .data-table { min-width: 720px; }
.data-table th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-faint); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--border-soft);
  background: var(--bg-raised);
}
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border-soft); font-size: 13.5px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.03); transition: background 0.15s ease; }
.data-table tbody tr {
  animation: rise-to-stage 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.data-table tbody tr:nth-child(1) { animation-delay: 0.01s; }
.data-table tbody tr:nth-child(2) { animation-delay: 0.05s; }
.data-table tbody tr:nth-child(3) { animation-delay: 0.09s; }
.data-table tbody tr:nth-child(n+4) { animation-delay: 0.12s; }

.status-pill {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; font-family: var(--font-mono);
}
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-pill--ativo { background: var(--ok-soft); color: var(--ok); }
.status-pill--ativo::before { background: var(--ok); }
.status-pill--convidado { background: var(--info-soft); color: var(--info); }
.status-pill--convidado::before { background: var(--info); }
.status-pill--revogado { background: var(--danger-soft); color: var(--danger); }
.status-pill--revogado::before { background: var(--danger); }

.online-summary {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  color: var(--ok); font-family: var(--font-mono); margin-left: 8px;
}
.presence { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-dim); }
.presence-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.presence-dot--on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); animation: pulse 1.6s ease-in-out infinite; }
.presence-dot--off { background: var(--text-faint); }

.role-pill {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
  background: var(--surface-2); padding: 3px 8px; border-radius: 6px; text-transform: uppercase;
}

.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.model-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 8px; }
.model-row__name { font-weight: 600; font-size: 14px; }
.model-row__meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-faint); }

/* ---------------- atividade (timeline) ---------------- */
.activity-item {
  display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-soft);
  animation: rise-to-stage 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.activity-item:nth-child(1) { animation-delay: 0.01s; }
.activity-item:nth-child(2) { animation-delay: 0.04s; }
.activity-item:nth-child(3) { animation-delay: 0.07s; }
.activity-item:nth-child(n+4) { animation-delay: 0.1s; }
.activity-item:last-child { border-bottom: none; }
.activity-item__dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--surface-3);
  margin-top: 6px; flex-shrink: 0;
}
.activity-item__dot--login, .activity-item__dot--logout { background: var(--info); }
.activity-item__dot--abriu_conta { background: var(--accent); }
.activity-item__dot--convidou, .activity-item__dot--reativou, .activity-item__dot--criou_conta, .activity-item__dot--criou_modelo { background: var(--ok); }
.activity-item__dot--editou_conta { background: var(--info); }
.activity-item__dot--editou_permissoes { background: var(--info); }
.activity-item__dot--revogou, .activity-item__dot--excluiu_conta, .activity-item__dot--excluiu_modelo { background: var(--danger); }
.activity-item__body { font-size: 13.5px; line-height: 1.5; }
.activity-item__body b { font-weight: 600; }
.activity-item__time { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-top: 2px; }

/* ---------------- modal ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5,6,8,0.72); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 500; padding: 20px;
  animation: backdrop-in 0.2s ease both;
}
.modal-backdrop.closing { animation: backdrop-out 0.16s ease both; }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-out { from { opacity: 1; } to { opacity: 0; } }
.modal {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  width: 100%; max-width: 460px; padding: 24px; box-shadow: var(--shadow-lift);
  max-height: 88vh; overflow-y: auto;
  animation: modal-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.modal-backdrop.closing .modal { animation: modal-out 0.16s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes modal-out { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(0.97); } }
.modal h2 { font-family: var(--font-display); font-size: 20px; margin: 0 0 4px; letter-spacing: 0.01em; font-weight: 600; }
.modal .modal-sub { color: var(--text-dim); font-size: 14px; margin: 0 0 18px; font-family: var(--font-accent); font-style: italic; font-weight: 500; }
.modal-actions { display: flex; gap: 10px; margin-top: 6px; }
.modal-actions .btn { flex: 1; }

.checkbox-list { display: flex; flex-direction: column; gap: 8px; max-height: 160px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px; background: var(--bg-raised); }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }

.radio-toggle { display: flex; gap: 8px; }
.radio-toggle label {
  flex: 1; text-align: center; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 12.5px; cursor: pointer; color: var(--text-dim);
}
.radio-toggle input { display: none; }
.radio-toggle input:checked + span { color: var(--accent-text); }
.radio-toggle label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* ---------------- responsivo ---------------- */
@media (max-width: 860px) {
  .app-screen { grid-template-columns: 1fr; }
  .sidebar { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; width: 100%;
    flex-direction: row; align-items: center; padding: 8px 12px; border-right: none; border-top: 1px solid var(--border-soft); z-index: 100; }
  .sidebar__brand { display: none; }
  .sidebar__nav { flex-direction: row; flex: 1; justify-content: space-around; margin-top: 0; }
  .nav-item { flex-direction: column; font-size: 10.5px; gap: 4px; padding: 6px 8px; }
  .sidebar__user { border-top: none; padding-top: 0; margin-top: 0; }
  .sidebar__user-info { display: none; }
  .content { padding: 20px 16px 100px; }
  .table-scroll { position: relative; border-radius: var(--radius); box-shadow: inset -18px 0 14px -14px rgba(0,0,0,0.55); }
  .view-head { flex-direction: column; align-items: flex-start; }
}
