/* =========================================================================
   admin-allowlist.css — estilos del panel de usuarios autorizados.
   Reutiliza CSS vars definidas en styles.css (--bg, --bg-card, --border,
   --text, --text-dim, --accent, --mint, --pink, --radius, --font-display,
   --font-body, --shadow…).
   ========================================================================= */

.al-card {
  margin-top: 16px;
}

.al-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
}
.al-help { margin-top: 6px; }
.al-help code {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12px;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
}

.al-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Form para añadir ---- */
.al-add {
  display: grid;
  grid-template-columns: 2fr 1.4fr auto;
  gap: 10px;
  margin-bottom: 14px;
}
.al-input {
  font-size: 14px;
}
@media (max-width: 640px) {
  .al-add { grid-template-columns: 1fr; }
}

/* ---- Status banner ---- */
.al-status {
  display: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
  font-weight: 500;
}
.al-status.visible { display: block; animation: alFade .25s ease-out; }
@keyframes alFade { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.al-status--ok    { background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.22); color: var(--mint-2, #059669); }
.al-status--error { background: rgba(244,63,94,.08); border: 1px solid rgba(244,63,94,.22); color: var(--pink, #be123c); }

/* ---- Lista ---- */
.al-ul {
  list-style: none; margin: 0; padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
}
.al-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.al-row:last-child { border-bottom: none; }
.al-row:hover { background: var(--bg); }
.al-row--off { opacity: .55; }
.al-row--admin { background: var(--bg); }

.al-row-main {
  display: flex; align-items: center; gap: 12px;
  min-width: 0; flex: 1;
}
.al-row-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent, #f97316), var(--accent-2, #ea580c));
  color: white;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(249,115,22,.25);
}
.al-row--admin .al-row-avatar {
  background: linear-gradient(135deg, #6366f1, #4338ca);
  box-shadow: 0 4px 12px rgba(99,102,241,.25);
}

.al-row-info { min-width: 0; flex: 1; }
.al-row-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.al-row-meta {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ---- Tags ---- */
.al-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 7px;
  border-radius: 6px;
  vertical-align: 1px;
}
.al-tag--admin { background: rgba(99,102,241,.12); color: #4338ca; }
[data-theme="dark"] .al-tag--admin { background: rgba(99,102,241,.18); color: #a5b4fc; }
.al-tag--self  { background: rgba(249,115,22,.12);  color: var(--accent-2, #ea580c); }
.al-tag--off   { background: rgba(120,113,108,.18); color: var(--text-dim); }

/* ---- Action buttons ---- */
.al-row-actions {
  display: flex; gap: 6px; align-items: center;
  flex-shrink: 0;
}
.al-icon-btn {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  display: grid; place-items: center;
  transition: background .12s, color .12s, border-color .12s;
}
.al-icon-btn:hover {
  background: var(--bg);
  color: var(--text);
  border-color: var(--text-dim);
}
.al-icon-btn--danger:hover {
  background: rgba(244,63,94,.10);
  color: var(--pink, #f43f5e);
  border-color: rgba(244,63,94,.3);
}
.al-icon-btn svg { width: 15px; height: 15px; }

.al-locked {
  font-size: 11px;
  color: var(--text-mute);
  font-style: italic;
  padding-right: 4px;
}

/* ---- Visibilidad en login con role ---- */
#adminAllowlist[hidden] { display: none !important; }
