:root {
  --bg: #0b0e11;
  --panel: #12161a;
  --panel-alt: #141a21;
  --muted: #7a8699;
  --text: #e6edf3;
  --ok: #1bb36b;
  --warn: #ffb020;
  --bad: #ff5f5f;
  --line: #222a31;
  --accent: #7cd4ff;
}

html, body { height: 100%; }

body {
  margin: 0;
  background-color: #05070a;
  background-image: none;
  color: var(--text);
  font: 14px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans,
    Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

.wrap {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 16px;
  background: transparent;
}

/* Header */
.admin-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.title { display:flex; flex-direction:column; gap:4px; }
.title h1 { margin:0; font-size:20px; }
.title .badge { font-size:12px; color: var(--muted); }
.admin-header-actions {
  display:flex; gap:8px; align-items:center; flex-wrap:wrap;
}

/* Buttons */
a.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #0f1317;
  color: var(--text);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
a.btn:hover,
button.btn:hover {
  background: #151a20;
  border-color: rgba(124, 212, 255, 0.4);
  transform: translateY(-0.5px);
}

button { cursor:pointer; }

button.primary {
  background: linear-gradient(135deg, #1c98d6, #7cd4ff);
  border: 1px solid #1c98d6;
  color: #021118;
  font-weight: 600;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  box-shadow: 0 8px 20px rgba(1, 132, 200, 0.42);
  transition: filter 0.1s, transform 0.05s, box-shadow 0.1s;
}
button.primary:hover {
  filter: brightness(1.05);
  transform: translateY(-0.5px);
  box-shadow: 0 12px 26px rgba(1, 132, 200, 0.55);
}

button.ghost {
  background: transparent;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 7px 12px;
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.05s;
}
button.ghost:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: #303946;
  color: var(--text);
  transform: translateY(-0.5px);
}
button.ghost.danger {
  border-color: #ff5f5f;
  color: #ff9a9a;
}
button.ghost.danger:hover {
  background: rgba(255, 95, 95, 0.12);
  border-color: #ff7b7b;
  color: #ffe5e5;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Cards / tablas */
.card {
  background: #11161c;
  border: 1px solid #1f2833;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
}

.toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #11161c, #121822);
}
.toolbar .spacer { flex: 1; }

input[type="search"],
select,
textarea,
input[type="text"],
input[type="number"] {
  background: #0f1317;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  min-width: 0;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input[type="search"] { min-width: 220px; }
input[type="search"]:focus,
select:focus,
textarea:focus,
input[type="text"]:focus,
input[type="number"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(124, 212, 255, 0.6);
  background: #0b1116;
}
::placeholder { color: rgba(122, 134, 153, 0.95); }

.table-wrap { overflow: auto; }

.card .table-wrap.table-wrap-small {
  max-height: 410px;
  overflow-y: auto;
  overflow-x: auto;
  display: block;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.card .table-wrap.table-wrap-small::-webkit-scrollbar { width: 6px; height: 6px; }
.card .table-wrap.table-wrap-small::-webkit-scrollbar-track { background: transparent; }
.card .table-wrap.table-wrap-small::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }
.card .table-wrap.table-wrap-small::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

thead th {
  position: sticky;
  top: 0;
  background: #0f1317;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-weight: 600;
  padding: 10px;
  z-index: 1;
}
tbody td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
tbody tr:hover { background: #0f1419; }

.cell-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #202833;
  font-size: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
.badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}
.badge--role {
  background: rgba(124, 212, 255, 0.08);
  border-color: rgba(124, 212, 255, 0.4);
  color: var(--accent);
}

/* status colors */
.status-approved {
  background: rgba(27, 179, 107, 0.09);
  border-color: rgba(27, 179, 107, 0.45);
  color: var(--ok);
}
.status-approved i { background: var(--ok); }

.status-pending {
  background: rgba(255, 176, 32, 0.09);
  border-color: rgba(255, 176, 32, 0.45);
  color: var(--warn);
}
.status-pending i { background: var(--warn); }

.status-rejected {
  background: rgba(255, 95, 95, 0.08);
  border-color: rgba(255, 95, 95, 0.45);
  color: var(--bad);
}
.status-rejected i { background: var(--bad); }

.muted { color: var(--muted); }
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}
.empty { padding: 24px; text-align: center; color: var(--muted); }
.sortable { cursor: pointer; }
.sortable::after { content: " ↕"; color: var(--muted); font-weight: 400; }

/* Pills (productos) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
}
.pill.ok { background: rgba(27, 179, 107, 0.1); border-color: rgba(27, 179, 107, 0.35); }
.pill.bad { background: rgba(255, 95, 95, 0.1); border-color: rgba(255, 95, 95, 0.35); }

/* === Ajuste columnas usuarios + solicitudes === */
#grid { table-layout: fixed; width: 100%; }
#grid col.col-email { width: 280px; }
#grid col.col-name { width: 220px; }
#grid col.col-role { width: 280px; }
#grid col.col-formstatus { width: 220px; }
#grid col.col-actions { width: 260px; }

#appsTable { table-layout: fixed; width: 100%; }
#appsTable col.col-date { width: 210px; }
#appsTable col.col-app-name { width: 220px; }
#appsTable col.col-app-email { width: 260px; }
#appsTable col.col-app-status { width: 150px; }
#appsTable col.col-app-docs { width: 360px; }
#appsTable col.col-app-actions { width: 200px; }

#grid td,
#appsTable td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#grid td:nth-child(3) { white-space: normal; }

/* Docs buttons */
a.doc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(124, 212, 255, 0.28);
  background: rgba(124, 212, 255, 0.06);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
a.doc-btn:hover {
  background: rgba(124, 212, 255, 0.12);
  border-color: rgba(124, 212, 255, 0.45);
  transform: translateY(-0.5px);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: saturate(1.1) blur(2px);
  z-index: 9999;
}
.modal.open { display:flex; }

.modal .panel {
  position: relative;
  z-index: 10000;
  width: min(800px, 92vw);
  max-height: 80vh;
  overflow: auto;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
}
.modal header { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal .content { padding: 16px; }

/* Modal solicitud (vista amigable) */
.app-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 780px) {
  .app-details { grid-template-columns: 1fr; }
}
.app-details .box {
  background: #0f1317;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
.app-details .label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}
.app-details .value {
  font-size: 13px;
  white-space: normal;
  word-break: break-word;
}
.app-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* Jump highlight */
tr.jump-highlight td {
  background: rgba(124, 212, 255, 0.10);
  transition: background 0.8s;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  background: #0f1317;
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s;
  font-size: 13px;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* Confirm modal pro */
.modal.confirm-modal .panel {
  width: min(420px, 92vw);
  max-height: 80vh;
  overflow: hidden;
  background: radial-gradient(circle at top left, #2b1b3f 0%, #11161c 55%, #0a0d11 100%);
  border: 1px solid #3f264f;
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.8);
}
.confirm-header { padding: 14px 18px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }
.confirm-header-title {
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #dfe5ff;
  opacity: 0.9;
}
.confirm-body { padding: 12px 18px 4px; font-size: 14px; color: var(--text); line-height: 1.5; }
.confirm-body p { margin: 0; }
.confirm-footer { padding: 14px 18px 16px; display: flex; justify-content: flex-end; gap: 10px; }

.confirm-btn {
  min-width: 110px;
  padding: 8px 18px;
  border-radius: 10px;
  border: 1px solid #2b3441;
  background: #151a20;
  color: #e4ebf5;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}
.confirm-btn:hover { background: #1b222b; border-color: #3a4656; transform: translateY(-0.5px); }
.confirm-btn:active { transform: translateY(0.5px); }
.confirm-btn.danger { background: #e5484d; border-color: #ff7b83; color: #ffffff; }
.confirm-btn.danger:hover { background: #ff4b55; border-color: #ff97a0; }

/* Productos form */
.prod-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  margin-bottom: 8px;
}
.prod-form .meta { color: var(--muted); font-size: 12px; }
.prod-form .grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
.prod-form textarea { min-height: 72px; resize: vertical; }
.prod-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 8px 0 4px;
  font-size: 13px;
}
.prod-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

/* Responsive */
@media (max-width: 720px) {
  .admin-header { flex-direction: column; align-items: flex-start; }
  input[type="search"] { flex: 1 1 100%; min-width: 0; }
  .toolbar { align-items: flex-start; }
  thead th, tbody td { padding: 8px; }
}

/* Acciones: botón peligro (pero con estética del panel) */
button.danger {
  background: rgba(255, 95, 95, 0.14);
  border: 1px solid rgba(255, 95, 95, 0.45);
  color: #ffd5d5;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}
button.danger:hover {
  background: rgba(255, 95, 95, 0.22);
  border-color: rgba(255, 95, 95, 0.65);
  transform: translateY(-0.5px);
}

/* =========================================================
   OVERRIDES (pegable al final) — eliminar scroll horizontal
   Tablas: Usuarios (#grid) + Solicitudes (#appsTable)
   ========================================================= */

/* 1) No mostrar scroll horizontal del contenedor */
.table-wrap,
.card .table-wrap,
.card .table-wrap.table-wrap-small {
  overflow-x: hidden !important;
}

/* 2) Permitir wrap para que no se “estire” la tabla */
#grid td,
#appsTable td {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: normal !important;
  word-break: break-word !important;
}

/* Mantener fecha/hora en una sola línea (solicitudes) */
#appsTable td:nth-child(1) {
  white-space: nowrap !important;
}

/* Correos: que puedan cortar sin empujar el ancho */
#grid td:nth-child(1),
#appsTable td:nth-child(3) {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: break-word !important;
}

/* 3) Columnas en % para que SIEMPRE quepan en pantalla */
#grid {
  table-layout: fixed !important;
  width: 100% !important;
}
#grid col.col-email      { width: 26% !important; }
#grid col.col-name       { width: 18% !important; }
#grid col.col-role       { width: 22% !important; }
#grid col.col-formstatus { width: 16% !important; }
#grid col.col-actions    { width: 18% !important; }

#appsTable {
  table-layout: fixed !important;
  width: 100% !important;
}
#appsTable col.col-date        { width: 20% !important; }
#appsTable col.col-app-name    { width: 18% !important; }
#appsTable col.col-app-email   { width: 22% !important; }
#appsTable col.col-app-status  { width: 12% !important; }
#appsTable col.col-app-docs    { width: 18% !important; }
#appsTable col.col-app-actions { width: 10% !important; }

