/* ================================================================
   app-portal.css — Módulo Portal Asociados
   ================================================================ */

/* ── Tabla de usuarios portal ────────────────────────────────── */
.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 650px;
}

.portal-table thead tr { border-bottom: 2px solid var(--border-color); }

.portal-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-card);
}

.portal-table th.center { text-align: center; }

.portal-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition);
}

.portal-table tbody tr:hover { background: rgba(var(--primary-rgb), 0.04); }

.portal-table td { padding: 10px 16px; vertical-align: middle; }

/* ── Badges de rol portal ────────────────────────────────────── */
.portal-badge {
  display: inline-flex;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.portal-badge.admin    { background: #F59E0B1a; color: #F59E0B; }
.portal-badge.operador { background: #3B82F61a; color: #3B82F6; }
.portal-badge.abogado  { background: #8B5CF61a; color: #8B5CF6; }

/* ── Estado toggle ───────────────────────────────────────────── */
.portal-estado {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.82rem;
  transition: opacity var(--transition);
}

.portal-estado:hover { opacity: 0.7; }
.portal-estado.activo { color: #10B981; }
.portal-estado.inactivo { color: #EF4444; }

/* ── Last login ──────────────────────────────────────────────── */
.portal-last-login {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ── Botón editar ────────────────────────────────────────────── */
.portal-btn-edit {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.portal-btn-edit:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
}

/* ── Modal ────────────────────────────────────────────────────── */
.portal-modal {
  max-width: 500px;
  width: 92%;
  padding: 32px;
}

.portal-modal-title {
  font-family: Outfit, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-modal-title i { color: var(--primary); opacity: 0.7; }

.portal-field {
  margin-bottom: 16px;
}

.portal-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-main);
}

.portal-field label .req { color: #EF4444; }
.portal-field .form-control { width: 100%; }
.portal-field .form-control:disabled { opacity: 0.5; cursor: not-allowed; }

.portal-field .hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.portal-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

/* ── Subtext ─────────────────────────────────────────────────── */
.portal-subtext {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.portal-subtext strong { color: var(--text-main); }

/* ── Empty ────────────────────────────────────────────────────── */
.portal-empty {
  text-align: center;
  padding: 56px 24px;
  color: var(--text-muted);
}

.portal-empty i {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
  opacity: 0.35;
  color: var(--primary);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .portal-table { min-width: 450px; }
  .portal-table th:nth-child(6),
  .portal-table td:nth-child(6) { display: none; }
  .portal-modal { padding: 20px; width: 95%; }
}

@media (max-width: 480px) {
  .portal-table th:nth-child(3),
  .portal-table td:nth-child(3),
  .portal-table th:nth-child(5),
  .portal-table td:nth-child(5) { display: none; }
}
