.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.premium-command-status .premium-spin { width:15px; height:15px; vertical-align:-3px; animation:premium-spin 900ms linear infinite; }
.premium-command-chat { display:grid; gap:8px; margin-top:12px; padding:10px; border:1px solid rgba(255,255,255,.08); border-radius:10px; }
.premium-command-card, .premium-command-chat, .premium-source-details { min-width:0; max-width:100%; box-sizing:border-box; }
.premium-command-list { display:grid; gap:8px; }
.premium-command-item { border:1px solid rgba(255,255,255,.1); border-radius:10px; overflow:hidden; background:rgba(255,255,255,.02); }
.premium-command-item > summary { display:flex; align-items:center; gap:8px; padding:12px 14px; cursor:pointer; list-style:none; font-weight:600; }
.premium-command-item > summary::-webkit-details-marker { display:none; }
.premium-command-item > summary > svg { width:15px; height:15px; transition:transform .18s ease; }
.premium-command-item[open] > summary > svg { transform:rotate(90deg); }
.premium-command-name { flex:1; font-family:ui-monospace,monospace; }
.premium-command-item > .premium-command-card { border:0; border-top:1px solid rgba(255,255,255,.08); border-radius:0; }
.premium-command-chat .flex { min-width:0; width:100%; }
.premium-command-chat [data-command-chat-input] { flex:1 1 auto; width:0; min-width:0; box-sizing:border-box; }
.premium-command-chat [data-action="premium-command-chat-send"] { flex:0 0 auto; white-space:nowrap; }
.premium-chat-messages { display:grid; gap:7px; max-height:240px; overflow:auto; }
.chat-preview { display:flex; flex-direction:column; align-items:flex-start; gap:7px; }
.chat-bubble { display:inline-block; max-width:90%; padding:9px 12px; border-radius:5px 13px 13px 13px; background:#d9fdd3; color:#182018; white-space:pre-wrap; overflow-wrap:anywhere; }
.chat-bubble.user { align-self:flex-end; background:#d1e7ff; }
.premium-source-details { margin-top:10px; border:1px solid rgba(255,255,255,.1); border-radius:9px; overflow:hidden; background:#0d1016; }
.premium-source-details summary { cursor:pointer; padding:10px 12px; color:#cbd5e1; font-weight:600; user-select:none; list-style:none; }
.premium-source-details summary::-webkit-details-marker { display:none; }
.premium-source-details summary svg { width:14px; height:14px; vertical-align:-2px; transition:transform .18s ease; }
.premium-source-details[open] summary svg { transform:rotate(90deg); }
.premium-source-code { margin:0; padding:16px; max-height:480px; overflow:auto; color:#dbe5f5; background:#0a0d12; font:13px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace; tab-size:2; white-space:pre; }
.premium-source-editor { display:block; width:100%; min-height:320px; box-sizing:border-box; resize:vertical; border:0; outline:0; padding:16px; color:#dbe5f5; background:#0a0d12; font:13px/1.65 ui-monospace,SFMono-Regular,Consolas,monospace; tab-size:2; white-space:pre; overflow:auto; }
.premium-source-code .code-keyword { color:#c586c0; }
.premium-source-code .code-string { color:#ce9178; }
.premium-source-code .code-number { color:#b5cea8; }
.premium-source-code .code-comment { color:#6a9955; font-style:italic; }
@media (max-width:600px) {
  .premium-command-chat .flex { flex-wrap:wrap; }
  .premium-command-chat [data-command-chat-input] { flex-basis:100%; width:100%; }
  .premium-command-chat [data-action="premium-command-chat-send"] { width:100%; justify-content:center; }
  .premium-source-code { max-width:100%; font-size:11px; }
}
.premium-command-status.is-loading { display:flex; align-items:center; gap:7px; animation:premium-status-pulse 1s ease-in-out infinite; }
@keyframes premium-spin { to { transform:rotate(360deg); } }
@keyframes premium-status-pulse { 50% { opacity:.45; } }

/* Grupos de tarjetas del dashboard: "Total del servidor" y "Tu cuenta". */
.stats-group {
  margin-bottom: 2px;
}

.stats-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
}

.stats-group-head b {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}

.stats-group-head span {
  font-size: 12px;
  color: var(--muted-2);
}

.stats-group .stats-row {
  margin-top: 10px;
}

/* Tutorial de vinculación: simulación CSS ligera, sin vídeo ni imágenes externas. */
.link-tutorial { min-height: 360px; }
.link-tutorial-scene { display:grid; grid-template-columns:minmax(0,1fr) 255px; align-items:center; gap:28px; min-height:345px; padding:8px 12px 2px; overflow:hidden; }
.link-tutorial-copy { padding:16px 0; }
.tutorial-eyebrow { color:var(--accent); font-size:10px; font-weight:750; letter-spacing:.13em; }
.link-tutorial-copy h4 { margin:10px 0 8px; font-size:23px; letter-spacing:-.02em; }
.link-tutorial-copy p { max-width:430px; color:var(--muted); font-size:13px; line-height:1.7; margin:0; }
.tutorial-route { display:flex; align-items:center; gap:9px; margin-top:20px; padding:10px 12px; border:1px solid var(--accent-line); border-radius:9px; width:max-content; max-width:100%; color:var(--text-2); font-size:11px; }
.tutorial-route svg { width:15px; color:var(--accent); flex:none; }
.tutorial-phone { position:relative; width:220px; height:370px; margin:auto; border:5px solid #26313d; border-radius:29px; background:#111b21; box-shadow:0 20px 45px rgba(0,0,0,.35),0 0 0 1px rgba(255,255,255,.08); overflow:hidden; color:#e9edef; font-family:Arial,sans-serif; animation:tutorial-phone-in .35s ease both; }
.tutorial-phone-top { height:22px; padding:7px 12px 0; display:flex; justify-content:space-between; font-size:8px; color:#b8c9cf; position:relative; }
.tutorial-phone-notch { position:absolute; top:0; left:50%; transform:translateX(-50%); width:75px; height:14px; border-radius:0 0 10px 10px; background:#26313d; }
.tutorial-wa-appbar { display:flex; align-items:center; justify-content:space-between; padding:12px 13px; background:#202c33; color:#e9edef; font-size:13px; }
.tutorial-wa-content { min-height:273px; padding:14px 9px; background:#111b21; }
.tutorial-wa-title { font-size:15px; font-weight:700; padding:3px 6px 15px; }
.tutorial-wa-row,.tutorial-wa-device { display:flex; align-items:center; gap:9px; padding:12px 7px; border-radius:9px; position:relative; }
.tutorial-wa-row b,.tutorial-wa-device b { display:block; font-size:10px; }.tutorial-wa-row small,.tutorial-wa-device small { display:block; color:#91a5ad; font-size:8px; margin-top:4px; }
.tutorial-wa-focus { background:rgba(0,168,132,.18); outline:1px solid rgba(0,168,132,.55); animation:tutorial-pulse 1.8s ease-in-out infinite; }
.tutorial-wa-avatar { width:28px; height:28px; display:grid; place-items:center; flex:none; border-radius:50%; background:#64727b; color:#fff; font-size:12px; }.tutorial-wa-avatar.green { background:#00a884; }.tutorial-wa-avatar.blue { background:#3b82f6; }
.tutorial-wa-chevron { margin-left:auto; color:#8da1a8; font-size:20px; }.tutorial-wa-live { width:7px; height:7px; margin-left:auto; border-radius:50%; background:#00e676; box-shadow:0 0 0 4px rgba(0,230,118,.13); }
.tutorial-wa-link { display:flex; gap:11px; align-items:center; margin-top:13px; padding:13px 8px; color:#00a884; font-size:10px; }.tutorial-wa-link span { font-size:20px; }.tutorial-wa-hint { margin:18px 7px; color:#8696a0; font-size:8px; line-height:1.55; text-align:center; }
.tutorial-wa-demo-label { margin:0 7px 10px; padding:6px 7px; border:1px solid rgba(255,193,7,.65); border-radius:5px; background:rgba(255,193,7,.12); color:#ffd666; font-size:7px; font-weight:800; letter-spacing:.04em; text-align:center; }
.tutorial-wa-code-label { color:#aebac1; font-size:9px; text-align:center; padding:2px 10px 8px; }.tutorial-wa-code { display:block; width:max-content; margin:4px auto 15px; padding:10px 13px; border-bottom:2px solid #00a884; color:#00a884; font-size:20px; font-weight:800; letter-spacing:.16em; }
.tutorial-wa-bottom { height:42px; display:flex; justify-content:space-around; padding-top:7px; background:#202c33; color:#8696a0; text-align:center; font-size:13px; }.tutorial-wa-bottom small { display:block; font-size:7px; margin-top:3px; }
.tutorial-progress { display:flex; gap:6px; justify-content:center; padding:8px 0 0; }.tutorial-progress span { width:28px; height:3px; border-radius:9px; background:var(--line); transition:background .2s ease,width .2s ease; }.tutorial-progress span.is-active { width:42px; background:var(--accent); }
@keyframes tutorial-phone-in { from { opacity:0; transform:translateY(10px) rotate(2deg); } to { opacity:1; transform:none; } }
@keyframes tutorial-pulse { 50% { box-shadow:0 0 0 4px rgba(0,230,118,.06); } }
@media (max-width:700px) { .link-tutorial-scene { grid-template-columns:1fr 190px; gap:12px; }.tutorial-phone { transform:scale(.84); transform-origin:center; margin:-28px auto; }.link-tutorial-copy h4 { font-size:18px; } }
@media (max-width:520px) { .link-tutorial-scene { grid-template-columns:1fr; min-height:0; text-align:center; }.link-tutorial-copy { padding-bottom:0; }.link-tutorial-copy p { margin:auto; }.tutorial-route { margin:14px auto 0; }.tutorial-phone { width:205px; height:340px; transform:none; }.tutorial-wa-content { min-height:244px; }.tutorial-phone { margin:0 auto; } }
.dashboard-account-group .stats-row .stat:first-child { border-color: var(--accent-line); box-shadow: 0 0 0 1px var(--accent-soft) inset; }
.dashboard-server-group { margin-top: 4px; }
.dashboard-server-group .stats-row { gap: 8px; }
.dashboard-server-group .stat { padding: 12px 13px; background: var(--bg-soft); }
.dashboard-server-group .stat-value { font-size: 21px; }

/* Contenedor de badges en el topbar (solo se muestra cuando hay datos) */
.stat-badge-skeleton-box {
  display: none;
  gap: 10px;
  align-items: center;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.table th {
  text-align: left;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

/* ── Sala de comentarios ─────────────────────────────────────────────────── */
.comments-page { width: 100%; max-width: 1180px; margin: 0 auto; }
.comments-card { overflow: hidden; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.comments-list { min-height: 420px; max-height: min(68vh, 720px); overflow-y: auto; padding: 8px clamp(18px, 5vw, 64px); display: flex; flex-direction: column; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; }
.comment-row { display: flex; align-items: flex-start; gap: 13px; width: 100%; padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.comment-row:last-child { border-bottom: 0; }
.comment-row:hover { background: linear-gradient(90deg, rgba(255,255,255,.025), transparent 85%); }
.comment-avatar { flex: 0 0 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; font-size: 11px; font-weight: 750; }
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.comment-bubble { position: relative; flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; }
.comment-meta { display: flex; align-items: center; gap: 8px; min-height: 24px; margin-bottom: 7px; color: var(--muted-2); font-size: 11px; }
.comment-meta b { color: var(--text); font-size: 12px; }
.comment-verified { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 5px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; vertical-align: -1px; }
.comment-menu { margin-left: auto; }
.comment-menu .icon-btn { color: var(--muted-2); font-size: 15px; letter-spacing: 2px; }
.comment-text { white-space: normal; overflow-wrap: anywhere; color: var(--text); font-size: 14px; line-height: 1.5; }
.comment-image-button { display: block; max-width: min(340px, 100%); margin: 8px 0 0; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: transparent; cursor: zoom-in; }
.comment-image { display: block; max-width: 100%; max-height: 300px; border-radius: 10px; object-fit: cover; transition: transform .18s ease, filter .18s ease; }
.comment-image-button:hover .comment-image { transform: scale(1.025); filter: brightness(1.08); }
.comment-actions { margin-top: 8px; opacity: .7; }
.comment-actions .btn { padding: 2px 5px; font-size: 10px; }
.comment-actions svg { width: 12px; height: 12px; }
.comment-reply-context { display: grid; gap: 2px; margin: 0 0 9px; padding: 8px 10px; border-left: 2px solid var(--accent); background: rgba(255,255,255,.035); font-size: 10px; color: var(--muted-2); }
.comment-reply-context span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comment-deleted { color: var(--muted-2); font-style: italic; font-size: 12px; }
.comment-moderation { position: absolute; z-index: 2; right: 10px; top: 35px; min-width: 165px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.comment-moderation[hidden] { display: none; }
.comment-moderation button { display: flex; align-items: center; gap: 7px; width: 100%; padding: 8px; border: 0; border-radius: 6px; background: none; color: var(--text); text-align: left; cursor: pointer; font-size: 12px; }
.comment-moderation button:hover { background: var(--bg-soft); color: var(--accent); }
.comment-moderation svg { width: 14px; height: 14px; }
.comment-composer { padding: 18px clamp(18px, 5vw, 64px); border-top: 1px solid var(--line); background: var(--bg-soft); }
.comment-composer textarea { display: block; width: 100%; min-height: 48px; resize: vertical; color: var(--text); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: none; color-scheme: dark; }
.comment-composer textarea::placeholder { color: var(--muted-2); }
.comment-composer textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); }
.composer-tools { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.composer-tools button { margin-left: auto; }
.replying { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding: 7px 10px; border-left: 2px solid var(--accent); color: var(--muted-2); font-size: 12px; }
.comments-locked { display: flex; align-items: center; gap: 13px; padding: 17px 20px; border-top: 1px solid var(--line); background: var(--bg-soft); color: var(--muted-2); }
.comments-locked svg { flex: 0 0 20px; color: var(--accent); }
.comments-locked div { display: grid; gap: 3px; flex: 1; }
.comments-locked b { color: var(--text); font-size: 13px; }
.comments-locked span { font-size: 12px; }
.comments-locked.danger svg { color: var(--danger); }
.comments-empty { display: grid; justify-items: center; align-content: center; flex: 1; min-height: 360px; gap: 8px; color: var(--muted-2); }
.comments-empty svg { width: 42px; height: 42px; margin-bottom: 8px; color: var(--accent); opacity: .8; }
.comments-empty b { color: var(--text); }
.comment-image-preview { display: grid; place-items: center; min-height: 220px; padding: 6px; background: var(--bg); border-radius: var(--radius); }
.comment-image-preview img { display: block; max-width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--radius-sm); }
@media (max-width: 640px) { .comment-row { max-width: 94%; } .comments-list { padding: 18px 10px; } .comments-locked { align-items: flex-start; flex-wrap: wrap; } .comments-locked .btn { margin-left: 33px; } }

.account-profile-photo { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.account-photo-preview { width: 72px; height: 72px; flex: 0 0 72px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--accent-line); border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 22px; font-weight: 750; }
.account-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.account-photo-copy { display: grid; gap: 5px; min-width: 0; }
.account-photo-copy > span { color: var(--muted-2); font-size: 11px; }
.account-photo-copy form { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 5px; }
.account-photo-status { width: 100%; color: var(--muted-2); font-size: 11px; line-height: 1.4; }
.account-photo-copy button:disabled { opacity: .55; cursor: not-allowed; }
.user-avatar { overflow: hidden; padding: 0; }
.user-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) { .account-profile-photo { align-items: flex-start; } .account-photo-copy form { flex-direction: column; align-items: flex-start; } }

.cell-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.cell-title {
  font-weight: 570;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-sub {
  font-size: 11.5px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.row-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  flex: none;
}

.row-icon svg {
  width: 16px;
  height: 16px;
}

.row-icon.green {
  color: var(--success);
  background: var(--success-soft);
  border-color: rgba(52, 196, 139, 0.24);
}

.row-icon.amber {
  color: var(--warn);
  background: var(--warn-soft);
  border-color: rgba(227, 174, 60, 0.24);
}

.row-icon.red {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: rgba(239, 77, 77, 0.24);
}

.row-icon.cyan {
  color: var(--info);
  background: var(--info-soft);
  border-color: rgba(74, 166, 240, 0.24);
}

.row-icon.accent {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(232, 69, 60, 0.24);
}

.row-icon.violet {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.24);
}

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

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 560;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-2);
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.badge svg {
  width: 12px;
  height: 12px;
  flex: none;
}

.pain-rank-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex: none;
}

.pain-rank-icon svg {
  width: 13px;
  height: 13px;
}

/* ── Rendimiento en vivo (Servidores) ───────────────────────────────────── */
.pain-net-head {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.pain-server-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pain-perf-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pain-net-main {
  flex: 1 1 260px;
  min-width: 0;
}

.pain-net-note {
  flex: 0 1 230px;
  min-width: 0;
  line-height: 1.45;
}

.pain-rank-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.pain-rank {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  min-width: 0;
}

.pain-rank-main {
  min-width: 0;
}

.pain-rank-name {
  font-weight: 650;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pain-rank-meta {
  margin-top: 1px;
  white-space: nowrap;
}

.pain-perf {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  min-width: 0;
}

.pain-perf-ring {
  position: relative;
  width: 62px;
  height: 62px;
  flex: none;
  color: var(--pain-perf-color, currentColor);
}

.pain-perf-svg {
  width: 62px;
  height: 62px;
  transform: rotate(-90deg);
}

.pain-perf-score {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
}

.pain-perf-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.pain-perf-title {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-weight: 700;
  line-height: 1.3;
}

.pain-perf-state {
  min-width: 0;
}

.pain-perf-stale {
  display: none;
  font-size: 10.5px;
  font-weight: 600;
  color: #f0cd7d;
  background: var(--warn-soft);
  border: 1px solid rgba(227, 174, 60, 0.24);
  border-radius: 999px;
  padding: 1px 7px;
  white-space: nowrap;
}

.pain-perf.is-stale .pain-perf-stale {
  display: inline-flex;
}

.pain-perf.is-stale .pain-perf-metrics,
.pain-perf.is-stale .pain-perf-footer {
  opacity: 0.55;
}

.pain-perf-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.pain-metric {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.pain-metric svg {
  width: 13px;
  height: 13px;
  color: var(--muted);
  flex: none;
}

.pain-metric-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.pain-metric-label {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.pain-metric-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pain-perf-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 7px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.4;
}

.pain-foot-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.pain-foot-item svg {
  width: 11px;
  height: 11px;
  flex: none;
}

.pain-foot-item b {
  color: var(--text-2);
  font-weight: 600;
}

@media (max-width: 720px) {
  .pain-net-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px 12px;
  }

  .pain-net-main {
    grid-column: 2;
  }

  .pain-net-note {
    grid-column: 1 / -1;
    max-width: none;
  }
}

@media (max-width: 560px) {
  .pain-rank-list {
    grid-template-columns: 1fr;
  }

  .pain-server-head {
    flex-wrap: wrap;
  }

  .pain-server-head .cell-main {
    flex: 1 1 100%;
    min-width: 0;
  }

  .pain-server-head .cell-title {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.3;
  }

  .pain-server-badges {
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .pain-perf {
    gap: 9px;
    align-items: flex-start;
  }

  .pain-perf-ring,
  .pain-perf-svg {
    width: 54px;
    height: 54px;
  }

  .pain-perf-score {
    font-size: 15px;
  }

  .pain-metric {
    padding: 5px 6px;
  }
}

.badge.success {
  background: var(--success-soft);
  border-color: rgba(52, 196, 139, 0.26);
  color: #74dfb2;
}

.badge.info {
  background: var(--info-soft);
  border-color: rgba(74, 166, 240, 0.26);
  color: #93c9f7;
}

.badge.warn {
  background: var(--warn-soft);
  border-color: rgba(227, 174, 60, 0.26);
  color: #f0cd7d;
}

.badge.danger {
  background: var(--danger-soft);
  border-color: rgba(239, 77, 77, 0.26);
  color: #ff9d9d;
}

.badge.accent {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: #ffb3ae;
}

.badge.neutral {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--muted);
}

/* ── Sesiones: filtros y selección ─────────────────────────────────────── */
.check-col {
  width: 42px;
  text-align: center;
}

.row-check {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  vertical-align: middle;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-soft);
}

.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 520;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  color: var(--text);
  border-color: #2e3340;
}

.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: #ffb3ae;
}

.chip-count {
  font-size: 11px;
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}

.chip.active .chip-count {
  color: inherit;
}

.selection-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Comunidades ────────────────────────────────────────────────────────── */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.community-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.community-head {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.community-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--surface-card);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  flex: none;
}

.community-icon svg {
  width: 18px;
  height: 18px;
}

.community-list {
  display: grid;
  /* minmax(0, 1fr): si no, la columna toma el tamaño del enlace largo y los
     botones quedan fuera de la tarjeta (y sin poder desplazarse). */
  grid-template-columns: minmax(0, 1fr);
}

.community-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  min-width: 0;
}

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

.community-row.off {
  opacity: 0.55;
}

.community-row .actions {
  align-items: center;
  flex: none;
}

/* En móvil los botones de la comunidad pasan a su propia línea. */
@media (max-width: 640px) {
  .community-row {
    flex-wrap: wrap;
  }

  .community-row .actions {
    margin-left: auto;
  }

  /* El nombre puede ocupar dos líneas: los botones siguen a la derecha. */
  .community-row .cell-title {
    white-space: normal;
  }
}

/* ── Acting as ──────────────────────────────────────────────────────────── */
.impersonating-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 24px;
  background: #2b2412;
  border-bottom: 1px solid rgba(227, 174, 60, 0.35);
  color: #f0cd7d;
  font-size: 12.5px;
}

.impersonating-bar svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.impersonating-bar span {
  flex: 1;
  min-width: 180px;
}

.impersonating-bar b {
  color: #ffe3a8;
}

/* ── Aviso: la cuenta no tiene correo ────────────────────────────────────── */
.account-nudge {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 24px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--accent-line);
  color: var(--text-2);
  font-size: 12.5px;
}

.account-nudge svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--accent);
}

.account-nudge span {
  flex: 1;
  min-width: 180px;
}

.account-nudge b {
  color: var(--text);
}

/* ── Cloudflare Turnstile ────────────────────────────────────────────────── */
.turnstile-slot {
  display: flex;
  justify-content: center;
  min-height: 65px;
  margin: 4px 0 14px;
}

/* ── Aviso de versión desactualizada ─────────────────────────────────────── */
.version-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  background: #3a2a12;
  border-top: 1px solid rgba(227, 174, 60, 0.4);
  color: #f0cd7d;
  font-size: 12.5px;
}

.version-banner svg {
  width: 16px;
  height: 16px;
  flex: none;
}

/* ── Configuración del sub-bot ──────────────────────────────────────────── */

/* ── Sub-bot premium ─────────────────────────────────────────────────────── */
.grid-2-tight {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.premium-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.premium-rule {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.premium-rule svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--accent);
  margin-top: 2px;
}

.premium-rule b {
  display: block;
  font-size: 12.5px;
  color: var(--text);
}

.premium-rule span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.45;
}

.premium-bots {
  margin-top: 16px;
}

.premium-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.premium-time b {
  display: block;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.premium-time span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.premium-progress {
  margin-top: 10px;
}

.premium-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.premium-editor {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 14px;
  background: var(--surface-2, rgba(255, 255, 255, 0.02));
}

.premium-editor summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.premium-editor-summary {
  user-select: none;
}

.premium-editor-summary:hover {
  color: var(--accent, #ff5b57);
}

.premium-editor-open-hint {
  margin-left: 4px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 500;
}

.premium-duration-inline { display: inline-flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.premium-duration-inline .premium-days-value { width: 72px; }

.premium-editor summary::-webkit-details-marker {
  display: none;
}

.premium-editor summary svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.premium-editor summary .badge {
  margin-left: auto;
}

.premium-form {
  padding: 4px 0 16px;
}

.ad-config-grid {
  display: grid;
  gap: 12px;
}

.ad-config-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.02);
}

.ad-config-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ad-code-input {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  font-size: 11px;
  line-height: 1.4;
}

.ad-preview {
  margin-top: 8px;
  overflow-x: auto;
}

.ad-config-row:has([name="bannerWide"]) .ad-preview iframe {
  width: 468px;
  height: 60px;
}

.ad-config-row:has([name="bannerNative"]) .ad-preview iframe {
  width: 320px;
  height: 250px;
}

.ad-preview summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}

.ad-preview iframe {
  display: block;
  width: 728px;
  height: 90px;
  margin: 8px auto 0;
  border: 0;
  background: transparent;
}

.ad-config-row:has([name="bannerSmall"]) .ad-preview iframe {
  width: 320px;
  height: 50px;
  max-width: 100%;
}

.ad-config-row:has([name="bannerSquare"]) .ad-preview iframe {
  width: 300px;
  height: 250px;
}

.ad-config-row:has([name="bannerMedium"]) .ad-preview iframe {
  width: 160px;
  height: 300px;
}

.ad-config-row:has([name="bannerTall"]) .ad-preview iframe {
  width: 160px;
  height: 600px;
}

/* Anuncios integrados en el flujo normal de la página, sin tarjetas ni
   marcos decorativos: se reserva únicamente el tamaño real del formato. */
/* Cargar sin reservar huecos; revelar cuando el marco informa contenido. */
.ads-header.ad-pending:not(.ad-ready),
.ads-inline.ad-pending:not(.ad-ready) {
  height: 0;
  min-height: 0;
  overflow: hidden;
  pointer-events: none;
  margin: 0;
}

.ads-header,
.ads-inline {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.ads-header {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 0 18px;
  overflow: hidden;
}

.ads-header .premium-ad-slot {
  width: min(728px, 100%);
}

.premium-ad-area,
.ads-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin: 18px 0;
}

.premium-ad-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.premium-ad-status svg {
  width: 15px;
  flex: 0 0 auto;
}

.ads-inline {
  display: flex;
  justify-content: center;
  margin: 18px auto;
} 

.premium-ad-main-flow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 18px;
  min-width: 0;
}

.premium-ad-main-flow .premium-ad-slot {
  flex: 0 1 auto;
}

.premium-ad-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.premium-ad-side .premium-ad-slot {
  max-width: 160px;
}

/* Tablero de anuncios: el banner corto ocupa su propia fila arriba y
   debajo, en dos columnas, el native y el vertical. En pantallas estrechas
   (móvil/tablet), una sola columna centrada. */
.ads-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: 16px;
  justify-content: center;
  justify-items: center;
}

.ads-board .premium-ad-small {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
}

.ads-board .premium-ad-slot {
  max-width: 100%;
}

.premium-ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0;
}

.premium-ad-slot iframe {
  display: block;
  border: 0;
  background: transparent;
  max-width: none;
  flex-shrink: 0;
}

.premium-ad-small iframe {
  width: min(320px, 100%);
  height: 50px;
}

.premium-ad-medium iframe {
  width: 160px;
  height: 300px;
}

.premium-ad-square iframe {
  width: 300px;
  height: 250px;
}

.premium-ad-tall iframe {
  width: 160px;
  height: 600px;
}

.premium-ad-leaderboard iframe {
  width: 728px;
  height: 90px;
}

.premium-ad-wide iframe {
  width: 468px;
  height: 60px;
}

.premium-ad-native iframe {
  width: 320px;
  height: 120px;
}

.premium-invite {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 18px;
  padding: 24px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--surface-card);
  color: var(--text);
}

.premium-invite-icon {
  display: grid;
  place-items: center;
  flex: 0 0 54px;
  height: 54px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--surface-card);
  color: var(--accent);
}

.premium-invite-icon svg { width: 28px; height: 28px; }
.premium-invite-copy { flex: 1 1 260px; min-width: 0; }
.premium-invite-label { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.premium-invite h3 { margin: 7px 0; font-size: 21px; line-height: 1.3; }
.premium-invite p { margin: 0; color: var(--text); font-size: 13px; line-height: 1.6; }
.premium-invite-perks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.premium-invite-perks span { padding: 4px 9px; border-radius: 20px; background: var(--surface-card); color: var(--text); font-size: 11px; }
.premium-invite-button { background: var(--accent); color: #fff; border: 1px solid var(--accent); font-weight: 700; white-space: normal; }
.premium-invite-button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.premium-invite-button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.premium-floating-promo { position:fixed; z-index:80; right:24px; bottom:24px; display:flex; gap:14px; width:min(410px, calc(100vw - 32px)); padding:18px; box-sizing:border-box; border:1px solid rgba(158,119,255,.45); border-radius:16px; background:linear-gradient(145deg, #171326, #10131d 72%); box-shadow:0 18px 55px rgba(0,0,0,.48), 0 0 0 1px rgba(255,255,255,.04) inset; animation:premium-promo-in .3s ease-out; }
.premium-floating-promo[hidden] { display:none; }
.premium-floating-promo-close { position:absolute; top:9px; right:9px; display:grid; place-items:center; width:28px; height:28px; padding:0; border:0; border-radius:50%; color:var(--muted); background:transparent; cursor:pointer; }
.premium-floating-promo-close:hover { color:var(--text); background:rgba(255,255,255,.1); }
.premium-floating-promo-close svg { width:16px; height:16px; }
.premium-floating-promo-icon { flex:0 0 auto; display:grid; place-items:center; width:42px; height:42px; border-radius:13px; color:#fff; background:linear-gradient(135deg, #8b5cf6, #ec4899); box-shadow:0 8px 22px rgba(139,92,246,.3); }
.premium-floating-promo-icon svg { width:22px; height:22px; }
.premium-floating-promo-content { min-width:0; padding-right:12px; }
.premium-floating-promo-content h3 { margin:4px 0 5px; color:#fff; font-size:18px; }
.premium-floating-promo-content p { margin:0; color:#c9c3d8; font-size:12px; line-height:1.5; }
.premium-floating-promo-perks { display:grid; gap:4px; margin:10px 0 13px; color:#e7e0f5; font-size:11px; }
.premium-floating-promo-perks span { display:flex; align-items:center; gap:5px; }
.premium-floating-promo-perks svg { width:13px; height:13px; color:#c4a7ff; }
.premium-floating-promo-content .premium-invite-button { display:inline-flex; font-size:12px; padding:8px 11px; }
@keyframes premium-promo-in { from { opacity:0; transform:translateY(12px) scale(.97); } to { opacity:1; transform:none; } }

@media (max-width: 600px) {
  .premium-invite { padding: 18px; gap: 14px; }
  .premium-invite-copy { flex-basis: 100%; }
  .premium-invite-button { width: 100%; }
  .premium-floating-promo { right:16px; bottom:16px; }
  .premium-floating-promo-icon { display:none; }
}

.premium-upsell {
  border: 1px solid var(--accent-line);
  background: var(--surface-card);
}

@media (max-width: 900px) {
  .grid-2-tight,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 800px) {
  .ads-header {
    margin-bottom: 12px;
  }

  .ads-header .premium-ad-slot {
    width: 100%;
  }

  .premium-ad-area,
  .ads-inline {
    margin: 14px 0;
  }

  .premium-ad-area {
    display: block;
  }

  .premium-ad-side {
    display: none;
  }

  .premium-ad-main-flow {
    gap: 10px;
  }

  .premium-ad-square iframe {
    width: min(300px, 100%);
    height: 250px;
  }

  .premium-ad-leaderboard iframe {
    height: 90px;
  }

  .ads-board {
    grid-template-columns: minmax(0, max-content);
  }

  .ads-board .premium-ad-small {
    grid-column: 1 / -1;
  }

  .premium-ad-medium iframe {
    width: 160px;
    max-width: 100%;
  }
}

/* Editor del texto completo del menú (premium). */
.textarea-menu {
  width: 100%;
  min-height: 320px;
  padding: 12px 14px;
  line-height: 1.55;
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
  resize: vertical;
}

.textarea-menu + .flex,
.premium-form code {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
}
.global-overview-card { margin-bottom: 18px; }
.global-overview-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.global-metric { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--bg-soft); }
.global-metric-value { color: var(--text); font-size: 28px; font-weight: 760; line-height: 1; }
.global-metric-label { color: var(--muted-2); font-size: 12px; }
.global-command-list { display: grid; gap: 0; }
.global-command-row { display: grid; grid-template-columns: 24px minmax(100px, 1fr) auto; align-items: center; gap: 10px; min-height: 34px; padding: 5px 18px; border-bottom: 1px solid var(--line-soft); color: var(--muted-2); font-size: 12px; }
.global-command-row:last-child { border-bottom: 0; }
.global-command-row b { color: var(--accent); text-align: center; }
.global-command-row code { color: var(--text); font-family: var(--mono); }
.global-command-row .dot-success { width: 7px; height: 7px; border-radius: 50%; background: #46d39a; }
.empty-inline { padding: 16px 18px; color: var(--muted-2); font-size: 12px; }
.dashboard-activity-stats { margin-bottom: 18px; }
.recent-commands-card { margin-bottom: 18px; }
@media (max-width: 640px) { .global-overview-metrics { grid-template-columns: 1fr; } }