/* 4) Controles + acciones más compactas */
#grid select.roleSel {
  max-width: 120px !important;
  padding: 6px 8px !important;
  font-size: 12px !important;
  border-radius: 10px !important;
}

/* Acciones usuarios: wrap (si falta espacio) y más compacto */
#grid .cell-actions {
  display: flex !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}
#grid .cell-actions button {
  padding: 6px 10px !important;
  font-size: 12px !important;
}

/* Docs (solicitudes): permitir wrap y hacerlos más chicos */
#appsTable td:nth-child(5) {
  white-space: normal !important;
}
a.doc-btn {
  padding: 5px 9px !important;
  font-size: 11.5px !important;
  gap: 6px !important;
}

/* Acciones solicitudes: wrap + botones compactos */
#appsTable td:nth-child(6) {
  white-space: normal !important;
}
#appsTable td:nth-child(6) button {
  padding: 6px 10px !important;
  font-size: 12px !important;
}

/* =========================================================
   OVERRIDES FINAL (pegable al final)
   1) Simetría botones Users (Guardar / Ir a solicitud / Eliminar)
   2) Mostrar "Ver" y "Guardar" en columna Acción (Solicitudes)
   ========================================================= */

/* ---------- 1) USERS: acciones simétricas ---------- */
#grid .cell-actions {
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
}

#grid .cell-actions button {
  height: 34px !important;          /* mismo alto */
  min-width: 124px !important;       /* mismo ancho base */
  padding: 0 12px !important;        /* simétrico */
  font-size: 12.5px !important;
  line-height: 34px !important;      /* centra texto */
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  white-space: nowrap !important;    /* que no parta el texto */
}

/* Botón eliminar (danger): mismo look y simetría */
#grid .cell-actions button.danger {
  height: 34px !important;
  min-width: 124px !important;
  padding: 0 12px !important;
}

/* ---------- 2) SOLICITUDES: forzar que "Acción" se vea ---------- */
/* A) Que la columna "Acción" tenga suficiente ancho y NO se recorte */
#appsTable col.col-app-actions { width: 16% !important; }  /* más ancho */
#appsTable col.col-app-docs    { width: 14% !important; }  /* un poco menos */
#appsTable col.col-app-status  { width: 11% !important; }
#appsTable col.col-app-email   { width: 21% !important; }
#appsTable col.col-app-name    { width: 18% !important; }
#appsTable col.col-date        { width: 20% !important; }

/* B) Permitir que la celda de acción NO esconda botones */
#appsTable td:nth-child(6) {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

/* C) Botones de acción (Ver / Guardar) visibles y alineados */
#appsTable td:nth-child(6) button {
  height: 34px !important;
  min-width: 92px !important;
  padding: 0 12px !important;
  font-size: 12.5px !important;
  line-height: 34px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
}

/* D) Si tu JS mete "Ver/Guardar" dentro de una fila/contendor, igual se ordena */
#appsTable td:nth-child(6) .cell-actions,
#appsTable td:nth-child(6) .actions,
#appsTable td:nth-child(6) .btn-row {
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
}

/* ---------- Extra: evitar que el scroll vertical coma espacio ---------- */
.card .table-wrap.table-wrap-small {
  scrollbar-gutter: stable both-edges;
}

/* ===========================
   FIX alineación "Acciones"
   =========================== */

/* Alinear títulos y celdas de la última columna al mismo lado */
#grid thead th:last-child,
#appsTable thead th:last-child {
  text-align: center !important;
}

#grid tbody td:last-child,
#appsTable tbody td:last-child {
  text-align: center !important;
}

/* En usuarios: alinear botones como bloque centrado bajo el header */
#grid .cell-actions {
  justify-content: center !important;
  align-items: center !important;
}

/* Botones users: mismo ancho para simetría (sin deformar) */
#grid .cell-actions button {
  min-width: 160px !important;
}

/* En solicitudes: la celda Acción debe centrarse y verse clara */
#appsTable td.apps-actions {
  text-align: center !important;
}

/* ===========================
   Solicitudes: Docs + Acción
   =========================== */

#appsTable td.docs-cell {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
}

#appsTable td.apps-actions {
  display: flex !important;
  gap: 10px !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

/* estilo atractivo para docs */
a.doc-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 12px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(120, 200, 255, 0.35) !important;
  background: rgba(120, 200, 255, 0.08) !important;
  text-decoration: none !important;
  color: inherit !important;
  font-size: 12.5px !important;
}
a.doc-btn:hover {
  background: rgba(120, 200, 255, 0.14) !important;
}

/* =========================================================
   FIX DEFINITIVO: Acciones en su columna (Solicitudes)
   - NO usar flex en <td> (rompe el layout de tabla)
   - Volver a table-cell y alinear contenido al centro
   ========================================================= */

/* Header "Acciones" centrado como su contenido (Usuarios + Solicitudes) */
#grid thead th:last-child,
#appsTable thead th:last-child {
  text-align: center !important;
}

/* Centrar también celdas finales */
#grid tbody td:last-child,
#appsTable tbody td:last-child {
  text-align: center !important;
  vertical-align: middle !important;
}

/* --- SOLICITUDES: recuperar comportamiento de tabla --- */
#appsTable td.docs-cell,
#appsTable td.apps-actions {
  display: table-cell !important;   /* <- mata el flex que te está rompiendo columnas */
  vertical-align: middle !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

/* Docs: que se vean centrados y con wrap sin flex en td */
#appsTable td.docs-cell {
  text-align: center !important;
}

/* Botones docs en línea, con separación */
#appsTable td.docs-cell a.doc-btn,
#appsTable td.docs-cell a.ghost {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 10px 10px 0 !important;  /* separa y permite wrap */
  white-space: nowrap !important;
}

/* --- ACCIÓN: botones en SU columna (centrados, tipo stack) --- */
#appsTable td.apps-actions {
  text-align: center !important;
}

#appsTable td.apps-actions button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 130px !important;     /* consistente */
  height: 34px !important;
  padding: 0 12px !important;
  margin: 0 0 10px 0 !important; /* stack vertical */
  border-radius: 999px !important;
  white-space: nowrap !important;
}

/* quitar margen extra del último botón */
#appsTable td.apps-actions button:last-child {
  margin-bottom: 0 !important;
}

/* --- USUARIOS: asegurar alineación bajo "Acciones" --- */
#grid .cell-actions {
  justify-content: center !important;
  align-items: center !important;
}
#grid .cell-actions button {
  width: 160px !important;
  height: 34px !important;
}

/* ===========================
   Centrar títulos (headers) de tablas
   Usuarios (#grid) + Solicitudes (#appsTable)
   =========================== */

#grid thead th,
#appsTable thead th {
  text-align: center !important;
}

/* Opcional: que el icono de sort también quede centrado */
#grid thead th *,
#appsTable thead th * {
  vertical-align: middle;
}

/* Opcional: si quieres que el contenido también quede más centrado/compacto */
#grid tbody td,
#appsTable tbody td {
  vertical-align: middle !important;
}

/* =========================================================
   Centrado general (Users + Solicitudes)
   EXCEPTO: correos y fecha (alineados a la izquierda)
   ========================================================= */

/* 1) Centrar TODOS los headers */
#grid thead th,
#appsTable thead th {
  text-align: center !important;
}

/* 2) Centrar TODO el contenido por defecto */
#grid tbody td,
#appsTable tbody td {
  text-align: center !important;
  vertical-align: middle !important;
}

/* 3) EXCEPCIONES: correos y fecha a la izquierda */

/* Users: columna 1 = Correo */
#grid thead th:nth-child(1),
#grid tbody td:nth-child(1) {
  text-align: left !important;
}

/* Solicitudes: columna 1 = Fecha, columna 3 = Email */
#appsTable thead th:nth-child(1),
#appsTable tbody td:nth-child(1),
#appsTable thead th:nth-child(3),
#appsTable tbody td:nth-child(3) {
  text-align: left !important;
}

/* (Opcional) que el texto largo de correo se vea mejor */
#grid tbody td:nth-child(1),
#appsTable tbody td:nth-child(3) {
  padding-right: 18px !important;
}


